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