1 | ######################################################### |
---|
2 | # check CONFIG parameter |
---|
3 | ######################################################### |
---|
4 | |
---|
5 | ifneq ($(CONFIG), LIBRARY) |
---|
6 | ifneq ($(CONFIG), CONSOLE) |
---|
7 | CONFIG_ERR = TRUE |
---|
8 | endif |
---|
9 | endif |
---|
10 | |
---|
11 | ######################################################### |
---|
12 | # executables used |
---|
13 | ######################################################### |
---|
14 | |
---|
15 | CPP = g++ |
---|
16 | CC = gcc |
---|
17 | AR = ar |
---|
18 | LD = $(CPP) |
---|
19 | ASM = nasm |
---|
20 | |
---|
21 | ######################################################### |
---|
22 | # output file names and version information |
---|
23 | ######################################################### |
---|
24 | |
---|
25 | ifeq ($(CONFIG), LIBRARY) |
---|
26 | # the libraries that can be created |
---|
27 | STAT_DEBUG_OUT = $(LIB_DIR)/lib$(PRJ_NAME)Staticd.a |
---|
28 | STAT_RELEASE_OUT = $(LIB_DIR)/lib$(PRJ_NAME)Static.a |
---|
29 | DYN_DEBUG_OUT = $(LIB_DIR)/lib$(PRJ_NAME)d.so |
---|
30 | DYN_RELEASE_OUT = $(LIB_DIR)/lib$(PRJ_NAME).so |
---|
31 | # |
---|
32 | else |
---|
33 | ifeq ($(CONFIG), CONSOLE) |
---|
34 | # the executables that can be created |
---|
35 | STAT_DEBUG_OUT = $(BIN_DIR)/$(PRJ_NAME)Staticd |
---|
36 | STAT_RELEASE_OUT = $(BIN_DIR)/$(PRJ_NAME)Static |
---|
37 | DYN_DEBUG_OUT = $(BIN_DIR)/$(PRJ_NAME)d |
---|
38 | DYN_RELEASE_OUT = $(BIN_DIR)/$(PRJ_NAME) |
---|
39 | # |
---|
40 | endif |
---|
41 | endif |
---|
42 | |
---|
43 | |
---|
44 | ######################################################### |
---|
45 | # c compiler flags |
---|
46 | ######################################################### |
---|
47 | |
---|
48 | # default cpp flags for all configurations |
---|
49 | #CPPFLAGS = -Wall $(DEFS) -I$(CURDIR)/$(INC_DIR) $(USER_INC_DIRS) |
---|
50 | CPPFLAGS = $(DEFS) $(ADDDEFS) -I$(CURDIR)/$(INC_DIR) $(USER_INC_DIRS) -Wall -Wshadow -Wno-sign-compare -Werror |
---|
51 | |
---|
52 | ########## |
---|
53 | # enforce 32-bit build : 1=yes, 0=no |
---|
54 | ########## |
---|
55 | M32?= 0 |
---|
56 | ifeq ($(M32),1) |
---|
57 | CPPFLAGS+=-m32 |
---|
58 | endif |
---|
59 | ########## |
---|
60 | |
---|
61 | ifeq ($(HIGHBITDEPTH), 1) |
---|
62 | CPPFLAGS+="-DRExt__HIGH_BIT_DEPTH_SUPPORT=1" |
---|
63 | endif |
---|
64 | |
---|
65 | ifeq ($(EXTENSION_360_VIDEO), 1) |
---|
66 | CPPFLAGS+=-DEXTENSION_360_VIDEO=1 |
---|
67 | else |
---|
68 | CPPFLAGS+=-DEXTENSION_360_VIDEO=0 |
---|
69 | endif |
---|
70 | |
---|
71 | # |
---|
72 | # debug cpp flags |
---|
73 | DEBUG_CPPFLAGS = -g -D_DEBUG |
---|
74 | # |
---|
75 | # release cpp |
---|
76 | RELEASE_CPPFLAGS = -O3 -Wuninitialized |
---|
77 | |
---|
78 | |
---|
79 | ######################################################### |
---|
80 | # assembler compiler flags |
---|
81 | ######################################################### |
---|
82 | |
---|
83 | # default asm flags for all configurations |
---|
84 | ASMFLAGS = -f elf $(DEFS) |
---|
85 | # |
---|
86 | # debug asm flags |
---|
87 | DEBUG_ASMFLAGS = -g |
---|
88 | # |
---|
89 | # release asm flags |
---|
90 | RELEASE_ASMFLAGS = |
---|
91 | |
---|
92 | |
---|
93 | |
---|
94 | ######################################################### |
---|
95 | # linker flags |
---|
96 | ######################################################### |
---|
97 | |
---|
98 | # linker flags for all |
---|
99 | ALL_LDFLAGS = -Wall |
---|
100 | |
---|
101 | ########## |
---|
102 | # enforce 32-bit build : 1=yes, 0=no |
---|
103 | ########## |
---|
104 | ifeq ($(M32),1) |
---|
105 | ALL_LDFLAGS+=-m32 |
---|
106 | endif |
---|
107 | ########## |
---|
108 | |
---|
109 | |
---|
110 | ifeq ($(CONFIG), LIBRARY) |
---|
111 | # linker flags for library |
---|
112 | # LDFLAGS = $(ALL_LDFLAGS) -shared -Wl,-Bsymbolic |
---|
113 | LDFLAGS = $(ALL_LDFLAGS) -shared |
---|
114 | # |
---|
115 | # debug linker flags for library |
---|
116 | DEBUG_LDFLAGS = -Wl,-soname,lib$(PRJ_NAME)d.so.$(VER) |
---|
117 | # |
---|
118 | # release linker flags for library |
---|
119 | RELEASE_LDFLAGS = -Wl,-soname,lib$(PRJ_NAME).so.$(VER) |
---|
120 | # |
---|
121 | else |
---|
122 | ifeq ($(CONFIG), CONSOLE) |
---|
123 | # linker flags for console |
---|
124 | LDFLAGS = $(ALL_LDFLAGS) |
---|
125 | # |
---|
126 | # debug linker flags for console |
---|
127 | DEBUG_LDFLAGS = |
---|
128 | # |
---|
129 | # release linker flags for console |
---|
130 | RELEASE_LDFLAGS = |
---|
131 | # |
---|
132 | endif |
---|
133 | endif |
---|
134 | |
---|
135 | |
---|
136 | |
---|
137 | ######################################################### |
---|
138 | # objects that have to be created |
---|
139 | ######################################################### |
---|
140 | |
---|
141 | # the object types that have to be created |
---|
142 | RELEASE_OBJS = $(OBJS:.o=.r.o) |
---|
143 | DEBUG_OBJS = $(OBJS:.o=.d.o) |
---|
144 | |
---|
145 | |
---|
146 | ######################################################### |
---|
147 | # rules |
---|
148 | ######################################################### |
---|
149 | |
---|
150 | # suffixes |
---|
151 | .SUFFIXES: .cpp .asm .r.o .d.o |
---|
152 | |
---|
153 | ######################################################### |
---|
154 | # assembler rules |
---|
155 | ######################################################### |
---|
156 | |
---|
157 | |
---|
158 | # create release objects |
---|
159 | $(OBJ_DIR)/%.r.o: $(SRC_DIR)/%.asm |
---|
160 | $(ASM) $(ASMFLAGS) $(RELEASE_ASMFLAGS) -o $@ $< |
---|
161 | |
---|
162 | # create debug objects |
---|
163 | $(OBJ_DIR)/%.d.o: $(SRC_DIR)/%.asm |
---|
164 | $(ASM) $(ASMFLAGS) $(DEBUG_ASMFLAGS) -o $@ $< |
---|
165 | |
---|
166 | # create release objects |
---|
167 | $(OBJ_DIR)/%.r.o: $(SRC_DIR1)/%.asm |
---|
168 | $(ASM) $(ASMFLAGS) $(RELEASE_ASMFLAGS) -o $@ $< |
---|
169 | |
---|
170 | # create debug objects |
---|
171 | $(OBJ_DIR)/%.d.o: $(SRC_DIR1)/%.asm |
---|
172 | $(ASM) $(ASMFLAGS) $(DEBUG_ASMFLAGS) -o $@ $< |
---|
173 | |
---|
174 | # create release objects |
---|
175 | $(OBJ_DIR)/%.r.o: $(SRC_DIR2)/%.asm |
---|
176 | $(ASM) $(ASMFLAGS) $(RELEASE_ASMFLAGS) -o $@ $< |
---|
177 | |
---|
178 | # create debug objects |
---|
179 | $(OBJ_DIR)/%.d.o: $(SRC_DIR2)/%.asm |
---|
180 | $(ASM) $(ASMFLAGS) $(DEBUG_ASMFLAGS) -o $@ $< |
---|
181 | |
---|
182 | # create release objects |
---|
183 | $(OBJ_DIR)/%.r.o: $(SRC_DIR3)/%.asm |
---|
184 | $(ASM) $(ASMFLAGS) $(RELEASE_ASMFLAGS) -o $@ $< |
---|
185 | |
---|
186 | # create debug objects |
---|
187 | $(OBJ_DIR)/%.d.o: $(SRC_DIR3)/%.asm |
---|
188 | $(ASM) $(ASMFLAGS) $(DEBUG_ASMFLAGS) -o $@ $< |
---|
189 | |
---|
190 | # create release objects |
---|
191 | $(OBJ_DIR)/%.r.o: $(SRC_DIR4)/%.asm |
---|
192 | $(ASM) $(ASMFLAGS) $(RELEASE_ASMFLAGS) -o $@ $< |
---|
193 | |
---|
194 | # create debug objects |
---|
195 | $(OBJ_DIR)/%.d.o: $(SRC_DIR4)/%.asm |
---|
196 | $(ASM) $(ASMFLAGS) $(DEBUG_ASMFLAGS) -o $@ $< |
---|
197 | |
---|
198 | |
---|
199 | |
---|
200 | ######################################################### |
---|
201 | # c rules |
---|
202 | ######################################################### |
---|
203 | |
---|
204 | # Generate dependency files during compilation |
---|
205 | # see also: http://make.paulandlesley.org/autodep.html |
---|
206 | # 2005-01-25 Steffen Kamp (kamp@ient.rwth-aachen.de), RWTH Aachen |
---|
207 | define COMPILE_AND_DEPEND_RELEASE |
---|
208 | $(CPP) -c -MMD -MF $(OBJ_DIR)/$*.r.d -MT $(OBJ_DIR)/$*.r.o $(CPPFLAGS) $(RELEASE_CPPFLAGS) -o $@ $(CURDIR)/$< |
---|
209 | @cp $(OBJ_DIR)/$*.r.d $(OBJ_DIR)/$*.r.P; \ |
---|
210 | sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \ |
---|
211 | -e '/^$$/ d' -e 's/$$/ :/' < $(OBJ_DIR)/$*.r.d >> $(OBJ_DIR)/$*.r.P; \ |
---|
212 | rm -f $(OBJ_DIR)/$*.r.d |
---|
213 | endef |
---|
214 | define COMPILE_AND_DEPEND_DEBUG |
---|
215 | $(CPP) -c -MMD -MF $(OBJ_DIR)/$*.d.d -MT $(OBJ_DIR)/$*.d.o $(CPPFLAGS) $(DEBUG_CPPFLAGS) -o $@ $(CURDIR)/$< |
---|
216 | @cp $(OBJ_DIR)/$*.d.d $(OBJ_DIR)/$*.d.P; \ |
---|
217 | sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \ |
---|
218 | -e '/^$$/ d' -e 's/$$/ :/' < $(OBJ_DIR)/$*.d.d >> $(OBJ_DIR)/$*.d.P; \ |
---|
219 | rm -f $(OBJ_DIR)/$*.d.d |
---|
220 | endef |
---|
221 | define COMPILE_AND_DEPEND_RELEASE_C |
---|
222 | $(CC) -c -MMD -MF $(OBJ_DIR)/$*.r.d -MT $(OBJ_DIR)/$*.r.o $(CPPFLAGS) $(RELEASE_CPPFLAGS) -o $@ $(CURDIR)/$< |
---|
223 | @cp $(OBJ_DIR)/$*.r.d $(OBJ_DIR)/$*.r.P; \ |
---|
224 | sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \ |
---|
225 | -e '/^$$/ d' -e 's/$$/ :/' < $(OBJ_DIR)/$*.r.d >> $(OBJ_DIR)/$*.r.P; \ |
---|
226 | rm -f $(OBJ_DIR)/$*.r.d |
---|
227 | endef |
---|
228 | define COMPILE_AND_DEPEND_DEBUG_C |
---|
229 | $(CC) -c -MMD -MF $(OBJ_DIR)/$*.d.d -MT $(OBJ_DIR)/$*.d.o $(CPPFLAGS) $(DEBUG_CPPFLAGS) -o $@ $(CURDIR)/$< |
---|
230 | @cp $(OBJ_DIR)/$*.d.d $(OBJ_DIR)/$*.d.P; \ |
---|
231 | sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \ |
---|
232 | -e '/^$$/ d' -e 's/$$/ :/' < $(OBJ_DIR)/$*.d.d >> $(OBJ_DIR)/$*.d.P; \ |
---|
233 | rm -f $(OBJ_DIR)/$*.d.d |
---|
234 | endef |
---|
235 | |
---|
236 | # create release objects |
---|
237 | $(OBJ_DIR)/%.r.o: $(SRC_DIR)/%.cpp |
---|
238 | $(COMPILE_AND_DEPEND_RELEASE) |
---|
239 | |
---|
240 | # create debug objects |
---|
241 | $(OBJ_DIR)/%.d.o: $(SRC_DIR)/%.cpp |
---|
242 | $(COMPILE_AND_DEPEND_DEBUG) |
---|
243 | |
---|
244 | # create release objects |
---|
245 | $(OBJ_DIR)/%.r.o: $(SRC_DIR1)/%.cpp |
---|
246 | $(COMPILE_AND_DEPEND_RELEASE) |
---|
247 | |
---|
248 | # create debug objects |
---|
249 | $(OBJ_DIR)/%.d.o: $(SRC_DIR1)/%.cpp |
---|
250 | $(COMPILE_AND_DEPEND_DEBUG) |
---|
251 | |
---|
252 | # create release objects |
---|
253 | $(OBJ_DIR)/%.r.o: $(SRC_DIR2)/%.cpp |
---|
254 | $(COMPILE_AND_DEPEND_RELEASE) |
---|
255 | |
---|
256 | # create debug objects |
---|
257 | $(OBJ_DIR)/%.d.o: $(SRC_DIR2)/%.cpp |
---|
258 | $(COMPILE_AND_DEPEND_DEBUG) |
---|
259 | |
---|
260 | # create release objects |
---|
261 | $(OBJ_DIR)/%.r.o: $(SRC_DIR3)/%.cpp |
---|
262 | $(COMPILE_AND_DEPEND_RELEASE) |
---|
263 | |
---|
264 | # create debug objects |
---|
265 | $(OBJ_DIR)/%.d.o: $(SRC_DIR3)/%.cpp |
---|
266 | $(COMPILE_AND_DEPEND_DEBUG) |
---|
267 | |
---|
268 | # create release objects |
---|
269 | $(OBJ_DIR)/%.r.o: $(SRC_DIR4)/%.cpp |
---|
270 | $(COMPILE_AND_DEPEND_RELEASE) |
---|
271 | |
---|
272 | # create debug objects |
---|
273 | $(OBJ_DIR)/%.d.o: $(SRC_DIR4)/%.cpp |
---|
274 | $(COMPILE_AND_DEPEND_DEBUG) |
---|
275 | |
---|
276 | # create release objects |
---|
277 | $(OBJ_DIR)/%.r.o: $(SRC_DIR)/%.c |
---|
278 | $(COMPILE_AND_DEPEND_RELEASE_C) |
---|
279 | |
---|
280 | # create debug objects |
---|
281 | $(OBJ_DIR)/%.d.o: $(SRC_DIR)/%.c |
---|
282 | $(COMPILE_AND_DEPEND_DEBUG_C) |
---|
283 | |
---|
284 | # create release objects |
---|
285 | $(OBJ_DIR)/%.r.o: $(SRC_DIR1)/%.c |
---|
286 | $(COMPILE_AND_DEPEND_RELEASE_C) |
---|
287 | |
---|
288 | # create debug objects |
---|
289 | $(OBJ_DIR)/%.d.o: $(SRC_DIR1)/%.c |
---|
290 | $(COMPILE_AND_DEPEND_DEBUG_C) |
---|
291 | |
---|
292 | # create release objects |
---|
293 | $(OBJ_DIR)/%.r.o: $(SRC_DIR2)/%.c |
---|
294 | $(COMPILE_AND_DEPEND_RELEASE_C) |
---|
295 | |
---|
296 | # create debug objects |
---|
297 | $(OBJ_DIR)/%.d.o: $(SRC_DIR2)/%.c |
---|
298 | $(COMPILE_AND_DEPEND_DEBUG_C) |
---|
299 | |
---|
300 | # create release objects |
---|
301 | $(OBJ_DIR)/%.r.o: $(SRC_DIR3)/%.c |
---|
302 | $(COMPILE_AND_DEPEND_RELEASE_C) |
---|
303 | |
---|
304 | # create debug objects |
---|
305 | $(OBJ_DIR)/%.d.o: $(SRC_DIR3)/%.c |
---|
306 | $(COMPILE_AND_DEPEND_DEBUG_C) |
---|
307 | |
---|
308 | # create release objects |
---|
309 | $(OBJ_DIR)/%.r.o: $(SRC_DIR4)/%.c |
---|
310 | $(COMPILE_AND_DEPEND_RELEASE_C) |
---|
311 | |
---|
312 | # create debug objects |
---|
313 | $(OBJ_DIR)/%.d.o: $(SRC_DIR4)/%.c |
---|
314 | $(COMPILE_AND_DEPEND_DEBUG_C) |
---|
315 | |
---|
316 | |
---|
317 | ######################################################### |
---|
318 | # directory settings |
---|
319 | ######################################################### |
---|
320 | |
---|
321 | ifeq ($(CONFIG), LIBRARY) |
---|
322 | # directories that have to be created for a library |
---|
323 | CHECK_DIRS = $(OBJ_DIR) $(LIB_DIR) |
---|
324 | # |
---|
325 | else |
---|
326 | ifeq ($(CONFIG), CONSOLE) |
---|
327 | # directories that have to be created for console and MFC |
---|
328 | CHECK_DIRS = $(OBJ_DIR) $(BIN_DIR) |
---|
329 | # |
---|
330 | endif |
---|
331 | endif |
---|
332 | |
---|
333 | |
---|
334 | ######################################################### |
---|
335 | # targets |
---|
336 | ######################################################### |
---|
337 | |
---|
338 | all: check_errors debug release |
---|
339 | |
---|
340 | debug: check_errors \ |
---|
341 | $(CHECK_DIRS) \ |
---|
342 | $(STAT_DEBUG_OUT) |
---|
343 | |
---|
344 | release: check_errors \ |
---|
345 | $(CHECK_DIRS) \ |
---|
346 | $(STAT_RELEASE_OUT) |
---|
347 | |
---|
348 | |
---|
349 | #all: check_errors debug release |
---|
350 | # |
---|
351 | #debug: check_errors \ |
---|
352 | # $(CHECK_DIRS) \ |
---|
353 | # $(DYN_DEBUG_OUT) \ |
---|
354 | # $(STAT_DEBUG_OUT) |
---|
355 | # |
---|
356 | #release: check_errors \ |
---|
357 | # $(CHECK_DIRS) \ |
---|
358 | # $(DYN_RELEASE_OUT) \ |
---|
359 | # $(STAT_RELEASE_OUT) |
---|
360 | # |
---|
361 | #stat_debug: check_errors \ |
---|
362 | # $(CHECK_DIRS) \ |
---|
363 | # $(STAT_DEBUG_OUT) |
---|
364 | # |
---|
365 | #dyn_debug: check_errors \ |
---|
366 | # $(CHECK_DIRS) \ |
---|
367 | # $(DYN_DEBUG_OUT) |
---|
368 | # |
---|
369 | #stat_release: check_errors \ |
---|
370 | # $(CHECK_DIRS) \ |
---|
371 | # $(STAT_RELEASE_OUT) |
---|
372 | # |
---|
373 | #dyn_release: check_errors \ |
---|
374 | # $(CHECK_DIRS) \ |
---|
375 | # $(DYN_RELEASE_OUT) |
---|
376 | |
---|
377 | ########################################################## |
---|
378 | # check for errors |
---|
379 | ########################################################## |
---|
380 | check_errors: |
---|
381 | @if [ "$(CONFIG_ERR)" = "TRUE" ]; then\ |
---|
382 | echo "Wrong CONFIG parameter specified: $(CONFIG)";\ |
---|
383 | false;\ |
---|
384 | fi |
---|
385 | |
---|
386 | |
---|
387 | ########################################################## |
---|
388 | # create directories |
---|
389 | ########################################################## |
---|
390 | |
---|
391 | $(OBJ_DIR): |
---|
392 | @if [ ! -d $(OBJ_DIR) ]; then\ |
---|
393 | mkdir $(OBJ_DIR);\ |
---|
394 | fi |
---|
395 | |
---|
396 | $(LIB_DIR): |
---|
397 | @if [ ! -d $(LIB_DIR) ]; then\ |
---|
398 | mkdir $(LIB_DIR);\ |
---|
399 | fi |
---|
400 | |
---|
401 | $(BIN_DIR): |
---|
402 | @if [ ! -d $(BIN_DIR) ]; then\ |
---|
403 | mkdir $(BIN_DIR);\ |
---|
404 | fi |
---|
405 | |
---|
406 | |
---|
407 | |
---|
408 | ########################################################## |
---|
409 | # create output files |
---|
410 | ########################################################## |
---|
411 | |
---|
412 | ifeq ($(CONFIG), LIBRARY) |
---|
413 | # |
---|
414 | # create static debug out |
---|
415 | $(STAT_DEBUG_OUT): $(DEBUG_OBJS) |
---|
416 | $(AR) -crs $@ $(DEBUG_OBJS) |
---|
417 | # |
---|
418 | # |
---|
419 | # create release debug out |
---|
420 | $(STAT_RELEASE_OUT): $(RELEASE_OBJS) |
---|
421 | $(AR) -crs $@ $(RELEASE_OBJS) |
---|
422 | # |
---|
423 | # |
---|
424 | # create dynamic debug out |
---|
425 | $(DYN_DEBUG_OUT): $(DYN_DEBUG_OUT).$(VER) |
---|
426 | ln -fs lib$(PRJ_NAME)d.so.$(VER) $@ |
---|
427 | # |
---|
428 | # create dynamic debug out |
---|
429 | $(DYN_DEBUG_OUT).$(VER): $(DEBUG_OBJS) |
---|
430 | $(LD) $(LDFLAGS) $(DEBUG_LDFLAGS) -o $@ $(DEBUG_OBJS) -L$(LIB_DIR) $(USER_LIB_DIRS) $(LIBS) $(DEBUG_LIBS) $(DYN_LIBS) $(DYN_DEBUG_LIBS) |
---|
431 | # |
---|
432 | # |
---|
433 | # create dynamic release out |
---|
434 | $(DYN_RELEASE_OUT): $(DYN_RELEASE_OUT).$(VER) |
---|
435 | ln -fs lib$(PRJ_NAME).so.$(VER) $@ |
---|
436 | # |
---|
437 | # create dynamic release out |
---|
438 | $(DYN_RELEASE_OUT).$(VER): $(RELEASE_OBJS) |
---|
439 | $(LD) $(LDFLAGS) $(RELEASE_LDFLAGS) -o $@ $(RELEASE_OBJS) -L$(LIB_DIR) $(USER_LIB_DIRS) $(LIBS) $(RELEASE_LIBS) $(DYN_LIBS) $(DYN_RELEASE_LIBS) |
---|
440 | # |
---|
441 | # |
---|
442 | # |
---|
443 | # |
---|
444 | # |
---|
445 | else |
---|
446 | ifeq ($(CONFIG), CONSOLE) |
---|
447 | # |
---|
448 | # added linked libraries to target prerequisites - $(*_PREREQS) variables - to force relinking when libraries have been rebuilt |
---|
449 | # 2005-01-25 Steffen Kamp (kamp@ient.rwth-aachen.de), RWTH Aachen |
---|
450 | # |
---|
451 | # create static debug out |
---|
452 | $(STAT_DEBUG_OUT): $(DEBUG_OBJS) $(STAT_DEBUG_PREREQS) |
---|
453 | $(LD) -o $@ $(LDFLAGS) $(DEBUG_LDFLAGS) $(DEBUG_OBJS) -L$(LIB_DIR) $(USER_LIB_DIRS) $(LIBS) $(DEBUG_LIBS) $(STAT_LIBS) $(STAT_DEBUG_LIBS) |
---|
454 | # |
---|
455 | # |
---|
456 | # create static release out |
---|
457 | $(STAT_RELEASE_OUT): $(RELEASE_OBJS) $(STAT_RELEASE_PREREQS) |
---|
458 | $(LD) -o $@ $(LDFLAGS) $(RELEASE_LDFLAGS) $(RELEASE_OBJS) -L$(LIB_DIR) $(USER_LIB_DIRS) $(LIBS) $(RELEASE_LIBS) $(STAT_LIBS) $(STAT_RELEASE_LIBS) |
---|
459 | # |
---|
460 | # |
---|
461 | # create dynamic debug out |
---|
462 | $(DYN_DEBUG_OUT): $(DEBUG_OBJS) $(DYN_DEBUG_PREREQS) |
---|
463 | $(LD) -o $@ $(LDFLAGS) $(DEBUG_LDFLAGS) $(DEBUG_OBJS) -L$(LIB_DIR) $(USER_LIB_DIRS) $(LIBS) $(DEBUG_LIBS) $(DYN_LIBS) $(DYN_DEBUG_LIBS) |
---|
464 | # |
---|
465 | # |
---|
466 | # create dynamic release out |
---|
467 | $(DYN_RELEASE_OUT): $(RELEASE_OBJS) $(DYN_RELEASE_PREREQS) |
---|
468 | $(LD) -o $@ $(LDFLAGS) $(RELEASE_LDFLAGS) $(RELEASE_OBJS) -L$(LIB_DIR) $(USER_LIB_DIRS) $(LIBS) $(RELEASE_LIBS) $(DYN_LIBS) $(DYN_RELEASE_LIBS) |
---|
469 | # |
---|
470 | # |
---|
471 | endif |
---|
472 | endif |
---|
473 | |
---|
474 | ########################################################## |
---|
475 | # delete all produced files |
---|
476 | ########################################################## |
---|
477 | |
---|
478 | clean: |
---|
479 | /bin/rm -rf $(STAT_DEBUG_OUT) |
---|
480 | /bin/rm -rf $(STAT_RELEASE_OUT) |
---|
481 | /bin/rm -rf $(DYN_DEBUG_OUT) |
---|
482 | /bin/rm -rf $(DYN_RELEASE_OUT) |
---|
483 | /bin/rm -rf $(OBJ_DIR) |
---|
484 | |
---|
485 | ifeq ($(CONFIG), LIBRARY) |
---|
486 | /bin/rm -rf $(DYN_DEBUG_OUT).$(VER) |
---|
487 | /bin/rm -rf $(DYN_RELEASE_OUT).$(VER) |
---|
488 | endif |
---|
489 | |
---|
490 | |
---|
491 | ########################################################## |
---|
492 | # include dependency files |
---|
493 | ########################################################## |
---|
494 | |
---|
495 | -include $(OBJS:.o=.d.P) |
---|
496 | -include $(OBJS:.o=.r.P) |
---|