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