1 | DEBUG = #yes |
---|
2 | DEBUG_WRITE_FRAME_FILE = #yes |
---|
3 | TRACE = #yes |
---|
4 | USE_OFFSCREEN_RENDERING = #yes |
---|
5 | USE_THREADS = yes |
---|
6 | USE_READ_THREAD = #yes |
---|
7 | USE_CACHE = yes |
---|
8 | USE_OSGEARTH_TRUNK = #yes |
---|
9 | USE_THROTTLING_SLEEP = #yes |
---|
10 | SLEEP_AFTER_QUEUE_FRAME = yes |
---|
11 | QUEUE_ONLY_ONE_FRAME = yes |
---|
12 | |
---|
13 | bindir = @bindir@ |
---|
14 | datadir = @datadir@ |
---|
15 | datarootdir = @datarootdir@ |
---|
16 | exec_prefix = @exec_prefix@ |
---|
17 | includedir = @includedir@ |
---|
18 | libdir = @libdir@ |
---|
19 | mandir = @mandir@ |
---|
20 | prefix = @prefix@ |
---|
21 | srcdir = @srcdir@ |
---|
22 | |
---|
23 | CC = @CC@ |
---|
24 | CXX = @CXX@ |
---|
25 | CFLAGS = @CFLAGS@ |
---|
26 | CXXFLAGS = @CXXFLAGS@ |
---|
27 | |
---|
28 | VPATH = $(srcdir) |
---|
29 | |
---|
30 | INSTALL = @INSTALL@ |
---|
31 | INSTALL_PROGRAM = ${INSTALL} -m 0755 |
---|
32 | INSTALL_DATA = ${INSTALL} -m 0644 |
---|
33 | INSTALL_SCRIPT = ${INSTALL} -m 0644 |
---|
34 | MKDIR_P = @MKDIR_P@ |
---|
35 | |
---|
36 | SVN_VERSION = $(shell svnversion $(srcdir) | sed 's/Unversioned directory/unknown/') |
---|
37 | STATSDIR = @STATSDIR@ |
---|
38 | |
---|
39 | GL_LIB_SPEC = -lGL -lm |
---|
40 | PTHREAD_LIB_SPEC= -lpthread |
---|
41 | CURL_LIB_SPEC = -lcurl |
---|
42 | |
---|
43 | TCL_LIB_SPEC = @TCL_LIB_SPEC@ |
---|
44 | TCL_INC_SPEC = @TCL_INC_SPEC@ |
---|
45 | |
---|
46 | OSG_LIB_DIR = @OSG_LIB_DIR@ |
---|
47 | OSG_INC_SPEC = @OSG_INC_SPEC@ |
---|
48 | OSG_LIB_SPEC = -L${OSG_LIB_DIR} \ |
---|
49 | -losgText \ |
---|
50 | -losgDB \ |
---|
51 | -losgViewer \ |
---|
52 | -losgGA \ |
---|
53 | -losg \ |
---|
54 | -lOpenThreads |
---|
55 | |
---|
56 | OSGEARTH_LIB_DIR = $(OSG_LIB_DIR) |
---|
57 | OSGEARTH_INC_SPEC = $(OSG_INC_SPEC) |
---|
58 | OSGEARTH_LIB_SPEC = -L${OSG_LIB_DIR} \ |
---|
59 | -losgEarthFeatures \ |
---|
60 | -losgEarthAnnotation \ |
---|
61 | -losgEarthSymbology \ |
---|
62 | -losgEarthUtil \ |
---|
63 | -losgEarth |
---|
64 | |
---|
65 | LD_RUN_PATH = $(OSG_LIB_DIR):$(libdir) |
---|
66 | |
---|
67 | LIBS = \ |
---|
68 | $(OSGEARTH_LIB_SPEC) \ |
---|
69 | $(OSG_LIB_SPEC) \ |
---|
70 | $(TCL_LIB_SPEC) \ |
---|
71 | $(GL_LIB_SPEC) \ |
---|
72 | $(CURL_LIB_SPEC) \ |
---|
73 | $(PTHREAD_LIB_SPEC) \ |
---|
74 | -Wl,-rpath,$(LD_RUN_PATH) \ |
---|
75 | -Wl,--enable-new-dtags |
---|
76 | |
---|
77 | INCLUDES = \ |
---|
78 | -I$(srcdir) \ |
---|
79 | $(OSGEARTH_INC_SPEC) \ |
---|
80 | $(OSG_INC_SPEC) \ |
---|
81 | $(TCL_INC_SPEC) |
---|
82 | |
---|
83 | EXTRA_CXXFLAGS = -Wall |
---|
84 | EXTRA_CFLAGS = -Wall |
---|
85 | DEFINES = -DSVN_VERSION=\"$(SVN_VERSION)\" -DSTATSDIR=\"$(STATSDIR)\" |
---|
86 | ifdef DEBUG |
---|
87 | DEFINES += -DDEBUG |
---|
88 | CXXFLAGS = -O0 -g |
---|
89 | endif |
---|
90 | ifdef DEBUG_WRITE_FRAME_FILE |
---|
91 | DEFINES += -DDEBUG_WRITE_FRAME_FILE |
---|
92 | endif |
---|
93 | ifdef TRACE |
---|
94 | DEFINES += -DWANT_TRACE |
---|
95 | endif |
---|
96 | ifdef USE_OFFSCREEN_RENDERING |
---|
97 | DEFINES += -DUSE_OFFSCREEN_RENDERING |
---|
98 | endif |
---|
99 | ifdef USE_THREADS |
---|
100 | DEFINES += -DUSE_THREADS |
---|
101 | endif |
---|
102 | ifdef USE_READ_THREAD |
---|
103 | DEFINES += -DUSE_READ_THREAD |
---|
104 | endif |
---|
105 | ifdef USE_CACHE |
---|
106 | DEFINES += -DUSE_CACHE |
---|
107 | endif |
---|
108 | ifdef USE_OSGEARTH_TRUNK |
---|
109 | DEFINES += -DUSE_OSGEARTH_TRUNK |
---|
110 | endif |
---|
111 | ifdef USE_THROTTLING_SLEEP |
---|
112 | DEFINES += -DUSE_THROTTLING_SLEEP |
---|
113 | endif |
---|
114 | ifdef SLEEP_AFTER_QUEUE_FRAME |
---|
115 | DEFINES += -DSLEEP_AFTER_QUEUE_FRAME |
---|
116 | endif |
---|
117 | ifdef QUEUE_ONLY_ONE_FRAME |
---|
118 | DEFINES += -DQUEUE_ONLY_ONE_FRAME |
---|
119 | endif |
---|
120 | |
---|
121 | CXX_SWITCHES = $(CXXFLAGS) $(EXTRA_CXXFLAGS) $(DEFINES) $(INCLUDES) |
---|
122 | CC_SWITCHES = $(CFLAGS) $(EXTRA_CFLAGS) $(DEFINES) $(INCLUDES) |
---|
123 | |
---|
124 | SERVER_SRCS = \ |
---|
125 | CmdProc.cpp \ |
---|
126 | ColorMap.cpp \ |
---|
127 | FileUtil.cpp \ |
---|
128 | IData.cpp \ |
---|
129 | Picker.cpp \ |
---|
130 | Placard.cpp \ |
---|
131 | PPMWriter.cpp \ |
---|
132 | ReadBuffer.cpp \ |
---|
133 | Renderer.cpp \ |
---|
134 | RendererCmd.cpp \ |
---|
135 | RenderServer.cpp \ |
---|
136 | ScaleBar.cpp \ |
---|
137 | Stats.cpp \ |
---|
138 | TGAWriter.cpp \ |
---|
139 | Trace.cpp \ |
---|
140 | Util.cpp |
---|
141 | |
---|
142 | ifdef USE_THREADS |
---|
143 | SERVER_SRCS+= \ |
---|
144 | ResponseQueue.cpp |
---|
145 | ifdef USE_READ_THREAD |
---|
146 | SERVER_SRCS+= \ |
---|
147 | CommandQueue.cpp |
---|
148 | endif |
---|
149 | endif |
---|
150 | |
---|
151 | SERVER_OBJS=$(SERVER_SRCS:.cpp=.o) |
---|
152 | SERVER_OBJS+= md5.o |
---|
153 | SERVER=geovis |
---|
154 | |
---|
155 | resources = \ |
---|
156 | $(srcdir)/resources/placemark32.png \ |
---|
157 | $(srcdir)/resources/world.tif |
---|
158 | |
---|
159 | .PHONY: all docs install install-resources clean clean-docs distclean |
---|
160 | |
---|
161 | all: $(SERVER) |
---|
162 | |
---|
163 | idatatest: idatatest.o IData.o |
---|
164 | $(CXX) -o $@ $^ $(LIBS) |
---|
165 | |
---|
166 | docs: |
---|
167 | $(MKDIR_P) -m 0755 docs/doxygen |
---|
168 | doxygen |
---|
169 | |
---|
170 | $(SERVER): $(SERVER_OBJS) |
---|
171 | $(CXX) -o $@ $(SERVER_OBJS) $(LIBS) |
---|
172 | |
---|
173 | install: install-server install-resources |
---|
174 | |
---|
175 | install-server: all |
---|
176 | $(INSTALL_PROGRAM) $(SERVER) $(bindir) |
---|
177 | |
---|
178 | install-resources: |
---|
179 | $(MKDIR_P) $(libdir)/resources |
---|
180 | @for i in $(resources) ; do \ |
---|
181 | echo "installing $$i..." ; \ |
---|
182 | $(INSTALL_DATA) $$i $(libdir)/resources ; \ |
---|
183 | done |
---|
184 | |
---|
185 | %.o: %.cpp |
---|
186 | $(CXX) $(CXX_SWITCHES) -c $< -o $@ |
---|
187 | |
---|
188 | %.o: %.c |
---|
189 | $(CC) $(CC_SWITCHES) -c $< -o $@ |
---|
190 | |
---|
191 | clean: |
---|
192 | $(RM) *~ *.o $(SERVER) |
---|
193 | |
---|
194 | clean-docs: |
---|
195 | $(RM) -r docs |
---|
196 | |
---|
197 | distclean: clean clean-docs |
---|
198 | $(RM) Makefile Doxyfile |
---|
199 | |
---|
200 | CmdProc.o: CmdProc.h |
---|
201 | ColorMap.o: ColorMap.h |
---|
202 | CommandQueue.o: CommandQueue.h Trace.h |
---|
203 | FileUtil.o: FileUtil.h |
---|
204 | IData.o: IData.h |
---|
205 | idatatest.o: IData.h |
---|
206 | md5.o: md5.h |
---|
207 | Picker.o: Picker.h Renderer.h Trace.h Placard.h |
---|
208 | Placard.o: Placard.h Trace.h |
---|
209 | PPMWriter.o: PPMWriter.h ResponseQueue.h Trace.h |
---|
210 | ReadBuffer.o: ReadBuffer.h Trace.h |
---|
211 | Renderer.o: Renderer.h Trace.h Picker.h Placard.h MouseCoordsTool.h ScaleBar.h FileUtil.h Util.h |
---|
212 | RendererCmd.o: Renderer.h ReadBuffer.h ResponseQueue.h Trace.h CmdProc.h PPMWriter.h TGAWriter.h |
---|
213 | RenderServer.o: RenderServer.h RendererCmd.h Renderer.h ReadBuffer.h ResponseQueue.h Trace.h PPMWriter.h TGAWriter.h Stats.h |
---|
214 | ResponseQueue.o: ResponseQueue.h Trace.h |
---|
215 | ScaleBar.o: ScaleBar.h Trace.h |
---|
216 | Stats.o: Stats.h RenderServer.h Trace.h md5.h |
---|
217 | Trace.o: Trace.h |
---|
218 | Util.o: Util.h |
---|