FreeCalypso > hg > tcs211-l1-reconst
comparison gpf/MISC/makefile @ 0:509db1a7b7b8
initial import: leo2moko-r1
author | Space Falcon <falcon@ivan.Harhan.ORG> |
---|---|
date | Mon, 01 Jun 2015 03:24:05 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:509db1a7b7b8 |
---|---|
1 ####################### Makefile for GNU make ##################### | |
2 # | |
3 # makefile to build misc.lib | |
4 # | |
5 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
6 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
7 # | |
8 # targets: | |
9 # | |
10 # misc.lib functions which belong neither to frame nor to tif, somehow old files | |
11 # clean delete temp files | |
12 # | |
13 ####################################################################### | |
14 | |
15 OWN_MAKELEVEL=0 | |
16 | |
17 | |
18 VPATH=$(OBJDIR) | |
19 | |
20 #---------- Directories | |
21 | |
22 ifeq ($(TARGET), nuc) | |
23 ifeq ($(RUN_FLASH), 1) | |
24 SECTION:=/fl | |
25 endif | |
26 | |
27 ifeq ($(RUN_INT_RAM), 1) | |
28 SECTION:=/ir | |
29 endif | |
30 else | |
31 SECTION:= | |
32 endif | |
33 | |
34 ifdef TOOL_CHOICE | |
35 TS:=/ts$(TOOL_CHOICE) | |
36 tsTail :=_ts$(TOOL_CHOICE) | |
37 else | |
38 TS:= | |
39 endif | |
40 | |
41 ifdef PATH_CC_1_22E | |
42 PATH:=$(PATH_CC_1_22E);$(PATH) | |
43 C_DIR:=$(PATH_CC_1_22E) | |
44 endif | |
45 | |
46 ifeq ($(TOOL_CHOICE), 3) | |
47 COPTS= --align_structs=4 -pden -o -q | |
48 ifndef PATH_CC_2_54 | |
49 PATH_CC_2_54=C:/Dvpt_tools/Codegen/TMS4701x_2.54 | |
50 C_DIR=PATH_CC_2_54 | |
51 endif | |
52 Path:=$(PATH_CC_2_54)/bin;$(Path) | |
53 INCLUDES += -I"$(PATH_CC_2_54)/include" | |
54 endif | |
55 | |
56 ifeq ($(TOOL_CHOICE), 5) | |
57 COPTS= --align_structs=4 -pden -o -q | |
58 ifndef PATH_CC_2_55 | |
59 PATH_CC_2_55=C:\Dvpt_tools\Codegen\TMS4701x_2.55 | |
60 # C_DIR=PATH_CC_2_55 | |
61 endif | |
62 Path:=$(PATH_CC_2_55)/bin;$(Path) | |
63 INCLUDES += -I"$(PATH_CC_2_55)/include" | |
64 endif | |
65 | |
66 ifeq ($(TOOL_CHOICE), 6) | |
67 # --code_state=16 => -mt | |
68 # --endian=little => -me | |
69 # what is -ml? | |
70 COPTS= -mv=5e --abi=ti_arm9_abi | |
71 COPTS+= -pden -pdv -mf -ms -qq -disable_branch_chaining -pi | |
72 COPTS+= -O=2 | |
73 ifndef PATH_CC_4_11 | |
74 PATH_CC_4_11=C:\Dvpt_tools\Codegen\TMS4701x_4.11 | |
75 # C_DIR=PATH_CC_4_11 | |
76 endif | |
77 Path:=$(PATH_CC_4_11)/bin;$(Path) | |
78 INCLUDES += -I"$(PATH_CC_4_11)/include" | |
79 endif | |
80 | |
81 ifeq "$(CLEARCASE_PRIMARY_GROUP)" "" | |
82 CLRCAS=0 | |
83 else | |
84 ifeq "$(IN_VOB)" "FALSE" | |
85 CLRCAS=0 | |
86 else | |
87 CLRCAS=1 | |
88 endif | |
89 endif | |
90 | |
91 ifeq ($(CLRCAS), 1) | |
92 CHECKOUT = -cleartool co -nc | |
93 CHECKIN = -cleartool ci -nc | |
94 else | |
95 CHECKOUT = attrib -r | |
96 CHECKIN = attrib +r | |
97 endif | |
98 | |
99 # for created object files | |
100 # general directories | |
101 GPFDIR=.. | |
102 INCDIR=../inc | |
103 ifeq ($(TARGET), nuc) | |
104 OBJDIR=obj/$(TARGET)/$(PLATFORM)$(DB)$(PS)$(SECTION)$(TS) | |
105 else | |
106 OBJDIR=obj/$(TARGET)$(DB)$(PS) | |
107 endif | |
108 | |
109 # for stack calculation | |
110 GAWK=../tools/bin/gawk.exe | |
111 AWK_PROG=../BIN/cg$(tTail).awk | |
112 | |
113 # Lint | |
114 LINT=lint-nt.exe | |
115 LINT_INC=-i/gpf/template/lint/ | |
116 LINT_OPT_FILE=/gpf/template/lint/options.lnt | |
117 | |
118 # for created libraries | |
119 ifeq ($(TARGET), win32) | |
120 LIBDIR=../LIB/WIN32$(DEBUGDIR) | |
121 BINDIR=../BIN$(DEBUGDIR) | |
122 else | |
123 LIBDIR=../LIB | |
124 endif | |
125 | |
126 #-------------------------globaly exported header files | |
127 INC_FILES=Tools.h | |
128 | |
129 #-------------------------Suffixes for the name of the output file | |
130 #---------e.g. misc_tr_db.lib | |
131 | |
132 ifeq ($(RUN_FLASH), 1) | |
133 flTail :=_fl | |
134 else | |
135 flTail:= | |
136 endif | |
137 | |
138 ifeq ($(RUN_INT_RAM), 1) | |
139 irTail :=_ir | |
140 else | |
141 irTail:= | |
142 endif | |
143 | |
144 ifeq ($(TARGET), nuc) | |
145 ifeq ($(PLATFORM), arm7) | |
146 tTail :=_na7 | |
147 else | |
148 ifeq ($(PLATFORM), arm9) | |
149 tTail :=_na9 | |
150 else | |
151 ifeq ($(PLATFORM), pc) | |
152 tTail :=_npc | |
153 endif | |
154 endif | |
155 endif | |
156 else | |
157 ifeq ($(TARGET), nuc_ARM) | |
158 tTail :=_ar | |
159 else | |
160 ifeq ($(TARGET), win32) | |
161 tTail := | |
162 else | |
163 ifeq ($(TARGET), psos) | |
164 tTail :=_po | |
165 else | |
166 ifeq ($(TARGET), vxworks) | |
167 tTail :=_vx | |
168 ifeq ($(TOOL), gnu) | |
169 tlTail :=_gn | |
170 else | |
171 tlTail :=_di | |
172 endif | |
173 ifeq ($(CPU), PPC603) | |
174 cpTail :=_pp | |
175 endif | |
176 else | |
177 ifeq ($(TARGET), linuxpc) | |
178 tTail :=_lpc | |
179 OSENV=sus | |
180 NO_LINT=1 | |
181 else | |
182 ifeq ($(TARGET), rtlpc) | |
183 tTail :=_rlp | |
184 OSENV=sus | |
185 NO_LINT=1 | |
186 RTL_VERSION=2.0 | |
187 RTL_DIR=/opt/rtldk-$(RTL_VERSION)/rtlinuxpro | |
188 include $(RTL_DIR)/rtl.mk | |
189 else | |
190 ifeq ($(TARGET), linuxarm) | |
191 tTail :=_la9 | |
192 OSENV=sus | |
193 NO_LINT=1 | |
194 else | |
195 ifeq ($(TARGET), solsparc) | |
196 tTail :=_ssp | |
197 OSENV=sus | |
198 NO_LINT=1 | |
199 endif | |
200 endif | |
201 endif | |
202 endif | |
203 endif | |
204 endif | |
205 endif | |
206 endif | |
207 endif | |
208 | |
209 ifeq ($(DEBUG), 1) | |
210 DB=/db | |
211 ifeq ($(TARGET), win32) | |
212 DEBUGDIR=/debug | |
213 dbTail := | |
214 else | |
215 dbTail :=_db | |
216 endif | |
217 else | |
218 dbTail:= | |
219 DB= | |
220 endif | |
221 | |
222 XXX:=$(tTail)$(tlTail)$(cpTail)$(dbTail)$(irTail)$(flTail)$(tsTail) | |
223 | |
224 _MISC_OBJS=printtofile.$(OBJTAIL) tok.$(OBJTAIL) tools.$(OBJTAIL) misc_version.$(OBJTAIL) | |
225 | |
226 ifeq ($(OSENV), sus) | |
227 MKDIR = mkdir | |
228 else | |
229 MKDIR = gmkdir | |
230 endif | |
231 COPY = cp | |
232 CLEARTOOL = cleartool | |
233 ECHO = @echo | |
234 | |
235 #---------- Special settings for each target: for Nucleus | |
236 ifeq ($(TARGET), nuc) | |
237 ifeq ($(PLATFORM), arm7) | |
238 | |
239 ifeq ($(TOOL_CHOICE), ) | |
240 COPTS+= -mw -x -pw2 -q -o | |
241 endif | |
242 | |
243 CC=cl470 | |
244 COPTS+= -me -mt | |
245 | |
246 ifeq ($(DEBUG), 1) | |
247 ifeq ($(TOOL_CHOICE), ) | |
248 COPTS += -g | |
249 else | |
250 COPTS += -gt | |
251 endif | |
252 COPTS += -mn | |
253 endif | |
254 | |
255 ifeq ($(ASM_ONLY), 1) | |
256 COPTS+= -q -n -x0 -fs $(OBJDIR) | |
257 MKLIB = $(GAWK) -f $(AWK_PROG) > $(MISC_LIB) | |
258 OBJTAIL = asm | |
259 MISC_LIB = $(OBJDIR)/misc$(XXX).pa | |
260 else | |
261 OBJTAIL = obj | |
262 MKLIB=ar470 $(LFLAGS) | |
263 MISC_LIB=$(LIBDIR)/misc$(XXX).$(LIBEXT) | |
264 LINT_OPTS = $(LINT_INC) -I"$(subst \,/,$(C_DIR))" -u $(LINT_OPT_FILE) | |
265 | |
266 endif | |
267 | |
268 COPTS += -fr $(OBJDIR) -c | |
269 | |
270 ifeq ($(RUN_INT_RAM), 1) | |
271 COPTS += -dRUN_INT_RAM | |
272 endif | |
273 | |
274 ifeq ($(RUN_FLASH), 1) | |
275 COPTS += -dRUN_FLASH | |
276 endif | |
277 | |
278 INCLUDES+= -I"." -I"..\inc\NUC" -I"..\inc\NUC\ARM7" -I"..\inc" | |
279 | |
280 DEFINES += -d_TARGET_ -d_NUCLEUS_ | |
281 COPTSNF = $(COPTS) $(DEFINES) $(INCLUDES) | |
282 INCLUDELIST=$(subst /I ,-I,$(INCLUDES)) # because of CDGINCDIR above | |
283 DEFINELIST=$(subst -d,-D,$(DEFINES)) | |
284 COMMLFLAGS = -rq $@ # only one command is allowed and it is "r" for replace | |
285 LFLAGS=$(COMMLFLAGS) | |
286 LIBEXT=lib | |
287 | |
288 clean: | |
289 @$(RM) obj/$(TARGET)/$(PLATFORM)$(DB)$(SECTION)$(TS)/*.$(OBJTAIL) | |
290 @$(RM) $(MISC_LIB) | |
291 | |
292 endif | |
293 endif # nucleus & arm7 | |
294 | |
295 ifeq ($(TARGET), nuc) | |
296 ifeq ($(PLATFORM), arm9) | |
297 | |
298 CC=cl470 | |
299 | |
300 COPTS+= -me -mt | |
301 | |
302 ifeq ($(DEBUG), 1) | |
303 ifeq ($(TOOL_CHOICE), 6) | |
304 COPTS += --symdebug:coff | |
305 else | |
306 # toolset 3 and 5 | |
307 COPTS += -gt | |
308 endif | |
309 COPTS += -mn | |
310 endif | |
311 | |
312 LINT_OPTS = $(LINT_INC) -I"$(subst \,/,$(C_DIR))" -u $(LINT_OPT_FILE) | |
313 | |
314 COPTS += -fr $(OBJDIR) -c | |
315 | |
316 ifeq ($(RUN_INT_RAM), 1) | |
317 COPTS += -dRUN_INT_RAM | |
318 endif | |
319 | |
320 ifeq ($(RUN_FLASH), 1) | |
321 COPTS += -dRUN_FLASH | |
322 endif | |
323 | |
324 INCLUDES+= -I"." -I"..\INC\NUC" -I"..\INC\NUC\ARM9" -I"..\INC" | |
325 MKLIB=ar470 $(LFLAGS) | |
326 | |
327 DEFINES += -d_TARGET_ -d_NUCLEUS_ | |
328 COPTSNF = $(COPTS) $(DEFINES) $(INCLUDES) | |
329 INCLUDELIST=$(subst /I ,-I,$(INCLUDES)) # because of CDGINCDIR above | |
330 DEFINELIST=$(subst -d,-D,$(DEFINES)) | |
331 COMMLFLAGS = -rq $@ # only one command is allowed and it is "r" for replace | |
332 LFLAGS=$(COMMLFLAGS) | |
333 LIBEXT=lib | |
334 OBJTAIL=obj | |
335 MISC_LIB=$(LIBDIR)/misc$(XXX).$(LIBEXT) | |
336 | |
337 clean: | |
338 @$(RM) obj/$(TARGET)/$(PLATFORM)$(DB)$(SECTION)$(TS)/*.$(OBJTAIL) | |
339 @$(RM) $(MISC_LIB) | |
340 | |
341 endif | |
342 endif # nucleus & arm9 | |
343 | |
344 | |
345 #---------- Special settings for each target: for Nucleus_ARM | |
346 ifeq ($(TARGET), nuc_ARM) | |
347 | |
348 CC=perl "\G23M\Condat\INT\BIN\gti_compile.pl" | |
349 COPTS= -me -mt -pw2 -q -x -mw -o # from condat_env.mak and os.mak for nucleus.lib | |
350 | |
351 ifeq ($(DEBUG), 1) | |
352 COPTS += -g -mn | |
353 endif | |
354 COPTS += -fr $(OBJDIR) -fo $(OBJDIR)/$@ -c | |
355 | |
356 | |
357 #new INCLUDES+= -I"..\inc\NUC" -I"..\inc\NUC\ARM7" -I"..\inc" | |
358 INCLUDES+= -I"..\inc\NUC" -I"..\inc" | |
359 DEFINES += -d_TARGET_ -d_NUCLEUS_ | |
360 COPTSNF = $(COPTS) $(DEFINES) $(INCLUDES) | |
361 INCLUDELIST=$(subst /I ,-I,$(INCLUDES)) # because of CDGINCDIR above | |
362 DEFINELIST=$(subst -d,-D,$(DEFINES)) | |
363 | |
364 COMMLFLAGS = -rq $@ # only one command is allowed and it is "r" for replace | |
365 LFLAGS=$(COMMLFLAGS) | |
366 MKLIB=perl "\G23M\Condat\INT\BIN\gti_archive.pl" $(LFLAGS) | |
367 LIBEXT=lib | |
368 OBJTAIL=obj | |
369 MISC_LIB=$(LIBDIR)/misc$(XXX).$(LIBEXT) | |
370 | |
371 clean: | |
372 @$(RM) obj/$(TARGET)$(DB)/*.$(OBJTAIL) | |
373 @$(RM) $(MISC_LIB) | |
374 | |
375 endif # target: nucleus_ARM | |
376 | |
377 | |
378 #---------- Special settings for each target: for NucWin | |
379 ifeq ($(TARGET), nuc) | |
380 ifeq ($(PLATFORM), pc) | |
381 | |
382 CC=cl | |
383 COPTS += /c /nologo /W3 /GX /Zp1 /GZ | |
384 | |
385 ifeq ($(DEBUG), 1) | |
386 COPTS += /MD /DEBUG /Z7 | |
387 DEFINES += -D"_DEBUG" | |
388 else | |
389 COPTS += /MT | |
390 endif | |
391 | |
392 COPTS += /FR"..\temp\nucwin" /Fd"..\temp\nucwin" /Fo./$(OBJDIR)/ | |
393 | |
394 INCLUDES += -I"..\inc\NUC" -I"..\inc\NUC\PC" -I"..\inc" \ | |
395 -I"$(GSMDIR)\CDGINC\cdginc_fd" | |
396 | |
397 DEFINES += -D"_NUCLEUS_" | |
398 COPTSNF = $(COPTS) $(DEFINES) $(INCLUDES) | |
399 LINT_OPT_FILE += co-msc50.lnt | |
400 LINT_OPTS = $(LINT_INC) -D_M_IX86 -I"NUC" -u $(LINT_OPT_FILE) | |
401 INCLUDELIST=$(subst /I ,-I,$(INCLUDES)) | |
402 DEFINELIST=$(subst /D ,-D,$(DEFINES)) | |
403 COMMLFLAGS = /nologo /subsystem:console /machine:I386 | |
404 | |
405 LFLAGS=$(COMMLFLAGS) | |
406 MKLIB=LIB /out:$@ $(LFLAGS) | |
407 LIBEXT=lib | |
408 OBJTAIL=obj | |
409 MISC_LIB=$(LIBDIR)/misc$(XXX).$(LIBEXT) | |
410 | |
411 clean: | |
412 @$(RM) obj/$(TARGET)/$(PLATFORM)$(DB)/*.$(OBJTAIL) | |
413 @$(RM) $(MISC_LIB) | |
414 | |
415 endif | |
416 endif # nucleus & pc | |
417 | |
418 | |
419 | |
420 #---------- Special settings for each target: for Win32 | |
421 ifeq ($(TARGET), win32) | |
422 | |
423 FRAMEXXX:=$(tTail)$(trTail)$(rtTail)$(dbTail)$(msTail) | |
424 CC=cl | |
425 COPTS += /c /nologo /W3 /GX /Zp1 /GZ | |
426 | |
427 COPTS += /FR"..\temp\win32" /Fd"..\temp\win32" /Fo./$(OBJDIR)/ | |
428 | |
429 INCLUDES += -I"..\inc\WIN32" -I"..\inc" | |
430 | |
431 INCLUDES += -I"..\lib\win32" | |
432 | |
433 LINT_OPT_FILE += co-msc50.lnt | |
434 LINT_OPTS = $(LINT_INC) -D_WIN32 -D_M_IX86 -D_MSC_VER -I"WIN32" -u $(LINT_OPT_FILE) | |
435 | |
436 DLLFLAGS= /dll /implib:"$(LIBDIR)/misc$(XXX).lib" /def:"misc.def" | |
437 | |
438 COMMLFLAGS = $(DLLFLAGS) | |
439 COMMLFLAGS += /nologo | |
440 | |
441 ifeq ($(DEBUG), 1) | |
442 DEFINES += -D"_DEBUG" | |
443 COPTS += /DEBUG /MDd /Zi | |
444 COMMLFLAGS += /DEBUG /incremental:no /pdb:none | |
445 else | |
446 COPTS += /MD | |
447 endif | |
448 | |
449 DEFINES += -D"_TOOLS_" | |
450 COPTSNF = $(COPTS) $(DEFINES) $(INCLUDES) | |
451 INCLUDELIST=$(subst /I ,-I,$(INCLUDES)) | |
452 DEFINELIST=$(subst /D ,-D,$(DEFINES)) | |
453 | |
454 LFLAGS=$(COMMLFLAGS) | |
455 MKLIB=link.exe /out:$@ $(LFLAGS) | |
456 LIBEXT = dll | |
457 OBJTAIL=obj | |
458 IMPLIB=$(LIBDIR)/misc$(XXX).lib | |
459 MISC_LIB=$(BINDIR)/misc$(XXX).$(LIBEXT) | |
460 | |
461 | |
462 clean: | |
463 $(RM) $(OBJDIR)/*.$(OBJTAIL) | |
464 $(RM) $(IMPLIB) $(MISC_LIB) | |
465 | |
466 | |
467 endif # target: win32 | |
468 | |
469 | |
470 | |
471 #---------- Special settings for each target: for pSOS+ | |
472 ifeq ($(TARGET), psos) | |
473 | |
474 CC=cc386 | |
475 COPTS_FILE:=c.opt | |
476 | |
477 -include $(PSS_BSP)/bsp.mk# board support settings e.g. MODEL, FPU | |
478 | |
479 ifeq ( FPU,H ) | |
480 FPUOPT = -VNDP | |
481 else | |
482 FPUOPT= | |
483 endif | |
484 | |
485 COPTS1 = -c -V$(MODEL) -VROM -VBSS -VANSI -VLONGNAME -VSPROTO -VQUIET -VDIAGNOSTICS | |
486 COPTS2 = $(FPUOPT) | |
487 COPTS3 = -I. -I$(PSS_ROOT)/include -I$(PSS_BSP) | |
488 COPTS4 = -I./ -I../inc/ -I../inc/psos/ | |
489 COPTS5 = -DMODEL=$(MODEL) -VNOSIGNEDCHAR -D__CADUL__=1 -DPSOS=1 -D_PSOS_ | |
490 | |
491 ifeq ($(DEBUG), 1) | |
492 COPTS5 += -VXDB | |
493 endif | |
494 | |
495 | |
496 COPTS = @c.opt | |
497 COPTS += -o $(OBJDIR)/$@ | |
498 COPTSNF = $(COPTS) | |
499 LIBEXT = lib | |
500 OBJTAIL=obj | |
501 MKLIB= lib386 $@ # psos related libs will not be included here | |
502 MISC_LIB=$(LIBDIR)/misc$(XXX).$(LIBEXT) | |
503 | |
504 c.opt: makefile | |
505 @echo $(COPTS1) > c.opt | |
506 @echo $(COPTS2) >> c.opt | |
507 @echo $(COPTS3) >> c.opt | |
508 @echo $(COPTS4) >> c.opt | |
509 @echo $(COPTS5) >> c.opt | |
510 | |
511 clean: | |
512 @$(RM) obj/$(TARGET)$(DB)/*.$(OBJTAIL) | |
513 @$(RM) $(MISC_LIB) | |
514 @$(RM) *.opt | |
515 | |
516 endif # target: psos | |
517 | |
518 #---------- Special settings for each target: for VxWorks GNU | |
519 ifeq ($(TARGET), vxworks) | |
520 | |
521 CC = ccppc | |
522 | |
523 ifeq ($(DEBUG), 1) | |
524 COPTSNF = -g | |
525 else | |
526 COPTSNF = -O2 | |
527 endif | |
528 COPTSNF += -c -mstrict-align -ansi -nostdinc -DRW_MULTI_THREAD -D_REENTRANT \ | |
529 -fvolatile -fno-builtin -fno-for-scope -DCPU=$(CPU) \ | |
530 -I$(WIND_BASE)/target/h -I. -I../inc -I../inc/$(TARGET) \ | |
531 -D_VXWORKS_ | |
532 | |
533 COPTSNF += -o $(OBJDIR)/$@ | |
534 LIBEXT = a | |
535 OBJTAIL=obj | |
536 MISC_LIB = $(LIBDIR)/misc$(XXX).$(LIBEXT) | |
537 MKLIB = arppc crus $(MISC_LIB) | |
538 | |
539 clean: | |
540 @$(RM) obj/$(TARGET)$(DB)/*.$(OBJTAIL) | |
541 @$(RM) $(MISC_LIB) | |
542 | |
543 endif | |
544 # target: vxworks | |
545 | |
546 #---------- Special settings sus environment | |
547 ifeq ($(OSENV), sus) | |
548 COPTS += -c -o$(OBJDIR)/$@ | |
549 INCLUDES += -I../inc/$(OSENV) -I../inc -I../FRAME -I../FRAME/$(OSENV) -I. | |
550 INCLUDES += -I../CCD | |
551 ifeq ($(MEMSUPER), 2) | |
552 DEFINES += -DMEMORY_SUPERVISION -DOPTIMIZE_POOL | |
553 endif | |
554 ifeq ($(MEMSUPER), 1) | |
555 DEFINES += -DMEMORY_SUPERVISION | |
556 endif | |
557 # the following should be adapted for other unix-like systems | |
558 | |
559 DEFINES += -DSHARED_VSI -DNEW_FRAME | |
560 OBJTAIL = o | |
561 LIBEXT= a | |
562 ifeq ($(TARGET), rtlpc) | |
563 DEFINES += -D_LINUX_ | |
564 COPTSNF = $(CFLAGS) | |
565 MKLIB= i386-linux-ar ruv $@ | |
566 RANLIB= i386-linux-ranlib | |
567 DEFINES += -D_RT_LINUX_ | |
568 else | |
569 ifeq ($(TARGET), linuxarm) | |
570 DEFINES += -D_LINUX_ | |
571 CC=arm-linux-gcc | |
572 MKLIB= arm-linux-ar ruv $@ | |
573 RANLIB= arm-linux-ranlib | |
574 DEFINES += -DGSP_TARGET | |
575 else | |
576 ifeq ($(TARGET), solsparc) | |
577 DEFINES += -D_SOLARIS_ | |
578 CC=gcc | |
579 MKLIB= ar ruv $@ | |
580 RANLIB= ranlib | |
581 else | |
582 DEFINES += -D_LINUX_ | |
583 CC=gcc | |
584 MKLIB= ar ruv $@ | |
585 RANLIB= ranlib | |
586 endif | |
587 endif | |
588 endif | |
589 COPTSNF += $(COPTS) $(DEFINES) $(INCLUDES) | |
590 MISC_LIB = $(LIBDIR)/libmisc$(XXX).$(LIBEXT) | |
591 MKLIB= ar ruv $@ | |
592 clean: | |
593 @$(RM) obj/$(TARGET)$(DB)/*.$(OBJTAIL) | |
594 @$(RM) $(MISC_LIB) | |
595 endif | |
596 | |
597 ######################### misc.lib ################################## | |
598 | |
599 MISC_OBJS=$(patsubst %.$(OBJTAIL),$(OBJDIR)/%.$(OBJTAIL),$(_MISC_OBJS)) | |
600 | |
601 asm: $(MISC_LIB) $(OBJDIR) | |
602 | |
603 misc.$(LIBEXT): $(MISC_LIB) | |
604 | |
605 $(OBJDIR) : | |
606 $(MKDIR) -p $(OBJDIR) | |
607 | |
608 $(MISC_LIB) : $(OBJDIR) $(COPTS_FILE) $(_MISC_OBJS) makefile | |
609 # OWN_MAKELEVEL == 0 if makefile called directly, == 1 if nested | |
610 ifneq ($(OWN_MAKELEVEL), 0) | |
611 @echo checking out and touching using $(MAKE) | |
612 $(CHECKOUT) $@ $(IMPLIB) | |
613 touch -c $@ $(IMPLIB) | |
614 else | |
615 gnumake MAKE=gnumake OWN_MAKELEVEL=1 $(subst \,/,$@ $<) | |
616 @echo proceeding using $(MAKE) | |
617 $(MKLIB) $(MISC_OBJS) | |
618 ifeq ($(OSENV), sus) | |
619 $(RANLIB) $@ | |
620 endif | |
621 endif | |
622 | |
623 $(_MISC_OBJS): %.$(OBJTAIL): %.c | |
624 $(RM) $(OBJDIR)/misc_version.$(OBJTAIL) | |
625 ifneq ($(NO_LINT), 1) | |
626 $(LINT) $(LINT_OPTS) $(DEFINES) $(INCLUDES) $< | |
627 endif | |
628 $(CC) $(COPTSNF) $< | |
629 | |
630 SRCFILES=$(patsubst %.$(OBJTAIL),%.c,$(_MISC_OBJS)) | |
631 MISC_DEP=dep_misc_$(PROJECT)$(XXX).mk | |
632 | |
633 help: | |
634 $(ECHO) usage... | |
635 $(ECHO) building: | |
636 $(ECHO) "gnumake [DEBUG={1|0}] [ROUTING={1|0}] [MEMSUPER={1|0}] ..." | |
637 $(ECHO) cleaning: | |
638 $(ECHO) "gnumake clean [DEBUG={1|0}] [ROUTING={1|0}] [MEMSUPER={1|0}] ..." | |
639 $(ECHO) ClearCase: | |
640 $(ECHO) "gnumake checkin - not implemeted yet -" | |
641 $(ECHO) "gnumake label LABEL=<label type> [FLOAT={1|0}] [DEBUG={1|0}] [ROUTING={1|0}] " | |
642 $(ECHO) " [MEMSUPER={1|0}] ..." | |
643 $(ECHO) help: | |
644 $(ECHO) "gnumake help" | |
645 | |
646 DEPEND_DIRS=$(GPFDIR) $(LIBDIR) $(BINDIR) $(INCDIR) | |
647 EXPORT_FILES=$(IMPLIB) $(MISC_LIB) | |
648 INCLUDE_FILES=$(patsubst %,../inc/%,$(INC_FILES)) | |
649 | |
650 label: | |
651 -$(CLEARTOOL) mklabel -recurse $(REPLACE) $(LABEL) . 2>> error.log | |
652 -$(CLEARTOOL) mklabel $(REPLACE) $(LABEL) $(DEPEND_DIRS) \ | |
653 $(EXPORT_FILES) $(INCLUDE_FILES) 2>> error.log | |
654 | |
655 depend: $(SRCFILES) | |
656 @touch $(MISC_DEP) | |
657 makedepend -b -f$(MISC_DEP) $^ -Y -o.$(OBJTAIL) $(INCLUDELIST) $(DEFINELIST) | |
658 @$(RM) $(MISC_DEP).bak | |
659 | |
660 -include $(MISC_DEP) |