source: trunk/make/process.mak@ 8714

Last change on this file since 8714 was 8714, checked in by bird, 23 years ago

Merged in NMAKE5 and other changes from UNIMAC. New mode: TESTCASE.

File size: 29.9 KB
RevLine 
[8714]1# $Id: process.mak,v 1.14 2002-06-19 02:16:27 bird Exp $
[8197]2
3#
4# Unix-like tools for OS/2
5#
6# The common build process rules
7#
8# Note: this makefile is supposed to be included from the
9# current source path.
10#
11
12
[8253]13# -----------------------------------------------------------------------------
14# Assertions.
15# This makefile expects setup.mak and the specific setup to be included
16# already.
17# It also requires the TARGET_NAME to be specified in the makefile.
18# -----------------------------------------------------------------------------
[8714]19!if "$(MAKE_SETUP_INCLUDED)" != "YES"
20! ifndef MAKEVER
21! if [$(ECHO) $(CLRERR)Fatal error: You must include setup.mak before process.mak in the makefile.$(CLRRST)]
22! endif
23! error
24!else
25! error $(CLRERR)Fatal error: You must include setup.mak before process.mak in the makefile.$(CLRRST)
[8197]26!endif
[8714]27!endif
[8253]28!if "$(ENV_STATUS)" != "OK"
[8714]29! ifndef MAKEVER
30! if [$(ECHO) $(CLRERR)Fatal error: The environment is not valid. Bad setup.mak?$(CLRRST)]
31! endif
32! error
33! else
34! error $(CLRERR)Fatal error: The environment is not valid. Bad setup.mak?$(CLRRST)
[8423]35! endif
[8253]36!endif
[8197]37
[8423]38!if "$(TARGET_NAME)" == "" && "$(TARGET_MODE)" != "EMPTY"
[8714]39! ifndef MAKEVER
40! if [$(ECHO) $(CLRERR)Fatal error: TARGET_NAME is not defined! Should be set in the makefile.$(CLRRST)]
41! endif
42! error
43! else
44! error $(CLRERR)Fatal error: TARGET_NAME is not defined! Should be set in the makefile.$(CLRRST)
[8423]45! endif
[8253]46!endif
47
[8290]48!ifdef TARGET_MODE
49# Executable target mode.
50! if "$(TARGET_MODE)" != "EXE"
51# Dynamic Load Library target mode.
52! if "$(TARGET_MODE)" != "DLL"
53# Drive (/ system software) target mode.
[8423]54! if "$(TARGET_MODE)" != "SYS"
[8290]55# Installable File System Drive target mode. (Also called FSD, File System Driver.)
[8423]56! if "$(TARGET_MODE)" != "IFS"
[8290]57# Virtual Device Driver target mode.
[8423]58! if "$(TARGET_MODE)" != "VDD"
[8290]59# Object Library target mode.
[8423]60! if "$(TARGET_MODE)" != "LIB"
[8290]61# Object Library target mode - Special variant which is to be linked with a SYS target.
[8423]62! if "$(TARGET_MODE)" != "SYSLIB"
[8290]63# Object Library target mode - Special variant which is to be linked with an IFS target.
[8423]64! if "$(TARGET_MODE)" != "IFSLIB"
[8290]65# Dummy/Hub/TopLevel empty makefile. This has no target.
[8423]66! if "$(TARGET_MODE)" != "EMPTY"
[8714]67! if "$(TARGET_MODE)" != "TESTCASE"
68! ifndef MAKEVER
69! if [$(ECHO) $(CLRERR)Fatal Error: Bad TARGET_MODE="$(TARGET_MODE)". Valid ones are: EXE, DLL, SYS, IFS, VDD, LIB, SYSLIB, IFSLIB, TESTCASE and EMPTY.$(CLRRST)]
70! endif
71! error
72! else
73! error $(CLRERR)Fatal Error: Bad TARGET_MODE="$(TARGET_MODE)". Valid ones are: EXE, DLL, SYS, IFS, VDD, LIB, SYSLIB, IFSLIB, TESTCASE and EMPTY.$(CLRRST)
74! endif
[8290]75! endif
76! endif
77! endif
78! endif
79! endif
80! endif
81! endif
82! endif
83! endif
84! endif
85!endif
86
87
[8253]88# -----------------------------------------------------------------------------
89# Provide overridable defaults
90# -----------------------------------------------------------------------------
91
92# Default target mode is executable.
93!ifndef TARGET_MODE
94TARGET_MODE = EXE
95!endif
96
97# Default extension corresponds to the target mode.
98!ifndef TARGET_EXT
[8423]99! if "$(TARGET_MODE)" == "DLL"
[8253]100TARGET_EXT = $(EXT_DLL)
101! endif
102! if "$(TARGET_MODE)" == "SYS"
103TARGET_EXT = $(EXT_SYS)
104! endif
[8290]105! if "$(TARGET_MODE)" == "IFS"
106TARGET_EXT = $(EXT_IFS)
107! endif
108! if "$(TARGET_MODE)" == "VDD"
109TARGET_EXT = $(EXT_VDD)
110! endif
[8253]111! if "$(TARGET_MODE)" == "EXE"
112TARGET_EXT = $(EXT_EXE)
113! endif
[8290]114! if "$(TARGET_MODE)" == "LIB" || "$(TARGET_MODE)" == "SYSLIB" || "$(TARGET_MODE)" == "IFSLIB"
[8253]115TARGET_EXT = $(EXT_LIB)
116! endif
117! if "$(TARGET_MODE)" == "EMPTY"
118TARGET_EXT = empty
119! endif
[8714]120! if "$(TARGET_MODE)" == "TESTCASE"
121TARGET_EXT = testcase
122! endif
[8253]123! ifndef TARGET_EXT
[8714]124! ifndef MAKEVER
125! if [$(ECHO) $(CLRERR)Internal Error: TARGET_EXT not set. Probably invalid TARGET_MODE. (TARGET_MODE="$(TARGET_MODE)")$(CLRRST)]
126! endif
127! error
128! else
129! error $(CLRERR)Internal Error: TARGET_EXT not set. Probably invalid TARGET_MODE. (TARGET_MODE="$(TARGET_MODE)")$(CLRRST)
[8423]130! endif
[8253]131! endif
132!endif
133
134# Default target path. (where all the generated stuff for this target goes)
135!ifndef PATH_TARGET
136PATH_TARGET = $(PATH_OBJ)\$(TARGET_NAME).$(TARGET_EXT)
137!endif
138
139# Default target file. (output)
[8197]140!ifndef TARGET
[8270]141! if "$(TARGET_MODE)" != "EMPTY"
[8714]142! if "$(TARGET_MODE)" != "TESTCASE"
[8253]143TARGET = $(PATH_TARGET)\$(TARGET_NAME).$(TARGET_EXT)
[8714]144! else
145TARGET = testcase
146! endif
[8270]147! endif
[8197]148!endif
149
[8333]150# Default target .sym file. (output)
151!ifndef TARGET_SYM
152TARGET_SYM = $(PATH_TARGET)\$(TARGET_NAME).$(EXT_SYM)
153!endif
[8270]154
[8253]155# Default object file. (output)
[8197]156!ifndef TARGET_OBJS
[8253]157TARGET_OBJS = $(PATH_TARGET)\$(TARGET_NAME).$(EXT_OBJ)
[8197]158!endif
159
[8253]160# Default libraries. (input)
[8197]161!ifndef TARGET_LIBS
[8253]162TARGET_LIBS = $(LIB_C_DLL) $(LIB_OS) $(LIB_C_RTDLL)
[8197]163!endif
164
[8253]165# Default definition file. (input)
[8197]166!ifndef TARGET_DEF
[8253]167TARGET_DEF = $(MAKEDIR)\$(PATH_DEF)\$(TARGET_NAME).def
[8197]168!endif
169
[8333]170# Default modified definition filename. (output)
171!ifndef TARGET_DEF_LINK
172TARGET_DEF_LINK = $(PATH_TARGET)\$(TARGET_NAME)_link.def
173!endif
174
[8253]175# Default definition file for generating the import library. (input)
[8197]176!ifndef TARGET_IDEF
[8253]177TARGET_IDEF = $(TARGET_DEF)
[8197]178!endif
179
[8253]180# Default map file. (output)
[8197]181!ifndef TARGET_MAP
[8333]182TARGET_MAP = $(PATH_TARGET)\$(TARGET_NAME).$(EXT_MAP)
[8197]183!endif
184
[8253]185# Default link file. (output)
[8197]186!ifndef TARGET_LNK
[8253]187TARGET_LNK = $(PATH_TARGET)\$(TARGET_NAME).lnk
[8197]188!endif
189
[8253]190# Default import library file. (output)
191!ifndef TARGET_ILIB
[8423]192! if "$(TARGET_MODE)" == "DLL"
[8253]193TARGET_ILIB =$(PATH_LIB)\$(TARGET_NAME).$(EXT_ILIB)
194! endif
[8197]195!endif
196
[8290]197# Default public name. (output)
198!ifndef TARGET_PUBNAME
199TARGET_PUBNAME=
200! ifdef TARGET_PUBLIC
201! if "$(TARGET_MODE)" == "LIB" || "$(TARGET_MODE)" == "SYSLIB" || "$(TARGET_MODE)" == "IFSLIB"
202TARGET_PUBNAME=$(PATH_LIB)\$(TARGET_NAME).$(TARGET_EXT)
203! endif
204! if "$(TARGET_MODE)" == "EXE"
205TARGET_PUBNAME=$(PATH_EXE)\$(TARGET_NAME).$(TARGET_EXT)
206! endif
[8423]207! if "$(TARGET_MODE)" == "DLL"
[8290]208TARGET_PUBNAME=$(PATH_DLL)\$(TARGET_NAME).$(TARGET_EXT)
209! endif
210! if "$(TARGET_MODE)" == "SYS" || "$(TARGET_MODE)" == "IFS"
211TARGET_PUBNAME=$(PATH_SYS)\$(TARGET_NAME).$(TARGET_EXT)
212! endif
213! if "$(TARGET_MODE)" == "VDD"
214TARGET_PUBNAME=$(PATH_VDD)\$(TARGET_NAME).$(TARGET_EXT)
215! endif
[8253]216! endif
[8197]217!endif
[8253]218
219# Default depend filename.
220!ifndef TARGET_DEPEND
221TARGET_DEPEND = $(PATH_TARGET)\.depend
[8197]222!endif
223
[8423]224# Default makefile names.
225!ifndef BUILD_MAKEFILE
226BUILD_MAKEFILE = Makefile
227!endif
228
[8253]229# Default makefile name.
230!ifndef MAKEFILE
[8423]231MAKEFILE = $(BUILD_MAKEFILE)
[8197]232!endif
233
[8253]234# Ignore linker warnings for some target modes.
235!ifndef TARGET_IGNORE_LINKER_WARNINGS
[8423]236! if "$(TARGET_MODE)" == "DLL"
[8253]237TARGET_IGNORE_LINKER_WARNINGS = 1
238! endif
[8197]239!endif
240
241
[8253]242# Default stacksize
[8355]243# If 16bit: 8KB
244# Else (32bit): 64KB
[8197]245!ifndef TARGET_STACKSIZE
[8355]246! ifdef ENV_16BIT
[8197]247TARGET_STACKSIZE=0x2000
248! else
249TARGET_STACKSIZE=0x10000
250! endif
251!endif
252
[8253]253
254
255# -----------------------------------------------------------------------------
256# Tell user what we're building.
257# -----------------------------------------------------------------------------
258!ifndef BUILD_QUIET
[8714]259! ifndef MAKEVER
260! if [$(ECHO) Target is $(CLRFIL)$(TARGET)$(CLRRST)]
261! endif
262! else
263$(ECHO) Target is $(CLRFIL)$(TARGET)$(CLRRST)
264! endif
[8197]265!endif
266
267
[8253]268# -----------------------------------------------------------------------------
269# Ensure the platform-specific target path exists
270# -----------------------------------------------------------------------------
271
272!if "$(TARGET_MODE)" != "EMPTY"
273! if "$(PATH_TARGET)" != ""
[8714]274! ifndef MAKEVER
275! if [$(TOOL_EXISTS) $(PATH_TARGET)] != 0
276! ifndef BUILD_QUIET
277! if [$(ECHO) Target path $(CLRFIL)$(PATH_TARGET)$(CLRTXT) does NOT exist. Creating. $(CLRRST)]
278! endif
[8253]279! endif
[8714]280! if [$(TOOL_CREATEPATH) $(PATH_TARGET)]
281! if [$(ECHO) $(CLRERR)Error: Could not create $(CLRFIL)$(PATH_TARGET)$(CLRRST)]
282! endif
283! error
284! endif
[8253]285! endif
[8714]286! else
287! if %exist($(PATH_TARGET)) == 0
288! ifndef BUILD_QUIET
289$(ECHO) Target path $(CLRFIL)$(PATH_TARGET)$(CLRTXT) does NOT exist. Creating. $(CLRRST)
[8423]290! endif
[8714]291! else
292! if [$(TOOL_CREATEPATH) $(PATH_TARGET)]
293! error $(CLRERR)Error: Could not create $(CLRFIL)$(PATH_TARGET)$(CLRRST)
294! endif
[8253]295! endif
[8197]296! endif
297! endif
298!endif
[8253]299# not 100% sure about the != EMPTY stuff, but this is way faster.
[8197]300
301
302
[8253]303# -----------------------------------------------------------------------------
304# Common inference rules
305# -----------------------------------------------------------------------------
[8197]306.SUFFIXES:
[8714]307.SUFFIXES: .c .cpp .asm .$(EXT_OBJ) .$(EXT_RES) .rc .ii .s
[8197]308
[8714]309#
310# A workaround for SlickEdits inability to find the buggy files..
311# This makes the source filenames in the error listing have full path.
312# See setup.mak for compile command line.
313#
314_SRC = $<
315!ifdef SLKRUNS
316_SRC = $(PATH_CURRENT)\$<
317!endif
[8197]318
[8714]319
[8197]320# Assembling assembly source.
321.asm{$(PATH_TARGET)}.$(EXT_OBJ):
[8714]322 @$(ECHO) Assembling $(CLRFIL)$(_SRC) $(CLRTXT)$(TOOL_JOB_SUB_MSG) $(CLRRST)
323 \
[8423]324! ifndef BUILD_VERBOSE
[8290]325 @ \
[8423]326! endif
[8213]327!if "$(TARGET_MODE)" == "SYS" || "$(TARGET_MODE)" == "SYSLIB" || "$(TARGET_MODE)" == "IFS" || "$(TARGET_MODE)" == "IFSLIB"
[8714]328 $(TOOL_JOB_SUB) $(AS) $(AS_FLAGS_SYS) $(_SRC) $(AS_OBJ_OUT)$@
[8197]329!else
[8714]330 $(TOOL_JOB_SUB) $(AS) $(AS_FLAGS) $(_SRC) $(AS_OBJ_OUT)$@
[8197]331!endif
332
333.asm.$(EXT_OBJ):
[8714]334 @$(ECHO) Assembling $(CLRFIL)$(_SRC) $(CLRRST)
335 \
[8290]336!ifndef BUILD_VERBOSE
337 @ \
338!endif
[8213]339!if "$(TARGET_MODE)" == "SYS" || "$(TARGET_MODE)" == "SYSLIB" || "$(TARGET_MODE)" == "IFS" || "$(TARGET_MODE)" == "IFSLIB"
[8714]340 $(AS) $(AS_FLAGS_SYS) $(_SRC) $(AS_OBJ_OUT)$(PATH_TARGET)\$(@F)
[8197]341!else
[8714]342 $(AS) $(AS_FLAGS) $(_SRC) $(AS_OBJ_OUT)$(PATH_TARGET)\$(@F)
[8197]343!endif
344
[8714]345# C++ Compiler base line
346_CXX_BASELINE = $(CXX) \
[8290]347!if "$(TARGET_MODE)" == "EXE" || "$(TARGET_MODE)" == "LIB"
[8197]348 $(CXX_FLAGS_EXE) \
349!endif
350!if "$(TARGET_MODE)" == "DLL"
351 $(CXX_FLAGS_DLL) \
352!endif
353!if "$(TARGET_MODE)" == "SYS" || "$(TARGET_MODE)" == "SYSLIB"
354 $(CXX_FLAGS_SYS) \
355!endif
[8213]356!if "$(TARGET_MODE)" == "IFS" || "$(TARGET_MODE)" == "IFSLIB"
357 $(CXX_FLAGS_IFS) \
358!endif
[8714]359
360# Compiling C++ source.
361.cpp{$(PATH_TARGET)}.$(EXT_OBJ):
362 @$(ECHO) C++ Compiler $(CLRFIL)$(_SRC) $(CLRTXT)$(TOOL_JOB_SUB_MSG) $(CLRRST)
363 \
364!ifndef BUILD_VERBOSE
365 @ \
366!endif
367 $(TOOL_JOB_SUB) $(_CXX_BASELINE) \
[8253]368!if "$(CXX_LST_OUT)" != ""
[8213]369 $(CXX_LST_OUT)$(PATH_TARGET)\$(@B).s \
370!endif
[8714]371 $(CXX_OBJ_OUT)$@ $(_SRC)
[8197]372
373.cpp.$(EXT_OBJ):
[8714]374 @$(ECHO) C++ Compiler $(CLRFIL)$(_SRC) $(CLRRST)
375 \
[8290]376!ifndef BUILD_VERBOSE
377 @ \
378!endif
[8714]379 $(_CXX_BASELINE) \
[8253]380!if "$(CXX_LST_OUT)" != ""
[8213]381 $(CXX_LST_OUT)$(PATH_TARGET)\$(@B).s \
382!endif
[8714]383 $(CXX_OBJ_OUT)$(PATH_TARGET)\$(@F) $(_SRC)
[8197]384
385
386# Pre-Compiling C++ source.
[8714]387.cpp.ii:
388 @$(ECHO) C++ Compiler $(CLRFIL)$(_SRC) $(CLRRST)
389 \
[8290]390!ifndef BUILD_VERBOSE
391 @ \
392!endif
[8714]393 $(_CXX_BASELINE) \
394 $(CXX_PC_2_STDOUT) $(_SRC) > $@
[8197]395
396
[8714]397# Compiler C++ source to assembly.
398!if "$(CXX_AS_2_FILE)" != ""
399.cpp.s:
400 @$(ECHO) C++ To Assembly $(CLRFIL)$(_SRC) $(CLRRST)
401 \
[8290]402!ifndef BUILD_VERBOSE
403 @ \
404!endif
[8714]405 $(_CXX_BASELINE) \
406 $(CXX_AS_2_FILE)$@ $(_SRC)
407!endif
408
409
410
411# C Compiler base line
412_CC_BASELINE = $(CC) \
[8290]413!if "$(TARGET_MODE)" == "EXE" || "$(TARGET_MODE)" == "LIB"
[8197]414 $(CC_FLAGS_EXE) \
415!endif
416!if "$(TARGET_MODE)" == "DLL"
417 $(CC_FLAGS_DLL) \
418!endif
419!if "$(TARGET_MODE)" == "SYS" || "$(TARGET_MODE)" == "SYSLIB"
420 $(CC_FLAGS_SYS) \
421!endif
[8213]422!if "$(TARGET_MODE)" == "IFS" || "$(TARGET_MODE)" == "IFSLIB"
423 $(CC_FLAGS_IFS) \
424!endif
[8714]425
426# Compiling C source.
427.c{$(PATH_TARGET)}.$(EXT_OBJ):
428 @$(ECHO) C Compiler $(CLRFIL)$(_SRC) $(CLRTXT)$(TOOL_JOB_SUB_MSG) $(CLRRST)
429 \
430!ifndef BUILD_VERBOSE
431 @ \
432!endif
433 $(TOOL_JOB_SUB) $(_CC_BASELINE) \
[8253]434!if "$(CC_LST_OUT)" != ""
[8213]435 $(CC_LST_OUT)$(PATH_TARGET)\$(@B).s \
436!endif
[8714]437 $(CC_OBJ_OUT)$@ $(_SRC)
[8197]438
439.c.$(EXT_OBJ):
[8714]440 @$(ECHO) C Compiler $(CLRFIL)$(_SRC) $(CLRRST)
441 \
[8290]442!ifndef BUILD_VERBOSE
443 @ \
444!endif
[8714]445 $(_CC_BASELINE) \
[8253]446!if "$(CC_LST_OUT)" != ""
[8213]447 $(CC_LST_OUT)$(PATH_TARGET)\$(@B).s \
448!endif
[8714]449 $(CC_OBJ_OUT)$(PATH_TARGET)\$(@F) $(_SRC)
[8197]450
451
452# Pre-Compiling C source.
[8714]453.c.ii:
454 @$(ECHO) C PreCompiler $(CLRFIL)$(_SRC) $(CLRRST)
455 \
[8290]456!ifndef BUILD_VERBOSE
457 @ \
458!endif
[8714]459 $(_CC_BASELINE) \
460 $(CC_PC_2_STDOUT) $(_SRC) > $@
461
462
463# Compiler C source to assembly.
464!if "$(CC_AS_2_FILE)" != ""
465.c.s:
466 @$(ECHO) C To Assembly $(CLRFIL)$(_SRC) $(CLRRST)
467 \
468!ifndef BUILD_VERBOSE
469 @ \
[8197]470!endif
[8714]471 $(_CC_BASELINE) \
472 $(CC_AS_2_FILE)$@ $(_SRC)
[8197]473!endif
474
475
476# Compiling resources.
477.rc{$(PATH_TARGET)}.res:
[8714]478 @$(ECHO) RC Compiler $(CLRFIL)$(_SRC) $(CLRTXT)$(TOOL_JOB_SUB_MSG)$(CLRRST)
479 \
[8290]480!ifndef BUILD_VERBOSE
481 @ \
482!endif
[8714]483 $(TOOL_JOB_SUB) $(RC) $(RC_FLAGS) $(_SRC) $@
[8197]484
485.rc.res:
[8714]486 @$(ECHO) RC Compiler $(CLRFIL)$(_SRC) $(CLRRST)
487 \
[8290]488!ifndef BUILD_VERBOSE
489 @ \
490!endif
[8714]491 $(RC) $(RC_FLAGS) $(_SRC) $(PATH_TARGET)\$(@F)
[8197]492
493
[8253]494
495
496
497# -----------------------------------------------------------------------------
498# The all rule - The default one, as it's the first rule in the file.
499# -----------------------------------------------------------------------------
[8197]500all: build
501
502
[8253]503
504# -----------------------------------------------------------------------------
505# The build rule - Build the target.
506# Must take into account any subdirectories and makefiles which is is to be
507# made before and after the target. That makes it kind of messy, sorry.
508# -----------------------------------------------------------------------------
[8197]509!ifdef SUBDIRS
510SUBDIRS_BUILD = subbuild
511$(SUBDIRS_BUILD):
[8423]512 @$(TOOL_DODIRS) "$(SUBDIRS)" $(TOOL_MAKE) -f $(BUILD_MAKEFILE) build
[8197]513!endif
514
515!ifdef PREMAKEFILES
516PREMAKEFILES_BUILD = premakefiles_build
517$(PREMAKEFILES_BUILD):
518 @$(TOOL_DOMAKES) "$(PREMAKEFILES)" $(TOOL_MAKE) build
519!endif
520
[8290]521build: $(SUBDIRS_BUILD) $(PREMAKEFILES_BUILD) $(TARGET) $(TARGET_ILIB) $(TARGET_PUBNAME)
[8197]522 @$(ECHO) Successfully Built $(CLRFIL)$(TARGET) $(TARGET_ILIB)$(CLRRST)
523!ifdef POSTMAKEFILES
524 @$(TOOL_DOMAKES) "$(POSTMAKEFILES)" $(TOOL_MAKE) $@
525!endif
526
527
[8253]528
529# -----------------------------------------------------------------------------
530# The lib rule - Make Public libraries.
531# Must take into account any subdirectories and makefiles which is is to be
532# made before and after the target. That makes it kind of messy, sorry.
533# -----------------------------------------------------------------------------
[8197]534!ifdef SUBDIRS
535SUBDIRS_LIB = subdir_lib
536$(SUBDIRS_LIB):
[8423]537 @$(TOOL_DODIRS) "$(SUBDIRS)" $(TOOL_MAKE) -f $(BUILD_MAKEFILE) lib
[8197]538!endif
539
540!ifdef PREMAKEFILES
541PREMAKEFILES_LIB = premakefiles_lib
542$(PREMAKEFILES_LIB):
543 @$(TOOL_DOMAKES) "$(PREMAKEFILES)" $(TOOL_MAKE) lib
544!endif
545
[8423]546!if "$(TARGET_PUBLIC_PART)" != "" && ("$(TARGET_MODE)" == "LIB" || "$(TARGET_MODE)" == "SYSLIB" || "$(TARGET_MODE)" == "IFSLIB")
[8319]547lib: $(SUBDIRS_LIB) $(TARGET_ILIB) $(TARGET) $(TARGET_PUBNAME)
[8290]548!else
549lib: $(SUBDIRS_LIB) $(TARGET_ILIB)
550!endif
[8197]551!ifdef POSTMAKEFILES
552 @$(TOOL_DOMAKES) "$(POSTMAKEFILES)" $(TOOL_MAKE) $@
553!endif
554
555
[8253]556
557# -----------------------------------------------------------------------------
558# The install rule - Copies target to main binary directory.
559# Installation order is not concidered vital, so subdirectories and
560# pre-makefiles are processed after this directory. This might be changed.
561# -----------------------------------------------------------------------------
[8197]562install:
[8290]563!if "$(TARGET_PUBLIC)" == ""
564! if "$(TARGET_MODE)" == "EXE"
565 @$(ECHO) Installing $(CLRFIL)$(TARGET)$(CLRTXT) in directory $(CLRFIL)$(PATH_BIN)$(CLRRST)
566 @if not exist $(TARGET) $(ECHO) $(CLRERR)WARNING: $(CLRFIL)$(TARGET)$(CLRERR) doesn't exist. $(CLRRST)
[8423]567 @if not exist $(PATH_BIN) $(TOOL_CREATEPATH) $(PATH_BIN)
[8333]568 @if exist $(TARGET) $(TOOL_COPY) $(TARGET) $(PATH_BIN)
569 @if exist $(TARGET_SYM) $(TOOL_COPY) $(TARGET_SYM) $(PATH_BIN)
[8290]570! endif
[8423]571! if "$(TARGET_MODE)" == "DLL"
[8290]572 @$(ECHO) Installing $(CLRFIL)$(TARGET)$(CLRTXT) in directory $(CLRFIL)$(PATH_DLL)$(CLRRST)
573 @if not exist $(TARGET) $(ECHO) $(CLRERR)WARNING: $(CLRFIL)$(TARGET)$(CLRERR) doesn't exist. $(CLRRST)
[8423]574 @if not exist $(PATH_DLL) $(TOOL_CREATEPATH) $(PATH_DLL)
[8333]575 @if exist $(TARGET) $(TOOL_COPY) $(TARGET) $(PATH_DLL)
576 @if exist $(TARGET_SYM) $(TOOL_COPY) $(TARGET_SYM) $(PATH_DLL)
[8290]577! endif
578! if "$(TARGET_MODE)" == "SYS" || "$(TARGET_MODE)" == "IFS"
579 @$(ECHO) Installing $(CLRFIL)$(TARGET)$(CLRTXT) in directory $(CLRFIL)$(PATH_SYS)$(CLRRST)
580 @if not exist $(TARGET) $(ECHO) $(CLRERR)WARNING: $(CLRFIL)$(TARGET)$(CLRERR) doesn't exist. $(CLRRST)
[8423]581 @if not exist $(PATH_SYS) $(TOOL_CREATEPATH) $(PATH_SYS)
[8333]582 @if exist $(TARGET) $(TOOL_COPY) $(TARGET) $(PATH_SYS)
583 @if exist $(TARGET_SYM) $(TOOL_COPY) $(TARGET_SYM) $(PATH_SYS)
[8290]584! endif
[8423]585!if 0 # these targets are either TARGET_PUBLIC or all private.
[8290]586! if "$(TARGET_MODE)" == "LIB" || "$(TARGET_MODE)" == "SYSLIB" || "$(TARGET_MODE)" == "IFSLIB"
587 @$(ECHO) Installing $(CLRFIL)$(TARGET)$(CLRTXT) in directory $(CLRFIL)$(PATH_LIB)$(CLRRST)
588 @if not exist $(TARGET) $(ECHO) $(CLRERR)WARNING: $(CLRFIL)$(TARGET)$(CLRERR) doesn't exist. $(CLRRST)
[8423]589 @if not exist $(PATH_LIB) $(TOOL_CREATEPATH) $(PATH_LIB)
[8333]590 @if exist $(TARGET) $(TOOL_COPY) $(TARGET) $(PATH_LIB)
591 @if exist $(TARGET_SYM) $(TOOL_COPY) $(TARGET_SYM) $(PATH_LIB)
[8290]592! endif
593! endif
[8197]594!endif
595!if "$(TARGET_DOCS)" != ""
596 $(TOOL_COPY) $(TARGET_DOCS) $(PATH_DOC)
597!endif
598!ifdef SUBDIRS
[8423]599 @$(TOOL_DODIRS) "$(SUBDIRS)" $(TOOL_MAKE) -f $(BUILD_MAKEFILE) $@
[8197]600!endif
601!ifdef PREMAKEFILES
602 @$(TOOL_DOMAKES) "$(PREMAKEFILES)" $(TOOL_MAKE) $@
603!endif
604!ifdef POSTMAKEFILES
605 @$(TOOL_DOMAKES) "$(POSTMAKEFILES)" $(TOOL_MAKE) $@
606!endif
607
608
[8253]609
[8714]610!if "$(TARGET_MODE)" != "TESTCASE"
611!ifndef BUILD_OWN_TESTCASE_RULE
612!ifndef MAKEVER
613_TESTCASE_TST1 = [$(TOOL_EXISTS) testcase] == 0
614_TESTCASE_TST2 = [$(TOOL_EXISTS) testcase.mak] == 0
615!else
616_TESTCASE_TST1 = exists(testcase) != 0
617_TESTCASE_TST2 = exists(testcase.mak) != 0
618!endif
[8253]619# -----------------------------------------------------------------------------
620# The testcase rule - Execute testcases when present.
621# Testcases are either a testcase.mak file or a testcase subdirectory.
622# -----------------------------------------------------------------------------
[8290]623testcase:
[8714]624!if $(_TESTCASE_TST1)
[8423]625 @$(TOOL_DODIRS) "testcase" $(TOOL_MAKE) -f $(BUILD_MAKEFILE) $@
[8197]626!endif
[8714]627!if $(_TESTCASE_TST2)
[8197]628 @$(TOOL_DOMAKES) "testcase.mak" $(TOOL_MAKE) $@
629!endif
630!ifdef SUBDIRS
[8423]631 @$(TOOL_DODIRS) "$(SUBDIRS)" $(TOOL_MAKE) -f $(BUILD_MAKEFILE) $@
[8197]632!endif
633!ifdef PREMAKEFILES
634 @$(TOOL_DOMAKES) "$(PREMAKEFILES)" $(TOOL_MAKE) $@
635!endif
636!ifdef POSTMAKEFILES
637 @$(TOOL_DOMAKES) "$(POSTMAKEFILES)" $(TOOL_MAKE) $@
638!endif
639!endif
[8714]640!endif #!TESTCASE
[8197]641
642
[8253]643
644# -----------------------------------------------------------------------------
[8298]645# The shell rule - Setup the correcte shell environment and start a shell.
646# -----------------------------------------------------------------------------
647shell:
[8714]648 \
[8298]649!ifndef BUILD_VERBOSE
650 @ \
651!endif
652 -$(TOOL_BUILDENV) $(BUILD_ENVS_BASE_PRE) $(BUILD_ENVS_PRE) $(ENV_ENVS) \
653 $(BUILD_ENVS_BASE_POST) $(BUILD_ENVS_POST) * $(COMSPEC)
654
655
656
657# -----------------------------------------------------------------------------
[8253]658# The dep rule - Make dependencies.
659# -----------------------------------------------------------------------------
[8197]660dep:
661 @$(ECHO) Building dependencies $(CLRRST)
[8714]662 \
[8290]663!ifndef BUILD_VERBOSE
664 @ \
665!endif
666 $(TOOL_DEP) $(TOOL_DEP_FLAGS) -o$$(PATH_TARGET) -d$(TARGET_DEPEND)\
[8197]667!ifdef TARGET_NO_DEP
668 -x$(TARGET_NO_DEP: =;)\
669!endif
670 $(TOOL_DEP_FILES)
671!ifdef SUBDIRS
[8423]672 @$(TOOL_DODIRS) "$(SUBDIRS)" $(TOOL_MAKE) -f $(BUILD_MAKEFILE) NODEP=1 $@
[8197]673!endif
674!ifdef PREMAKEFILES
675 @$(TOOL_DOMAKES) "$(PREMAKEFILES)" $(TOOL_MAKE) NODEP=1 $@
676!endif
677!ifdef POSTMAKEFILES
678 @$(TOOL_DOMAKES) "$(POSTMAKEFILES)" $(TOOL_MAKE) NODEP=1 $@
679!endif
680
681
[8253]682
683# -----------------------------------------------------------------------------
684# The clean rule - Clean up output files.
685# The current setup doesn't clean the installed ones.
686# -----------------------------------------------------------------------------
[8714]687!if "$(TARGET_MODE)" != "TESTCASE"
[8197]688clean:
689!if "$(PATH_TARGET)" != "" # paranoia
690 $(TOOL_RM) \
691 $(PATH_TARGET)\*.$(EXT_OBJ) \
692 $(PATH_TARGET)\*.$(EXT_ILIB) \
693 $(PATH_TARGET)\*.$(EXT_EXE) \
694 $(PATH_TARGET)\*.$(EXT_DLL) \
[8333]695 $(PATH_TARGET)\*.$(EXT_RES)
696 $(TOOL_RM) \
[8197]697 $(PATH_TARGET)\*.$(EXT_SYS) \
[8333]698 $(PATH_TARGET)\*.$(EXT_LIB) \
699 $(PATH_TARGET)\*.$(EXT_IFS) \
700 $(PATH_TARGET)\*.$(EXT_MAP) \
701 $(PATH_TARGET)\*.$(EXT_SYM)
[8213]702 $(TOOL_RM) \
703 $(PATH_TARGET)\*.s \
704 $(PATH_TARGET)\*.lst \
[8197]705 $(PATH_TARGET)\*.lnk \
[8714]706 $(PATH_TARGET)\*.ii \
[8213]707 $(PATH_TARGET)\.depend
[8714]708 $(TOOL_RM) \
709 .\*.ii \
710 .\*.err \
711 .\.depend
[8197]712!endif
713!ifdef SUBDIRS
[8714]714 @$(TOOL_DODIRS) "$(SUBDIRS)" $(TOOL_MAKE) -f $(BUILD_MAKEFILE) NODEP=1 $@
715!endif
716!ifdef PREMAKEFILES
717 @$(TOOL_DOMAKES) "$(PREMAKEFILES)" $(TOOL_MAKE) NODEP=1 $@
718!endif
719!ifdef POSTMAKEFILES
720 @$(TOOL_DOMAKES) "$(POSTMAKEFILES)" $(TOOL_MAKE) NODEP=1 $@
721!endif
722!endif #!TESTCASE
723
724
725
726# -----------------------------------------------------------------------------
727# The nothing rule - Rule for testing the makefile structure.
728# -----------------------------------------------------------------------------
729nothing:
730!ifdef SUBDIRS
[8423]731 @$(TOOL_DODIRS) "$(SUBDIRS)" $(TOOL_MAKE) -f $(BUILD_MAKEFILE) $@
[8197]732!endif
733!ifdef PREMAKEFILES
734 @$(TOOL_DOMAKES) "$(PREMAKEFILES)" $(TOOL_MAKE) $@
735!endif
736!ifdef POSTMAKEFILES
737 @$(TOOL_DOMAKES) "$(POSTMAKEFILES)" $(TOOL_MAKE) $@
738!endif
[8714]739 @$(ECHO) Completed nothing in $(MAKEFILE).
[8197]740
741
[8253]742
743# -----------------------------------------------------------------------------
744# The $(TARGET) rule - For EXE, DLL, SYS and IFS targets
745# -----------------------------------------------------------------------------
[8423]746!if "$(TARGET_MODE)" == "EXE" || "$(TARGET_MODE)" == "DLL" || "$(TARGET_MODE)" == "SYS" || "$(TARGET_MODE)" == "IFS" || "$(TARGET_MODE)" == "VDD"
[8333]747$(TARGET): $(TARGET_OBJS) $(TARGET_RES) $(TARGET_DEF_LINK) $(TARGET_LNK) $(TARGET_DEPS)
[8423]748!if "$(TOOL_JOB_WAIT)" != ""
749! ifndef BUILD_QUIET
[8714]750 @$(ECHO) Waiting for jobs to complete $(CLRRST)
[8423]751! endif
[8714]752 \
[8423]753! ifndef BUILD_VERBOSE
[8714]754 @ \
[8423]755! endif
[8714]756 $(TOOL_JOB_WAIT)
[8423]757!endif
[8197]758 @$(ECHO) Linking $(TARGET_MODE) $(CLRFIL)$@ $(CLRRST)
[8714]759 \
[8290]760!ifndef BUILD_VERBOSE
761 @ \
762!endif
[8197]763!ifdef TARGET_IGNORE_LINKER_WARNINGS
764 -4 \
765!endif
766!if "$(TARGET_MODE)" == "EXE"
[8253]767 $(LINK_CMD_EXE)
[8197]768!endif
[8423]769!if "$(TARGET_MODE)" == "DLL"
[8290]770 $(LINK_CMD_DLL)
[8197]771!endif
772!if "$(TARGET_MODE)" == "SYS"
[8290]773 $(LINK_CMD_SYS)
[8197]774!endif
[8213]775!if "$(TARGET_MODE)" == "IFS"
[8290]776 $(LINK_CMD_IFS)
[8213]777!endif
[8290]778!if "$(TARGET_MODE)" == "VDD"
779 $(LINK_CMD_VDD)
780!endif
[8197]781!if "$(TARGET_RES)" != "" && "$(RL)" != ""
782 @$(ECHO) Linking Resources $(CLRRST)
[8714]783 \
[8290]784! ifndef BUILD_VERBOSE
785 @ \
786! endif
787 $(RL) $(RL_FLAGS) $(TARGET_RES) $@
[8197]788!endif
789!if "$(TARGET_DLLRNAME)" != ""
790 @$(ECHO) Dll Rename $(TARGET_DLLRNAME)
[8714]791 \
[8290]792! ifndef BUILD_VERBOSE
793 @ \
794! endif
[8197]795 $(TOOL_DLLRNAME) $(TARGET) $(TARGET_DLLRNAME)
796!endif
[8333]797!if "$(TOOL_MAPSYM)" != "" && "$(TARGET_SYM)" != "" && "$(TARGET_MAP)" != ""
[8714]798 \
[8333]799! ifndef BUILD_VERBOSE
800 @ \
801! endif
802 $(TOOL_MAPSYM) $(TARGET_MAP) $(TARGET_SYM)
803!endif
[8197]804
805
806#
807# Linker parameter file.
808#
809$(TARGET_LNK): $(MAKE_INCLUDE_PROCESS) $(MAKE_INCLUDE_SETUP) $(PATH_MAKE)\setup.mak $(MAKEFILE)
[8362]810!ifndef TOOL_DEFCONV
[8714]811 @$(TOOL_ECHO) Creating Linker Input File $(CLRRST)<<$@
[8197]812$(LINK_LNK1)
813$(LINK_LNK2)
814$(LINK_LNK3)
815$(LINK_LNK4)
816$(LINK_LNK5)
817<<KEEP
[8362]818!else
819 @$(ECHO) Creating Linker Input File $(CLRRST) $@
820 @$(TOOL_RM) $@
[8714]821 \
[8362]822! ifdef BUILD_VERBOSE
823 @ \
824! endif
825 $(TOOL_DEFCONV) $(TARGET_DEF_LINK) $@ <<$(TARGET_LNK)2
826#
827# LINK_LNK[1-5]:
828#
829$(LINK_LNK1)
830$(LINK_LNK2)
831$(LINK_LNK3)
832$(LINK_LNK4)
833$(LINK_LNK5)
834<<keep
835!endif
[8355]836!ifdef BUILD_VERBOSE
837 @type $@
838!endif
[8333]839
840
841#
842# Builddef modified definition file.
843#
844!if "$(TARGET_DEF_LINK)" != "$(TARGET_DEF)"
845$(TARGET_DEF_LINK): $(TARGET_DEF)
846! ifndef BUILD_QUIET
847 @$(ECHO) Stamping deffile with build level info.$(CLRRST)
848! endif
[8714]849 \
[8333]850! ifndef BUILD_VERBOSE
851 @ \
852! endif
853 $(TOOL_BLDLEVEL) $(BUILD_BLDLEVEL_FLAGS) $(TARGET_BLDLEVEL_FLAGS) -R$** $** $@
[8290]854!endif
[8197]855
[8333]856!endif
[8197]857
[8333]858
[8253]859# -----------------------------------------------------------------------------
[8290]860# The $(TARGET) rule - For LIB, SYSLIB, and IFSLIB targets.
[8253]861# -----------------------------------------------------------------------------
[8290]862!if "$(TARGET_MODE)" == "LIB" || "$(TARGET_MODE)" == "SYSLIB" || "$(TARGET_MODE)" == "IFSLIB"
[8197]863$(TARGET): $(TARGET_OBJS) $(TARGET_LNK) $(TARGET_DEPS)
[8423]864!if "$(TOOL_JOB_WAIT)" != ""
865! ifndef BUILD_QUIET
866 @$(ECHO) Waiting for jobs to complete $(CLRRST)
867! endif
[8714]868 \
[8423]869! ifndef BUILD_VERBOSE
870 @ \
871! endif
872 $(TOOL_JOB_WAIT)
873!endif
[8197]874 @$(ECHO) Creating Library $(CLRFIL)$@ $(CLRRST)
[8290]875!ifndef BUILD_VERBOSE
876 @$(TOOL_RM) $@
877 @$(AR_CMD)
878!else
[8197]879 $(TOOL_RM) $@
880 $(AR_CMD)
[8290]881!endif
[8197]882
883
884#
885# Lib parameter file.
886#
887$(TARGET_LNK): $(MAKE_INCLUDE_PROCESS) $(MAKE_INCLUDE_SETUP) $(PATH_MAKE)\setup.mak $(MAKEFILE)
[8714]888 @$(TOOL_ECHO) Creating Lib Input File $(CLRRST)<<$@
[8197]889$(AR_LNK1)
890$(AR_LNK2)
891$(AR_LNK3)
892$(AR_LNK4)
893$(AR_LNK5)
894<<KEEP
[8423]895!ifdef BUILD_VERBOSE
896 @type $@
[8197]897!endif
[8423]898!endif
[8197]899
900
901#
[8290]902# Copy rule for public targets.
[8197]903#
[8290]904!if "$(TARGET_PUBNAME)" != ""
905$(TARGET_PUBNAME): $(TARGET)
906 @$(ECHO) Copying $(CLRFIL)$(TARGET)$(CLRTXT) to $(CLRFIL)$(@D)$(CLRRST)
[8714]907 \
[8290]908!ifndef BUILD_VERBOSE
[8423]909 @if not exist $(@D) $(ECHO) Target public path $(CLRFIL)$(@D)$(CLRTXT) does NOT exist. Creating. $(CLRRST)
910!endif
911 @if not exist $(@D) $(TOOL_CREATEPATH) $(@D)
[8714]912 \
[8423]913!ifndef BUILD_VERBOSE
[8290]914 @ \
[8197]915!endif
[8290]916 $(TOOL_COPY) $** $@
[8333]917 @if exist $(TARGET_SYM) $(TOOL_COPY) $(TARGET_SYM) $(@R).sym
[8290]918!endif
[8197]919
920
[8253]921
922# -----------------------------------------------------------------------------
923# The $(TARGET) rule - For EMPTY targets.
924# -----------------------------------------------------------------------------
[8197]925!if "$(TARGET_MODE)" == "EMPTY"
[8316]926#$(TARGET):
927# @$(ECHO) .
[8197]928!endif
929
930
[8253]931
932# -----------------------------------------------------------------------------
933# The $(TARGET_ILIB) rule - Make import library.
934# -----------------------------------------------------------------------------
935!ifdef TARGET_ILIB
936$(TARGET_ILIB): $(TARGET_IDEF)
937 @$(ECHO) Creating Import Library $(CLRFIL)$@ $(CLRRST)
[8714]938 \
[8290]939!ifndef BUILD_VERBOSE
940 @ \
941!endif
[8253]942 $(IMPLIB) $(IMPLIB_FLAGS) $@ $(TARGET_IDEF)
943!endif
944
945
946
947# -----------------------------------------------------------------------------
948# The .force rule - Force a remake of something everytime.
949# -----------------------------------------------------------------------------
950.force:
[8290]951!ifndef BUILD_VERBOSE
[8253]952 @$(ECHO) .
[8290]953!else
954 @$(ECHO) . (force) .
955!endif
[8253]956
957
958
959# -----------------------------------------------------------------------------
960# Read Dependencies.
961# -----------------------------------------------------------------------------
[8714]962!if "$(TARGET_MODE)" != "TESTCASE"
963!if "$(TARGET_MODE)" != "EMPTY" && "$(NODEP)" == ""
[8253]964
[8197]965#
[8253]966# Read dependency file for current directory
[8197]967#
[8714]968!ifndef MAKEVER
969! if [$(TOOL_EXISTS) $(TARGET_DEPEND)] == 0
970! ifdef BUILD_VERBOSE
971! if [$(ECHO) Including dependency $(CLRFIL)$(TARGET_DEPEND)$(CLRRST)]
972! endif
[8197]973! endif
[8714]974! include $(TARGET_DEPEND)
975! else
976! ifndef NODEP
[8253]977! if [$(ECHO) $(CLRERR)WARNING: Please make dependencies first. $(TARGET_DEPEND) is missing.$(CLRRST)]
978! endif
[8714]979! endif
[8253]980! endif
[8714]981!else
982! if %exists($(TARGET_DEPEND)) != 0
983! ifdef BUILD_VERBOSE
984$(ECHO) Including dependency $(CLRFIL)$(TARGET_DEPEND)$(CLRRST)
985! endif
986! include $(TARGET_DEPEND)
987! else
988! ifndef NODEP
989$(ECHO) $(CLRERR)WARNING: Please make dependencies first. $(TARGET_DEPEND) is missing.$(CLRRST)
990! endif
991! endif
[8253]992!endif
993
994
995#
996# Read global dependency files.
997#
998!ifdef BUILD_DEPEND1
[8714]999! ifndef MAKEVER
1000! if [$(TOOL_EXISTS) $(BUILD_DEPEND1)] == 0
1001! ifdef BUILD_VERBOSE
1002! if [$(ECHO) Including dependency $(CLRFIL)$(BUILD_DEPEND1)$(CLRRST)]
1003! endif
[8253]1004! endif
[8714]1005! include $(BUILD_DEPEND1)
1006! else
1007! ifndef NODEP
[8253]1008! if [$(ECHO) $(CLRERR)WARNING: Please make dependencies first. $(BUILD_DEPEND1) is missing.$(CLRRST)]
[8197]1009! endif
[8714]1010! endif
[8197]1011! endif
[8714]1012! else
1013! if %exists($(BUILD_DEPEND1)) != 0
1014! ifdef BUILD_VERBOSE
1015$(ECHO) Including dependency $(CLRFIL)$(BUILD_DEPEND1)$(CLRRST)
1016! endif
1017! include $(BUILD_DEPEND1)
1018! else
1019! ifndef NODEP
1020$(ECHO) $(CLRERR)WARNING: Please make dependencies first. $(BUILD_DEPEND1) is missing.$(CLRRST)
1021! endif
1022! endif
[8197]1023! endif
1024!endif
1025
[8714]1026
[8253]1027!ifdef BUILD_DEPEND2
[8714]1028! ifndef MAKEVER
1029! if [$(TOOL_EXISTS) $(BUILD_DEPEND2)] == 0
1030! ifdef BUILD_VERBOSE
1031! if [$(ECHO) Including dependency $(CLRFIL)$(BUILD_DEPEND2)$(CLRRST)]
1032! endif
[8253]1033! endif
[8714]1034! include $(BUILD_DEPEND2)
1035! else
1036! ifndef NODEP
[8253]1037! if [$(ECHO) $(CLRERR)WARNING: Please make dependencies first. $(BUILD_DEPEND2) is missing.$(CLRRST)]
1038! endif
[8714]1039! endif
[8253]1040! endif
[8714]1041! else
1042! if %exists($(BUILD_DEPEND2)) != 0
1043! ifdef BUILD_VERBOSE
1044$(ECHO) Including dependency $(CLRFIL)$(BUILD_DEPEND2)$(CLRRST)
1045! endif
1046! include $(BUILD_DEPEND2)
1047! else
1048! ifndef NODEP
1049$(ECHO) $(CLRERR)WARNING: Please make dependencies first. $(BUILD_DEPEND2) is missing.$(CLRRST)
1050! endif
1051! endif
[8253]1052! endif
1053!endif
[8197]1054
1055
[8253]1056!ifdef BUILD_DEPEND3
[8714]1057! ifndef MAKEVER
1058! if [$(TOOL_EXISTS) $(BUILD_DEPEND3)] == 0
1059! ifdef BUILD_VERBOSE
1060! if [$(ECHO) Including dependency $(CLRFIL)$(BUILD_DEPEND3)$(CLRRST)]
1061! endif
[8253]1062! endif
[8714]1063! include $(BUILD_DEPEND3)
1064! else
1065! ifndef NODEP
[8253]1066! if [$(ECHO) $(CLRERR)WARNING: Please make dependencies first. $(BUILD_DEPEND3) is missing.$(CLRRST)]
1067! endif
[8714]1068! endif
[8253]1069! endif
[8714]1070! else
1071! if %exists($(BUILD_DEPEND3)) != 0
1072! ifdef BUILD_VERBOSE
1073$(ECHO) Including dependency $(CLRFIL)$(BUILD_DEPEND3)$(CLRRST)
1074! endif
1075! include $(BUILD_DEPEND3)
1076! else
1077! ifndef NODEP
1078$(ECHO) $(CLRERR)WARNING: Please make dependencies first. $(BUILD_DEPEND3) is missing.$(CLRRST)
1079! endif
1080! endif
[8253]1081! endif
1082!endif
1083
1084
1085!endif
1086
[8423]1087
1088#
1089# If BUILD_MULTIJOBS is nonempty make sure the job daemon is up running.
1090#
1091!if "$(BUILD_MULTIJOBS)" != ""
1092! if [$(TOOL_JOB_UP)] != 0
1093! if "$(BUILD_QUITE)" == ""
[8714]1094! ifndef MAKEVER
1095! if [$(ECHO) Starting Job Daemon With $(TOOL_JOB_WORKERS) Workers...$(CLRRST)]
1096! endif
1097! else
1098$(ECHO) Starting Job Daemon With $(TOOL_JOB_WORKERS) Workers...$(CLRRST)
[8423]1099! endif
1100! endif
1101! if [$(TOOL_JOB_INIT) $(TOOL_JOB_WORKERS)] != 0
[8714]1102! ifndef MAKEVER
1103! if [$(ECHO) $(CLRERR)Fatal error: Failed to start job daemon.$(CLRRST)]
1104! endif
1105! error
1106!else
1107! error $(CLRERR)Fatal error: Failed to start job daemon.$(CLRRST)
1108!endif
[8423]1109! endif
1110! endif
1111!endif
1112
[8714]1113!endif #!TESTCASE
Note: See TracBrowser for help on using the repository browser.