source: trunk/make/process.mak@ 9030

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

New TARGET_MODE: DEPEND

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