[9031] | 1 | # $Id: process.mak,v 1.17 2002-08-20 04:05:40 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
|
---|
| 99 | TARGET_MODE = EXE
|
---|
| 100 | !endif
|
---|
| 101 |
|
---|
| 102 | # Default extension corresponds to the target mode.
|
---|
| 103 | !ifndef TARGET_EXT
|
---|
[8423] | 104 | ! if "$(TARGET_MODE)" == "DLL"
|
---|
[8253] | 105 | TARGET_EXT = $(EXT_DLL)
|
---|
| 106 | ! endif
|
---|
| 107 | ! if "$(TARGET_MODE)" == "SYS"
|
---|
| 108 | TARGET_EXT = $(EXT_SYS)
|
---|
| 109 | ! endif
|
---|
[8290] | 110 | ! if "$(TARGET_MODE)" == "IFS"
|
---|
| 111 | TARGET_EXT = $(EXT_IFS)
|
---|
| 112 | ! endif
|
---|
| 113 | ! if "$(TARGET_MODE)" == "VDD"
|
---|
| 114 | TARGET_EXT = $(EXT_VDD)
|
---|
| 115 | ! endif
|
---|
[8253] | 116 | ! if "$(TARGET_MODE)" == "EXE"
|
---|
| 117 | TARGET_EXT = $(EXT_EXE)
|
---|
| 118 | ! endif
|
---|
[8290] | 119 | ! if "$(TARGET_MODE)" == "LIB" || "$(TARGET_MODE)" == "SYSLIB" || "$(TARGET_MODE)" == "IFSLIB"
|
---|
[8253] | 120 | TARGET_EXT = $(EXT_LIB)
|
---|
| 121 | ! endif
|
---|
| 122 | ! if "$(TARGET_MODE)" == "EMPTY"
|
---|
| 123 | TARGET_EXT = empty
|
---|
| 124 | ! endif
|
---|
[9028] | 125 | ! if "$(TARGET_MODE)" == "DEPEND"
|
---|
| 126 | TARGET_EXT = depend
|
---|
| 127 | ! endif
|
---|
[8714] | 128 | ! if "$(TARGET_MODE)" == "TESTCASE"
|
---|
| 129 | TARGET_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
|
---|
| 144 | PATH_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] | 151 | TARGET = $(PATH_TARGET)\$(TARGET_NAME).$(TARGET_EXT)
|
---|
[8714] | 152 | ! else
|
---|
| 153 | TARGET = testcase
|
---|
| 154 | ! endif
|
---|
[8270] | 155 | ! endif
|
---|
[8197] | 156 | !endif
|
---|
| 157 |
|
---|
[8333] | 158 | # Default target .sym file. (output)
|
---|
| 159 | !ifndef TARGET_SYM
|
---|
| 160 | TARGET_SYM = $(PATH_TARGET)\$(TARGET_NAME).$(EXT_SYM)
|
---|
| 161 | !endif
|
---|
[8270] | 162 |
|
---|
[8253] | 163 | # Default object file. (output)
|
---|
[8197] | 164 | !ifndef TARGET_OBJS
|
---|
[8253] | 165 | TARGET_OBJS = $(PATH_TARGET)\$(TARGET_NAME).$(EXT_OBJ)
|
---|
[8197] | 166 | !endif
|
---|
| 167 |
|
---|
[8253] | 168 | # Default libraries. (input)
|
---|
[8197] | 169 | !ifndef TARGET_LIBS
|
---|
[8253] | 170 | TARGET_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] | 175 | TARGET_DEF = $(MAKEDIR)\$(PATH_DEF)\$(TARGET_NAME).def
|
---|
[8197] | 176 | !endif
|
---|
| 177 |
|
---|
[8333] | 178 | # Default modified definition filename. (output)
|
---|
| 179 | !ifndef TARGET_DEF_LINK
|
---|
| 180 | TARGET_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] | 185 | TARGET_IDEF = $(TARGET_DEF)
|
---|
[8197] | 186 | !endif
|
---|
| 187 |
|
---|
[8253] | 188 | # Default map file. (output)
|
---|
[8197] | 189 | !ifndef TARGET_MAP
|
---|
[8333] | 190 | TARGET_MAP = $(PATH_TARGET)\$(TARGET_NAME).$(EXT_MAP)
|
---|
[8197] | 191 | !endif
|
---|
| 192 |
|
---|
[8253] | 193 | # Default link file. (output)
|
---|
[8197] | 194 | !ifndef TARGET_LNK
|
---|
[8253] | 195 | TARGET_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] | 201 | TARGET_ILIB =$(PATH_LIB)\$(TARGET_NAME).$(EXT_ILIB)
|
---|
| 202 | ! endif
|
---|
[8197] | 203 | !endif
|
---|
| 204 |
|
---|
[8290] | 205 | # Default public name. (output)
|
---|
| 206 | !ifndef TARGET_PUBNAME
|
---|
| 207 | TARGET_PUBNAME=
|
---|
| 208 | ! ifdef TARGET_PUBLIC
|
---|
| 209 | ! if "$(TARGET_MODE)" == "LIB" || "$(TARGET_MODE)" == "SYSLIB" || "$(TARGET_MODE)" == "IFSLIB"
|
---|
| 210 | TARGET_PUBNAME=$(PATH_LIB)\$(TARGET_NAME).$(TARGET_EXT)
|
---|
| 211 | ! endif
|
---|
| 212 | ! if "$(TARGET_MODE)" == "EXE"
|
---|
| 213 | TARGET_PUBNAME=$(PATH_EXE)\$(TARGET_NAME).$(TARGET_EXT)
|
---|
| 214 | ! endif
|
---|
[8423] | 215 | ! if "$(TARGET_MODE)" == "DLL"
|
---|
[8290] | 216 | TARGET_PUBNAME=$(PATH_DLL)\$(TARGET_NAME).$(TARGET_EXT)
|
---|
| 217 | ! endif
|
---|
| 218 | ! if "$(TARGET_MODE)" == "SYS" || "$(TARGET_MODE)" == "IFS"
|
---|
| 219 | TARGET_PUBNAME=$(PATH_SYS)\$(TARGET_NAME).$(TARGET_EXT)
|
---|
| 220 | ! endif
|
---|
| 221 | ! if "$(TARGET_MODE)" == "VDD"
|
---|
| 222 | TARGET_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
|
---|
| 229 | TARGET_DEPEND = $(PATH_TARGET)\.depend
|
---|
[8197] | 230 | !endif
|
---|
| 231 |
|
---|
[8423] | 232 | # Default makefile names.
|
---|
| 233 | !ifndef BUILD_MAKEFILE
|
---|
| 234 | BUILD_MAKEFILE = Makefile
|
---|
| 235 | !endif
|
---|
| 236 |
|
---|
[8253] | 237 | # Default makefile name.
|
---|
| 238 | !ifndef MAKEFILE
|
---|
[8423] | 239 | MAKEFILE = $(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] | 245 | TARGET_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] | 255 | TARGET_STACKSIZE=0x2000
|
---|
| 256 | ! else
|
---|
| 257 | TARGET_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] | 508 | all: build
|
---|
| 509 |
|
---|
| 510 |
|
---|
[8253] | 511 |
|
---|
| 512 | # -----------------------------------------------------------------------------
|
---|
[9031] | 513 | # The build rule - This runs all passes:
|
---|
| 514 | # 1. Make Dependencies
|
---|
| 515 | # 2. Make Libraries (all kinds)
|
---|
| 516 | # 3. Make Executables
|
---|
| 517 | # 4. Make Miscellaneous Targets
|
---|
| 518 | # 5. Make Install
|
---|
| 519 | # Note: In order to load dependencies we'll do a forwarding after making them.
|
---|
[8253] | 520 | # -----------------------------------------------------------------------------
|
---|
[9031] | 521 | build: _build
|
---|
| 522 | !if "$(MAKEFLAGS:I=_)" == "$(MAKEFLAGS)" # this is of course broken in nmake v5.0 for OS/2.
|
---|
| 523 | @$(ECHO)$(CLRMAK)[Successfully Built Everything!] $(CLRRST)
|
---|
| 524 | !else
|
---|
| 525 | @$(ECHO)$(CLRMAK)[Built Everything! (Ignore option specified)] $(CLRRST)
|
---|
| 526 | !endif
|
---|
| 527 |
|
---|
| 528 | # internal rule shared by rebuild and build.
|
---|
| 529 | _build: _build_banner_dep dep
|
---|
| 530 | !ifndef BUILD_QUIET
|
---|
| 531 | @$(ECHO) Restarting $(CLRFIL)$(MAKEFILE)$(CLRTXT) with new dependencies. $(CLRRST)
|
---|
| 532 | !endif
|
---|
| 533 | \
|
---|
| 534 | !ifndef BUILD_VERBOSE
|
---|
| 535 | @ \
|
---|
| 536 | !endif
|
---|
| 537 | $(TOOL_MAKE) -f $(MAKEFILE) _build_new_dependencies_
|
---|
| 538 |
|
---|
| 539 | # internal rule used to reload dependencies.
|
---|
| 540 | _build_new_dependencies_: \
|
---|
| 541 | _build_banner_lib lib \
|
---|
| 542 | _build_banner_executable executable \
|
---|
| 543 | _build_banner_miscellaneous miscellaneous \
|
---|
| 544 | _build_banner_install install
|
---|
| 545 |
|
---|
| 546 | # Banners for rebuild and build.
|
---|
| 547 | _build_banner_clean:
|
---|
| 548 | @$(ECHO)$(CLRMAK)[Start Pass 0 - Make Clean] $(CLRRST)
|
---|
| 549 | @SET _BUILD_PASS=0
|
---|
| 550 | _build_banner_dep:
|
---|
| 551 | @$(ECHO)$(CLRMAK)[Start Pass 1 - Make Dependencies] $(CLRRST)
|
---|
| 552 | @SET _BUILD_PASS=1
|
---|
| 553 | _build_banner_lib:
|
---|
| 554 | @$(ECHO)$(CLRMAK)[Start Pass 2 - Make Libraries] $(CLRRST)
|
---|
| 555 | @SET _BUILD_PASS=2
|
---|
| 556 | _build_banner_executable:
|
---|
| 557 | @$(ECHO)$(CLRMAK)[Start Pass 3 - Make Executables] $(CLRRST)
|
---|
| 558 | @SET _BUILD_PASS=3
|
---|
| 559 | _build_banner_miscellaneous:
|
---|
| 560 | @$(ECHO)$(CLRMAK)[Start Pass 4 - Make Miscellaneous Targets] $(CLRRST)
|
---|
| 561 | @SET _BUILD_PASS=4
|
---|
| 562 | _build_banner_install:
|
---|
| 563 | @$(ECHO)$(CLRMAK)[Start Pass 5 - Make Install] $(CLRRST)
|
---|
| 564 | @SET _BUILD_PASS=5
|
---|
| 565 |
|
---|
| 566 |
|
---|
| 567 |
|
---|
| 568 | # -----------------------------------------------------------------------------
|
---|
| 569 | # The rebuild rule - Same as build but does a clean first (as Pass 0).
|
---|
| 570 | # -----------------------------------------------------------------------------
|
---|
| 571 | rebuild: \
|
---|
| 572 | _build_banner_clean clean \
|
---|
| 573 | _build
|
---|
| 574 | !if "$(MAKEFLAGS:i=_)" == "$(MAKEFLAGS)"
|
---|
| 575 | @$(ECHO)$(CLRMAK)[Successfully Rebuilt Everything!] $(CLRRST)
|
---|
| 576 | !else
|
---|
| 577 | @$(ECHO)$(CLRMAK)[Rebuilt Everything! (Ignore option specified)] $(CLRRST)
|
---|
| 578 | !endif
|
---|
| 579 |
|
---|
| 580 |
|
---|
| 581 |
|
---|
| 582 | # -----------------------------------------------------------------------------
|
---|
| 583 | # Pass 0 - The clean rule - Clean up output files.
|
---|
| 584 | # The current setup doesn't clean the installed ones.
|
---|
| 585 | # -----------------------------------------------------------------------------
|
---|
| 586 | !if "$(TARGET_MODE)" != "TESTCASE"
|
---|
| 587 | clean:
|
---|
| 588 | @$(ECHO) Cleaning... $(CLRRST)
|
---|
| 589 | !if "$(PATH_TARGET)" != "" # paranoia
|
---|
| 590 | \
|
---|
| 591 | ! ifndef BUILD_VERBOSE
|
---|
| 592 | @ \
|
---|
| 593 | ! endif
|
---|
| 594 | $(TOOL_RM) \
|
---|
| 595 | $(PATH_TARGET)\*.$(EXT_OBJ) \
|
---|
| 596 | $(PATH_TARGET)\*.$(EXT_ILIB) \
|
---|
| 597 | $(PATH_TARGET)\*.$(EXT_EXE) \
|
---|
| 598 | $(PATH_TARGET)\*.$(EXT_DLL) \
|
---|
| 599 | $(PATH_TARGET)\*.$(EXT_RES)
|
---|
| 600 | \
|
---|
| 601 | ! ifndef BUILD_VERBOSE
|
---|
| 602 | @ \
|
---|
| 603 | ! endif
|
---|
| 604 | $(TOOL_RM) \
|
---|
| 605 | $(PATH_TARGET)\*.$(EXT_SYS) \
|
---|
| 606 | $(PATH_TARGET)\*.$(EXT_LIB) \
|
---|
| 607 | $(PATH_TARGET)\*.$(EXT_IFS) \
|
---|
| 608 | $(PATH_TARGET)\*.$(EXT_MAP) \
|
---|
| 609 | $(PATH_TARGET)\*.$(EXT_SYM)
|
---|
| 610 | \
|
---|
| 611 | ! ifndef BUILD_VERBOSE
|
---|
| 612 | @ \
|
---|
| 613 | ! endif
|
---|
| 614 | $(TOOL_RM) \
|
---|
| 615 | $(PATH_TARGET)\*.s \
|
---|
| 616 | $(PATH_TARGET)\*.lst \
|
---|
| 617 | $(PATH_TARGET)\*.lnk \
|
---|
| 618 | $(PATH_TARGET)\*.ii \
|
---|
| 619 | $(PATH_TARGET)\.depend
|
---|
| 620 | \
|
---|
| 621 | ! ifndef BUILD_VERBOSE
|
---|
| 622 | @ \
|
---|
| 623 | ! endif
|
---|
| 624 | $(TOOL_RM) \
|
---|
| 625 | .\*.ii \
|
---|
| 626 | .\*.err \
|
---|
| 627 | .\.depend
|
---|
| 628 | !endif
|
---|
[8197] | 629 | !ifdef SUBDIRS
|
---|
[9031] | 630 | @$(TOOL_DODIRS) "$(SUBDIRS)" $(TOOL_MAKE) -f $(BUILD_MAKEFILE) NODEP=1 $@
|
---|
[8197] | 631 | !endif
|
---|
[9031] | 632 | !ifdef PREMAKEFILES
|
---|
| 633 | @$(TOOL_DOMAKES) "$(PREMAKEFILES)" $(TOOL_MAKE) NODEP=1 $@
|
---|
| 634 | !endif
|
---|
| 635 | !ifdef POSTMAKEFILES
|
---|
| 636 | @$(TOOL_DOMAKES) "$(POSTMAKEFILES)" $(TOOL_MAKE) NODEP=1 $@
|
---|
| 637 | !endif
|
---|
| 638 | !endif #!TESTCASE
|
---|
[8197] | 639 |
|
---|
[9031] | 640 |
|
---|
| 641 |
|
---|
| 642 | # -----------------------------------------------------------------------------
|
---|
| 643 | # Pass 1 - The dep rule - Make dependencies.
|
---|
| 644 | # -----------------------------------------------------------------------------
|
---|
| 645 | dep:
|
---|
| 646 | @$(ECHO) Making dependencies... $(CLRRST)
|
---|
| 647 | \
|
---|
| 648 | !ifndef BUILD_VERBOSE
|
---|
| 649 | @ \
|
---|
| 650 | !endif
|
---|
| 651 | !if "$(TARGET_MODE)" != "EMPTY" && "$(TARGET_MODE)" != "TESTCASE"
|
---|
| 652 | $(TOOL_DEP) $(TOOL_DEP_FLAGS) -o$$(PATH_TARGET) -d$(TARGET_DEPEND)\
|
---|
| 653 | ! ifdef TARGET_NO_DEP
|
---|
| 654 | -x$(TARGET_NO_DEP: =;)\
|
---|
| 655 | ! endif
|
---|
| 656 | $(TOOL_DEP_FILES)
|
---|
| 657 | !endif
|
---|
| 658 | !ifdef SUBDIRS
|
---|
| 659 | @$(TOOL_DODIRS) "$(SUBDIRS)" $(TOOL_MAKE) -f $(BUILD_MAKEFILE) NODEP=1 $@
|
---|
| 660 | !endif
|
---|
[8197] | 661 | !ifdef PREMAKEFILES
|
---|
[9031] | 662 | @$(TOOL_DOMAKES) "$(PREMAKEFILES)" $(TOOL_MAKE) NODEP=1 $@
|
---|
[8197] | 663 | !endif
|
---|
| 664 | !ifdef POSTMAKEFILES
|
---|
[9031] | 665 | @$(TOOL_DOMAKES) "$(POSTMAKEFILES)" $(TOOL_MAKE) NODEP=1 $@
|
---|
[8197] | 666 | !endif
|
---|
| 667 |
|
---|
| 668 |
|
---|
[8253] | 669 |
|
---|
| 670 | # -----------------------------------------------------------------------------
|
---|
[9031] | 671 | # Pass 2 - The lib rule - Make libraries.
|
---|
[8253] | 672 | # -----------------------------------------------------------------------------
|
---|
[8197] | 673 | !ifdef SUBDIRS
|
---|
[9031] | 674 | SUBDIRS_LIB = _subdir_lib
|
---|
[8197] | 675 | $(SUBDIRS_LIB):
|
---|
[8423] | 676 | @$(TOOL_DODIRS) "$(SUBDIRS)" $(TOOL_MAKE) -f $(BUILD_MAKEFILE) lib
|
---|
[8197] | 677 | !endif
|
---|
| 678 |
|
---|
| 679 | !ifdef PREMAKEFILES
|
---|
[9031] | 680 | PREMAKEFILES_LIB = _premakefiles_lib
|
---|
[8197] | 681 | $(PREMAKEFILES_LIB):
|
---|
| 682 | @$(TOOL_DOMAKES) "$(PREMAKEFILES)" $(TOOL_MAKE) lib
|
---|
| 683 | !endif
|
---|
| 684 |
|
---|
[9031] | 685 | lib: $(SUBDIRS_LIB) $(PREMAKEFILES_LIB) \
|
---|
| 686 | !if "$(TARGET_MODE)" == "LIB" || "$(TARGET_MODE)" == "SYSLIB" || "$(TARGET_MODE)" == "IFSLIB"
|
---|
| 687 | $(TARGET) $(TARGET_PUBNAME) \
|
---|
| 688 | !endif
|
---|
| 689 | $(TARGET_ILIB)
|
---|
| 690 | !ifdef POSTMAKEFILES
|
---|
| 691 | @$(TOOL_DOMAKES) "$(POSTMAKEFILES)" $(TOOL_MAKE) $@
|
---|
| 692 | !endif
|
---|
| 693 |
|
---|
| 694 |
|
---|
| 695 |
|
---|
| 696 | # -----------------------------------------------------------------------------
|
---|
| 697 | # Pass 3 - The executable rule - Build the executables.
|
---|
| 698 | # -----------------------------------------------------------------------------
|
---|
| 699 | !ifdef SUBDIRS
|
---|
| 700 | SUBDIRS_EXECUTABLE = _subdir_executable
|
---|
| 701 | $(SUBDIRS_EXECUTABLE):
|
---|
| 702 | @$(TOOL_DODIRS) "$(SUBDIRS)" $(TOOL_MAKE) -f $(BUILD_MAKEFILE) executable
|
---|
| 703 | !endif
|
---|
| 704 |
|
---|
| 705 | !ifdef PREMAKEFILES
|
---|
| 706 | PREMAKEFILES_EXECUTABLE = _premakefiles_executable
|
---|
| 707 | $(PREMAKEFILES_EXECUTABLE):
|
---|
| 708 | @$(TOOL_DOMAKES) "$(PREMAKEFILES)" $(TOOL_MAKE) executable
|
---|
| 709 | !endif
|
---|
| 710 |
|
---|
| 711 | executable: \
|
---|
| 712 | !if "$(TARGET_MODE)" != "LIB" && "$(TARGET_MODE)" != "SYSLIB" && "$(TARGET_MODE)" != "IFSLIB"
|
---|
| 713 | $(SUBDIRS_EXECUTABLE) $(PREMAKEFILES_EXECUTABLE) $(TARGET) $(TARGET_PUBNAME)
|
---|
| 714 | @$(ECHO) Successfully Built $(CLRFIL)$(TARGET)$(CLRRST)
|
---|
[8290] | 715 | !else
|
---|
[9031] | 716 | $(SUBDIRS_EXECUTABLE) $(PREMAKEFILES_EXECUTABLE)
|
---|
[8290] | 717 | !endif
|
---|
[8197] | 718 | !ifdef POSTMAKEFILES
|
---|
| 719 | @$(TOOL_DOMAKES) "$(POSTMAKEFILES)" $(TOOL_MAKE) $@
|
---|
| 720 | !endif
|
---|
| 721 |
|
---|
| 722 |
|
---|
[8253] | 723 |
|
---|
| 724 | # -----------------------------------------------------------------------------
|
---|
[9031] | 725 | # Pass 4 - The miscellaneous rule - Makes other miscellaneous stuff like
|
---|
| 726 | # documentations etc. This is experimental for the moment.
|
---|
| 727 | # -----------------------------------------------------------------------------
|
---|
| 728 | !ifdef SUBDIRS
|
---|
| 729 | SUBDIRS_MISC = _subdir_misc
|
---|
| 730 | $(SUBDIRS_MISC):
|
---|
| 731 | @$(TOOL_DODIRS) "$(SUBDIRS)" $(TOOL_MAKE) -f $(BUILD_MAKEFILE) miscellaneous
|
---|
| 732 | !endif
|
---|
| 733 |
|
---|
| 734 | !ifdef PREMAKEFILES
|
---|
| 735 | PREMAKEFILES_MISC = _premakefiles_misc
|
---|
| 736 | $(PREMAKEFILES_MISC):
|
---|
| 737 | @$(TOOL_DOMAKES) "$(PREMAKEFILES)" $(TOOL_MAKE) miscellaneous
|
---|
| 738 | !endif
|
---|
| 739 |
|
---|
| 740 | miscellaneous: $(SUBDIRS_MISC) $(PREMAKEFILES_MISC) \
|
---|
| 741 | $(TARGET_DOCS) $(TARGET_MISC)
|
---|
| 742 | !if "$(TARGET_DOCS)$(TARGET_MISC)" != ""
|
---|
| 743 | @$(ECHO) Successfully Built $(CLRFIL)$(TARGET_DOCS) $(TARGET_MISC)$(CLRRST)
|
---|
| 744 | !else
|
---|
| 745 | !endif
|
---|
| 746 | !ifdef POSTMAKEFILES
|
---|
| 747 | @$(TOOL_DOMAKES) "$(POSTMAKEFILES)" $(TOOL_MAKE) $@
|
---|
| 748 | !endif
|
---|
| 749 |
|
---|
| 750 |
|
---|
| 751 |
|
---|
| 752 | # -----------------------------------------------------------------------------
|
---|
| 753 | # Pass 5 - The install rule - Copies target to main binary directory.
|
---|
[8253] | 754 | # Installation order is not concidered vital, so subdirectories and
|
---|
| 755 | # pre-makefiles are processed after this directory. This might be changed.
|
---|
| 756 | # -----------------------------------------------------------------------------
|
---|
[8197] | 757 | install:
|
---|
[8290] | 758 | !if "$(TARGET_PUBLIC)" == ""
|
---|
| 759 | ! if "$(TARGET_MODE)" == "EXE"
|
---|
| 760 | @$(ECHO) Installing $(CLRFIL)$(TARGET)$(CLRTXT) in directory $(CLRFIL)$(PATH_BIN)$(CLRRST)
|
---|
| 761 | @if not exist $(TARGET) $(ECHO) $(CLRERR)WARNING: $(CLRFIL)$(TARGET)$(CLRERR) doesn't exist. $(CLRRST)
|
---|
[8423] | 762 | @if not exist $(PATH_BIN) $(TOOL_CREATEPATH) $(PATH_BIN)
|
---|
[8333] | 763 | @if exist $(TARGET) $(TOOL_COPY) $(TARGET) $(PATH_BIN)
|
---|
| 764 | @if exist $(TARGET_SYM) $(TOOL_COPY) $(TARGET_SYM) $(PATH_BIN)
|
---|
[8290] | 765 | ! endif
|
---|
[8423] | 766 | ! if "$(TARGET_MODE)" == "DLL"
|
---|
[8290] | 767 | @$(ECHO) Installing $(CLRFIL)$(TARGET)$(CLRTXT) in directory $(CLRFIL)$(PATH_DLL)$(CLRRST)
|
---|
| 768 | @if not exist $(TARGET) $(ECHO) $(CLRERR)WARNING: $(CLRFIL)$(TARGET)$(CLRERR) doesn't exist. $(CLRRST)
|
---|
[8423] | 769 | @if not exist $(PATH_DLL) $(TOOL_CREATEPATH) $(PATH_DLL)
|
---|
[8333] | 770 | @if exist $(TARGET) $(TOOL_COPY) $(TARGET) $(PATH_DLL)
|
---|
| 771 | @if exist $(TARGET_SYM) $(TOOL_COPY) $(TARGET_SYM) $(PATH_DLL)
|
---|
[8290] | 772 | ! endif
|
---|
| 773 | ! if "$(TARGET_MODE)" == "SYS" || "$(TARGET_MODE)" == "IFS"
|
---|
| 774 | @$(ECHO) Installing $(CLRFIL)$(TARGET)$(CLRTXT) in directory $(CLRFIL)$(PATH_SYS)$(CLRRST)
|
---|
| 775 | @if not exist $(TARGET) $(ECHO) $(CLRERR)WARNING: $(CLRFIL)$(TARGET)$(CLRERR) doesn't exist. $(CLRRST)
|
---|
[8423] | 776 | @if not exist $(PATH_SYS) $(TOOL_CREATEPATH) $(PATH_SYS)
|
---|
[8333] | 777 | @if exist $(TARGET) $(TOOL_COPY) $(TARGET) $(PATH_SYS)
|
---|
| 778 | @if exist $(TARGET_SYM) $(TOOL_COPY) $(TARGET_SYM) $(PATH_SYS)
|
---|
[8290] | 779 | ! endif
|
---|
[8423] | 780 | !if 0 # these targets are either TARGET_PUBLIC or all private.
|
---|
[8290] | 781 | ! if "$(TARGET_MODE)" == "LIB" || "$(TARGET_MODE)" == "SYSLIB" || "$(TARGET_MODE)" == "IFSLIB"
|
---|
| 782 | @$(ECHO) Installing $(CLRFIL)$(TARGET)$(CLRTXT) in directory $(CLRFIL)$(PATH_LIB)$(CLRRST)
|
---|
| 783 | @if not exist $(TARGET) $(ECHO) $(CLRERR)WARNING: $(CLRFIL)$(TARGET)$(CLRERR) doesn't exist. $(CLRRST)
|
---|
[8423] | 784 | @if not exist $(PATH_LIB) $(TOOL_CREATEPATH) $(PATH_LIB)
|
---|
[8333] | 785 | @if exist $(TARGET) $(TOOL_COPY) $(TARGET) $(PATH_LIB)
|
---|
| 786 | @if exist $(TARGET_SYM) $(TOOL_COPY) $(TARGET_SYM) $(PATH_LIB)
|
---|
[8290] | 787 | ! endif
|
---|
| 788 | ! endif
|
---|
[8197] | 789 | !endif
|
---|
| 790 | !if "$(TARGET_DOCS)" != ""
|
---|
| 791 | $(TOOL_COPY) $(TARGET_DOCS) $(PATH_DOC)
|
---|
| 792 | !endif
|
---|
| 793 | !ifdef SUBDIRS
|
---|
[8423] | 794 | @$(TOOL_DODIRS) "$(SUBDIRS)" $(TOOL_MAKE) -f $(BUILD_MAKEFILE) $@
|
---|
[8197] | 795 | !endif
|
---|
| 796 | !ifdef PREMAKEFILES
|
---|
| 797 | @$(TOOL_DOMAKES) "$(PREMAKEFILES)" $(TOOL_MAKE) $@
|
---|
| 798 | !endif
|
---|
| 799 | !ifdef POSTMAKEFILES
|
---|
| 800 | @$(TOOL_DOMAKES) "$(POSTMAKEFILES)" $(TOOL_MAKE) $@
|
---|
| 801 | !endif
|
---|
| 802 |
|
---|
| 803 |
|
---|
[8253] | 804 |
|
---|
[9031] | 805 | # -----------------------------------------------------------------------------
|
---|
| 806 | # Pass x - The testcase rule - Execute testcases when present.
|
---|
| 807 | # Testcases are either a testcase.mak file or a testcase subdirectory.
|
---|
| 808 | # -----------------------------------------------------------------------------
|
---|
[8714] | 809 | !if "$(TARGET_MODE)" != "TESTCASE"
|
---|
| 810 | !ifndef BUILD_OWN_TESTCASE_RULE
|
---|
| 811 | !ifndef MAKEVER
|
---|
| 812 | _TESTCASE_TST1 = [$(TOOL_EXISTS) testcase] == 0
|
---|
| 813 | _TESTCASE_TST2 = [$(TOOL_EXISTS) testcase.mak] == 0
|
---|
| 814 | !else
|
---|
| 815 | _TESTCASE_TST1 = exists(testcase) != 0
|
---|
| 816 | _TESTCASE_TST2 = exists(testcase.mak) != 0
|
---|
| 817 | !endif
|
---|
[9031] | 818 |
|
---|
[8290] | 819 | testcase:
|
---|
[9031] | 820 | @$(ECHO) Executing testcases $(CLRRST)
|
---|
[8714] | 821 | !if $(_TESTCASE_TST1)
|
---|
[8423] | 822 | @$(TOOL_DODIRS) "testcase" $(TOOL_MAKE) -f $(BUILD_MAKEFILE) $@
|
---|
[8197] | 823 | !endif
|
---|
[8714] | 824 | !if $(_TESTCASE_TST2)
|
---|
[8197] | 825 | @$(TOOL_DOMAKES) "testcase.mak" $(TOOL_MAKE) $@
|
---|
| 826 | !endif
|
---|
| 827 | !ifdef SUBDIRS
|
---|
[8423] | 828 | @$(TOOL_DODIRS) "$(SUBDIRS)" $(TOOL_MAKE) -f $(BUILD_MAKEFILE) $@
|
---|
[8197] | 829 | !endif
|
---|
| 830 | !ifdef PREMAKEFILES
|
---|
| 831 | @$(TOOL_DOMAKES) "$(PREMAKEFILES)" $(TOOL_MAKE) $@
|
---|
| 832 | !endif
|
---|
| 833 | !ifdef POSTMAKEFILES
|
---|
| 834 | @$(TOOL_DOMAKES) "$(POSTMAKEFILES)" $(TOOL_MAKE) $@
|
---|
| 835 | !endif
|
---|
| 836 | !endif
|
---|
[8714] | 837 | !endif #!TESTCASE
|
---|
[8197] | 838 |
|
---|
| 839 |
|
---|
[8253] | 840 |
|
---|
| 841 | # -----------------------------------------------------------------------------
|
---|
[9031] | 842 | # The target rule - Build the target.
|
---|
| 843 | # Note: This also builds libraries in subdirectories and submakefiles.
|
---|
[8298] | 844 | # -----------------------------------------------------------------------------
|
---|
[9031] | 845 | !ifdef SUBDIRS
|
---|
| 846 | SUBDIRS_TARGET = _subdir_target
|
---|
| 847 | $(SUBDIRS_TARGET):
|
---|
| 848 | @$(TOOL_DODIRS) "$(SUBDIRS)" $(TOOL_MAKE) -f $(BUILD_MAKEFILE) target
|
---|
[8298] | 849 | !endif
|
---|
| 850 |
|
---|
[8197] | 851 | !ifdef PREMAKEFILES
|
---|
[9031] | 852 | PREMAKEFILES_TARGET = _premakefiles_target
|
---|
| 853 | $(PREMAKEFILES_TARGET):
|
---|
| 854 | @$(TOOL_DOMAKES) "$(PREMAKEFILES)" $(TOOL_MAKE) target
|
---|
[8197] | 855 | !endif
|
---|
[9031] | 856 |
|
---|
| 857 | target: $(SUBDIRS_TARGET) $(PREMAKEFILES_TARGET) $(TARGET) $(TARGET_ILIB) $(TARGET_PUBNAME)
|
---|
| 858 | @$(ECHO) Successfully Built $(CLRFIL)$(TARGET) $(TARGET_ILIB)$(CLRRST)
|
---|
[8197] | 859 | !ifdef POSTMAKEFILES
|
---|
[9031] | 860 | @$(TOOL_DOMAKES) "$(POSTMAKEFILES)" $(TOOL_MAKE) $@
|
---|
[8197] | 861 | !endif
|
---|
| 862 |
|
---|
| 863 |
|
---|
[8253] | 864 |
|
---|
| 865 | # -----------------------------------------------------------------------------
|
---|
[9031] | 866 | # The shell rule - Setup the correcte shell environment and start a shell.
|
---|
[8253] | 867 | # -----------------------------------------------------------------------------
|
---|
[9031] | 868 | shell:
|
---|
| 869 | @$(ECHO) Creating work shell $(CLRRST)
|
---|
| 870 | \
|
---|
| 871 | !ifndef BUILD_VERBOSE
|
---|
| 872 | @ \
|
---|
[8197] | 873 | !endif
|
---|
[9031] | 874 | -$(TOOL_BUILDENV) $(BUILD_ENVS_BASE_PRE) $(BUILD_ENVS_PRE) $(ENV_ENVS) \
|
---|
| 875 | $(BUILD_ENVS_BASE_POST) $(BUILD_ENVS_POST) * $(COMSPEC)
|
---|
[8714] | 876 |
|
---|
| 877 |
|
---|
| 878 |
|
---|
| 879 | # -----------------------------------------------------------------------------
|
---|
| 880 | # The nothing rule - Rule for testing the makefile structure.
|
---|
| 881 | # -----------------------------------------------------------------------------
|
---|
| 882 | nothing:
|
---|
[9031] | 883 | @$(ECHO) Doing nothing in $(MAKEFILE).
|
---|
[8714] | 884 | !ifdef SUBDIRS
|
---|
[8423] | 885 | @$(TOOL_DODIRS) "$(SUBDIRS)" $(TOOL_MAKE) -f $(BUILD_MAKEFILE) $@
|
---|
[8197] | 886 | !endif
|
---|
| 887 | !ifdef PREMAKEFILES
|
---|
| 888 | @$(TOOL_DOMAKES) "$(PREMAKEFILES)" $(TOOL_MAKE) $@
|
---|
| 889 | !endif
|
---|
| 890 | !ifdef POSTMAKEFILES
|
---|
| 891 | @$(TOOL_DOMAKES) "$(POSTMAKEFILES)" $(TOOL_MAKE) $@
|
---|
| 892 | !endif
|
---|
[8714] | 893 | @$(ECHO) Completed nothing in $(MAKEFILE).
|
---|
[8197] | 894 |
|
---|
| 895 |
|
---|
[8253] | 896 |
|
---|
| 897 | # -----------------------------------------------------------------------------
|
---|
| 898 | # The $(TARGET) rule - For EXE, DLL, SYS and IFS targets
|
---|
| 899 | # -----------------------------------------------------------------------------
|
---|
[8423] | 900 | !if "$(TARGET_MODE)" == "EXE" || "$(TARGET_MODE)" == "DLL" || "$(TARGET_MODE)" == "SYS" || "$(TARGET_MODE)" == "IFS" || "$(TARGET_MODE)" == "VDD"
|
---|
[8333] | 901 | $(TARGET): $(TARGET_OBJS) $(TARGET_RES) $(TARGET_DEF_LINK) $(TARGET_LNK) $(TARGET_DEPS)
|
---|
[8423] | 902 | !if "$(TOOL_JOB_WAIT)" != ""
|
---|
| 903 | ! ifndef BUILD_QUIET
|
---|
[8714] | 904 | @$(ECHO) Waiting for jobs to complete $(CLRRST)
|
---|
[8423] | 905 | ! endif
|
---|
[8714] | 906 | \
|
---|
[8423] | 907 | ! ifndef BUILD_VERBOSE
|
---|
[8714] | 908 | @ \
|
---|
[8423] | 909 | ! endif
|
---|
[8714] | 910 | $(TOOL_JOB_WAIT)
|
---|
[8423] | 911 | !endif
|
---|
[8197] | 912 | @$(ECHO) Linking $(TARGET_MODE) $(CLRFIL)$@ $(CLRRST)
|
---|
[8714] | 913 | \
|
---|
[8290] | 914 | !ifndef BUILD_VERBOSE
|
---|
| 915 | @ \
|
---|
| 916 | !endif
|
---|
[8197] | 917 | !ifdef TARGET_IGNORE_LINKER_WARNINGS
|
---|
| 918 | -4 \
|
---|
| 919 | !endif
|
---|
| 920 | !if "$(TARGET_MODE)" == "EXE"
|
---|
[8253] | 921 | $(LINK_CMD_EXE)
|
---|
[8197] | 922 | !endif
|
---|
[8423] | 923 | !if "$(TARGET_MODE)" == "DLL"
|
---|
[8290] | 924 | $(LINK_CMD_DLL)
|
---|
[8197] | 925 | !endif
|
---|
| 926 | !if "$(TARGET_MODE)" == "SYS"
|
---|
[8290] | 927 | $(LINK_CMD_SYS)
|
---|
[8197] | 928 | !endif
|
---|
[8213] | 929 | !if "$(TARGET_MODE)" == "IFS"
|
---|
[8290] | 930 | $(LINK_CMD_IFS)
|
---|
[8213] | 931 | !endif
|
---|
[8290] | 932 | !if "$(TARGET_MODE)" == "VDD"
|
---|
| 933 | $(LINK_CMD_VDD)
|
---|
| 934 | !endif
|
---|
[8197] | 935 | !if "$(TARGET_RES)" != "" && "$(RL)" != ""
|
---|
| 936 | @$(ECHO) Linking Resources $(CLRRST)
|
---|
[8714] | 937 | \
|
---|
[8290] | 938 | ! ifndef BUILD_VERBOSE
|
---|
| 939 | @ \
|
---|
| 940 | ! endif
|
---|
| 941 | $(RL) $(RL_FLAGS) $(TARGET_RES) $@
|
---|
[8197] | 942 | !endif
|
---|
| 943 | !if "$(TARGET_DLLRNAME)" != ""
|
---|
| 944 | @$(ECHO) Dll Rename $(TARGET_DLLRNAME)
|
---|
[8714] | 945 | \
|
---|
[8290] | 946 | ! ifndef BUILD_VERBOSE
|
---|
| 947 | @ \
|
---|
| 948 | ! endif
|
---|
[8197] | 949 | $(TOOL_DLLRNAME) $(TARGET) $(TARGET_DLLRNAME)
|
---|
| 950 | !endif
|
---|
[8333] | 951 | !if "$(TOOL_MAPSYM)" != "" && "$(TARGET_SYM)" != "" && "$(TARGET_MAP)" != ""
|
---|
[8714] | 952 | \
|
---|
[8333] | 953 | ! ifndef BUILD_VERBOSE
|
---|
| 954 | @ \
|
---|
| 955 | ! endif
|
---|
| 956 | $(TOOL_MAPSYM) $(TARGET_MAP) $(TARGET_SYM)
|
---|
| 957 | !endif
|
---|
[8197] | 958 |
|
---|
| 959 |
|
---|
| 960 | #
|
---|
| 961 | # Linker parameter file.
|
---|
| 962 | #
|
---|
| 963 | $(TARGET_LNK): $(MAKE_INCLUDE_PROCESS) $(MAKE_INCLUDE_SETUP) $(PATH_MAKE)\setup.mak $(MAKEFILE)
|
---|
[8362] | 964 | !ifndef TOOL_DEFCONV
|
---|
[8714] | 965 | @$(TOOL_ECHO) Creating Linker Input File $(CLRRST)<<$@
|
---|
[8197] | 966 | $(LINK_LNK1)
|
---|
| 967 | $(LINK_LNK2)
|
---|
| 968 | $(LINK_LNK3)
|
---|
| 969 | $(LINK_LNK4)
|
---|
| 970 | $(LINK_LNK5)
|
---|
| 971 | <<KEEP
|
---|
[8362] | 972 | !else
|
---|
| 973 | @$(ECHO) Creating Linker Input File $(CLRRST) $@
|
---|
| 974 | @$(TOOL_RM) $@
|
---|
[8714] | 975 | \
|
---|
[8362] | 976 | ! ifdef BUILD_VERBOSE
|
---|
| 977 | @ \
|
---|
| 978 | ! endif
|
---|
| 979 | $(TOOL_DEFCONV) $(TARGET_DEF_LINK) $@ <<$(TARGET_LNK)2
|
---|
| 980 | #
|
---|
| 981 | # LINK_LNK[1-5]:
|
---|
| 982 | #
|
---|
| 983 | $(LINK_LNK1)
|
---|
| 984 | $(LINK_LNK2)
|
---|
| 985 | $(LINK_LNK3)
|
---|
| 986 | $(LINK_LNK4)
|
---|
| 987 | $(LINK_LNK5)
|
---|
| 988 | <<keep
|
---|
| 989 | !endif
|
---|
[8355] | 990 | !ifdef BUILD_VERBOSE
|
---|
| 991 | @type $@
|
---|
| 992 | !endif
|
---|
[8333] | 993 |
|
---|
| 994 |
|
---|
| 995 | #
|
---|
| 996 | # Builddef modified definition file.
|
---|
| 997 | #
|
---|
| 998 | !if "$(TARGET_DEF_LINK)" != "$(TARGET_DEF)"
|
---|
| 999 | $(TARGET_DEF_LINK): $(TARGET_DEF)
|
---|
| 1000 | ! ifndef BUILD_QUIET
|
---|
| 1001 | @$(ECHO) Stamping deffile with build level info.$(CLRRST)
|
---|
| 1002 | ! endif
|
---|
[8714] | 1003 | \
|
---|
[8333] | 1004 | ! ifndef BUILD_VERBOSE
|
---|
| 1005 | @ \
|
---|
| 1006 | ! endif
|
---|
| 1007 | $(TOOL_BLDLEVEL) $(BUILD_BLDLEVEL_FLAGS) $(TARGET_BLDLEVEL_FLAGS) -R$** $** $@
|
---|
[8290] | 1008 | !endif
|
---|
[8197] | 1009 |
|
---|
[8333] | 1010 | !endif
|
---|
[8197] | 1011 |
|
---|
[8333] | 1012 |
|
---|
[8253] | 1013 | # -----------------------------------------------------------------------------
|
---|
[8290] | 1014 | # The $(TARGET) rule - For LIB, SYSLIB, and IFSLIB targets.
|
---|
[8253] | 1015 | # -----------------------------------------------------------------------------
|
---|
[8290] | 1016 | !if "$(TARGET_MODE)" == "LIB" || "$(TARGET_MODE)" == "SYSLIB" || "$(TARGET_MODE)" == "IFSLIB"
|
---|
[8197] | 1017 | $(TARGET): $(TARGET_OBJS) $(TARGET_LNK) $(TARGET_DEPS)
|
---|
[8423] | 1018 | !if "$(TOOL_JOB_WAIT)" != ""
|
---|
| 1019 | ! ifndef BUILD_QUIET
|
---|
| 1020 | @$(ECHO) Waiting for jobs to complete $(CLRRST)
|
---|
| 1021 | ! endif
|
---|
[8714] | 1022 | \
|
---|
[8423] | 1023 | ! ifndef BUILD_VERBOSE
|
---|
| 1024 | @ \
|
---|
| 1025 | ! endif
|
---|
| 1026 | $(TOOL_JOB_WAIT)
|
---|
| 1027 | !endif
|
---|
[8197] | 1028 | @$(ECHO) Creating Library $(CLRFIL)$@ $(CLRRST)
|
---|
[8290] | 1029 | !ifndef BUILD_VERBOSE
|
---|
| 1030 | @$(TOOL_RM) $@
|
---|
| 1031 | @$(AR_CMD)
|
---|
| 1032 | !else
|
---|
[8197] | 1033 | $(TOOL_RM) $@
|
---|
| 1034 | $(AR_CMD)
|
---|
[8290] | 1035 | !endif
|
---|
[8197] | 1036 |
|
---|
| 1037 |
|
---|
| 1038 | #
|
---|
| 1039 | # Lib parameter file.
|
---|
| 1040 | #
|
---|
| 1041 | $(TARGET_LNK): $(MAKE_INCLUDE_PROCESS) $(MAKE_INCLUDE_SETUP) $(PATH_MAKE)\setup.mak $(MAKEFILE)
|
---|
[8714] | 1042 | @$(TOOL_ECHO) Creating Lib Input File $(CLRRST)<<$@
|
---|
[8197] | 1043 | $(AR_LNK1)
|
---|
| 1044 | $(AR_LNK2)
|
---|
| 1045 | $(AR_LNK3)
|
---|
| 1046 | $(AR_LNK4)
|
---|
| 1047 | $(AR_LNK5)
|
---|
| 1048 | <<KEEP
|
---|
[8423] | 1049 | !ifdef BUILD_VERBOSE
|
---|
| 1050 | @type $@
|
---|
[8197] | 1051 | !endif
|
---|
[8423] | 1052 | !endif
|
---|
[8197] | 1053 |
|
---|
| 1054 |
|
---|
[9031] | 1055 | # -----------------------------------------------------------------------------
|
---|
[8290] | 1056 | # Copy rule for public targets.
|
---|
[9031] | 1057 | # Normally used for public libraries, but may be used for other purposes...
|
---|
| 1058 | # -----------------------------------------------------------------------------
|
---|
[8290] | 1059 | !if "$(TARGET_PUBNAME)" != ""
|
---|
| 1060 | $(TARGET_PUBNAME): $(TARGET)
|
---|
| 1061 | @$(ECHO) Copying $(CLRFIL)$(TARGET)$(CLRTXT) to $(CLRFIL)$(@D)$(CLRRST)
|
---|
[8714] | 1062 | \
|
---|
[8290] | 1063 | !ifndef BUILD_VERBOSE
|
---|
[8423] | 1064 | @if not exist $(@D) $(ECHO) Target public path $(CLRFIL)$(@D)$(CLRTXT) does NOT exist. Creating. $(CLRRST)
|
---|
| 1065 | !endif
|
---|
| 1066 | @if not exist $(@D) $(TOOL_CREATEPATH) $(@D)
|
---|
[8714] | 1067 | \
|
---|
[8423] | 1068 | !ifndef BUILD_VERBOSE
|
---|
[8290] | 1069 | @ \
|
---|
[8197] | 1070 | !endif
|
---|
[8290] | 1071 | $(TOOL_COPY) $** $@
|
---|
[8333] | 1072 | @if exist $(TARGET_SYM) $(TOOL_COPY) $(TARGET_SYM) $(@R).sym
|
---|
[8290] | 1073 | !endif
|
---|
[8197] | 1074 |
|
---|
| 1075 |
|
---|
[8253] | 1076 |
|
---|
| 1077 | # -----------------------------------------------------------------------------
|
---|
[9031] | 1078 | # The $(TARGET) rule - For DEPEND targets.
|
---|
[8253] | 1079 | # -----------------------------------------------------------------------------
|
---|
[9028] | 1080 | !if "$(TARGET_MODE)" == "DEPEND"
|
---|
| 1081 | $(TARGET):
|
---|
| 1082 | @$(ECHO) .
|
---|
[8197] | 1083 | !endif
|
---|
| 1084 |
|
---|
| 1085 |
|
---|
[8253] | 1086 |
|
---|
| 1087 | # -----------------------------------------------------------------------------
|
---|
| 1088 | # The $(TARGET_ILIB) rule - Make import library.
|
---|
| 1089 | # -----------------------------------------------------------------------------
|
---|
| 1090 | !ifdef TARGET_ILIB
|
---|
| 1091 | $(TARGET_ILIB): $(TARGET_IDEF)
|
---|
| 1092 | @$(ECHO) Creating Import Library $(CLRFIL)$@ $(CLRRST)
|
---|
[8714] | 1093 | \
|
---|
[8290] | 1094 | !ifndef BUILD_VERBOSE
|
---|
| 1095 | @ \
|
---|
| 1096 | !endif
|
---|
[8253] | 1097 | $(IMPLIB) $(IMPLIB_FLAGS) $@ $(TARGET_IDEF)
|
---|
| 1098 | !endif
|
---|
| 1099 |
|
---|
| 1100 |
|
---|
| 1101 |
|
---|
| 1102 | # -----------------------------------------------------------------------------
|
---|
| 1103 | # The .force rule - Force a remake of something everytime.
|
---|
| 1104 | # -----------------------------------------------------------------------------
|
---|
| 1105 | .force:
|
---|
[8290] | 1106 | !ifndef BUILD_VERBOSE
|
---|
[8253] | 1107 | @$(ECHO) .
|
---|
[8290] | 1108 | !else
|
---|
| 1109 | @$(ECHO) . (force) .
|
---|
| 1110 | !endif
|
---|
[8253] | 1111 |
|
---|
| 1112 |
|
---|
| 1113 |
|
---|
| 1114 | # -----------------------------------------------------------------------------
|
---|
| 1115 | # Read Dependencies.
|
---|
| 1116 | # -----------------------------------------------------------------------------
|
---|
[9028] | 1117 | !if "$(TARGET_MODE)" != "TESTCASE" && "$(TARGET_MODE)" != "DEPEND"
|
---|
[8714] | 1118 | !if "$(TARGET_MODE)" != "EMPTY" && "$(NODEP)" == ""
|
---|
[8253] | 1119 |
|
---|
[8197] | 1120 | #
|
---|
[8253] | 1121 | # Read dependency file for current directory
|
---|
[8197] | 1122 | #
|
---|
[8714] | 1123 | !ifndef MAKEVER
|
---|
| 1124 | ! if [$(TOOL_EXISTS) $(TARGET_DEPEND)] == 0
|
---|
| 1125 | ! ifdef BUILD_VERBOSE
|
---|
| 1126 | ! if [$(ECHO) Including dependency $(CLRFIL)$(TARGET_DEPEND)$(CLRRST)]
|
---|
| 1127 | ! endif
|
---|
[8197] | 1128 | ! endif
|
---|
[8714] | 1129 | ! include $(TARGET_DEPEND)
|
---|
| 1130 | ! else
|
---|
| 1131 | ! ifndef NODEP
|
---|
[8253] | 1132 | ! if [$(ECHO) $(CLRERR)WARNING: Please make dependencies first. $(TARGET_DEPEND) is missing.$(CLRRST)]
|
---|
| 1133 | ! endif
|
---|
[8714] | 1134 | ! endif
|
---|
[8253] | 1135 | ! endif
|
---|
[8714] | 1136 | !else
|
---|
| 1137 | ! if %exists($(TARGET_DEPEND)) != 0
|
---|
| 1138 | ! ifdef BUILD_VERBOSE
|
---|
| 1139 | $(ECHO) Including dependency $(CLRFIL)$(TARGET_DEPEND)$(CLRRST)
|
---|
| 1140 | ! endif
|
---|
| 1141 | ! include $(TARGET_DEPEND)
|
---|
| 1142 | ! else
|
---|
| 1143 | ! ifndef NODEP
|
---|
| 1144 | $(ECHO) $(CLRERR)WARNING: Please make dependencies first. $(TARGET_DEPEND) is missing.$(CLRRST)
|
---|
| 1145 | ! endif
|
---|
| 1146 | ! endif
|
---|
[8253] | 1147 | !endif
|
---|
| 1148 |
|
---|
| 1149 |
|
---|
| 1150 | #
|
---|
| 1151 | # Read global dependency files.
|
---|
| 1152 | #
|
---|
| 1153 | !ifdef BUILD_DEPEND1
|
---|
[8714] | 1154 | ! ifndef MAKEVER
|
---|
| 1155 | ! if [$(TOOL_EXISTS) $(BUILD_DEPEND1)] == 0
|
---|
| 1156 | ! ifdef BUILD_VERBOSE
|
---|
| 1157 | ! if [$(ECHO) Including dependency $(CLRFIL)$(BUILD_DEPEND1)$(CLRRST)]
|
---|
| 1158 | ! endif
|
---|
[8253] | 1159 | ! endif
|
---|
[8714] | 1160 | ! include $(BUILD_DEPEND1)
|
---|
| 1161 | ! else
|
---|
| 1162 | ! ifndef NODEP
|
---|
[8253] | 1163 | ! if [$(ECHO) $(CLRERR)WARNING: Please make dependencies first. $(BUILD_DEPEND1) is missing.$(CLRRST)]
|
---|
[8197] | 1164 | ! endif
|
---|
[8714] | 1165 | ! endif
|
---|
[8197] | 1166 | ! endif
|
---|
[8714] | 1167 | ! else
|
---|
| 1168 | ! if %exists($(BUILD_DEPEND1)) != 0
|
---|
| 1169 | ! ifdef BUILD_VERBOSE
|
---|
| 1170 | $(ECHO) Including dependency $(CLRFIL)$(BUILD_DEPEND1)$(CLRRST)
|
---|
| 1171 | ! endif
|
---|
| 1172 | ! include $(BUILD_DEPEND1)
|
---|
| 1173 | ! else
|
---|
| 1174 | ! ifndef NODEP
|
---|
| 1175 | $(ECHO) $(CLRERR)WARNING: Please make dependencies first. $(BUILD_DEPEND1) is missing.$(CLRRST)
|
---|
| 1176 | ! endif
|
---|
| 1177 | ! endif
|
---|
[8197] | 1178 | ! endif
|
---|
| 1179 | !endif
|
---|
| 1180 |
|
---|
[8714] | 1181 |
|
---|
[8253] | 1182 | !ifdef BUILD_DEPEND2
|
---|
[8714] | 1183 | ! ifndef MAKEVER
|
---|
| 1184 | ! if [$(TOOL_EXISTS) $(BUILD_DEPEND2)] == 0
|
---|
| 1185 | ! ifdef BUILD_VERBOSE
|
---|
| 1186 | ! if [$(ECHO) Including dependency $(CLRFIL)$(BUILD_DEPEND2)$(CLRRST)]
|
---|
| 1187 | ! endif
|
---|
[8253] | 1188 | ! endif
|
---|
[8714] | 1189 | ! include $(BUILD_DEPEND2)
|
---|
| 1190 | ! else
|
---|
| 1191 | ! ifndef NODEP
|
---|
[8253] | 1192 | ! if [$(ECHO) $(CLRERR)WARNING: Please make dependencies first. $(BUILD_DEPEND2) is missing.$(CLRRST)]
|
---|
| 1193 | ! endif
|
---|
[8714] | 1194 | ! endif
|
---|
[8253] | 1195 | ! endif
|
---|
[8714] | 1196 | ! else
|
---|
| 1197 | ! if %exists($(BUILD_DEPEND2)) != 0
|
---|
| 1198 | ! ifdef BUILD_VERBOSE
|
---|
| 1199 | $(ECHO) Including dependency $(CLRFIL)$(BUILD_DEPEND2)$(CLRRST)
|
---|
| 1200 | ! endif
|
---|
| 1201 | ! include $(BUILD_DEPEND2)
|
---|
| 1202 | ! else
|
---|
| 1203 | ! ifndef NODEP
|
---|
| 1204 | $(ECHO) $(CLRERR)WARNING: Please make dependencies first. $(BUILD_DEPEND2) is missing.$(CLRRST)
|
---|
| 1205 | ! endif
|
---|
| 1206 | ! endif
|
---|
[8253] | 1207 | ! endif
|
---|
| 1208 | !endif
|
---|
[8197] | 1209 |
|
---|
| 1210 |
|
---|
[8253] | 1211 | !ifdef BUILD_DEPEND3
|
---|
[8714] | 1212 | ! ifndef MAKEVER
|
---|
| 1213 | ! if [$(TOOL_EXISTS) $(BUILD_DEPEND3)] == 0
|
---|
| 1214 | ! ifdef BUILD_VERBOSE
|
---|
| 1215 | ! if [$(ECHO) Including dependency $(CLRFIL)$(BUILD_DEPEND3)$(CLRRST)]
|
---|
| 1216 | ! endif
|
---|
[8253] | 1217 | ! endif
|
---|
[8714] | 1218 | ! include $(BUILD_DEPEND3)
|
---|
| 1219 | ! else
|
---|
| 1220 | ! ifndef NODEP
|
---|
[8253] | 1221 | ! if [$(ECHO) $(CLRERR)WARNING: Please make dependencies first. $(BUILD_DEPEND3) is missing.$(CLRRST)]
|
---|
| 1222 | ! endif
|
---|
[8714] | 1223 | ! endif
|
---|
[8253] | 1224 | ! endif
|
---|
[8714] | 1225 | ! else
|
---|
| 1226 | ! if %exists($(BUILD_DEPEND3)) != 0
|
---|
| 1227 | ! ifdef BUILD_VERBOSE
|
---|
| 1228 | $(ECHO) Including dependency $(CLRFIL)$(BUILD_DEPEND3)$(CLRRST)
|
---|
| 1229 | ! endif
|
---|
| 1230 | ! include $(BUILD_DEPEND3)
|
---|
| 1231 | ! else
|
---|
| 1232 | ! ifndef NODEP
|
---|
| 1233 | $(ECHO) $(CLRERR)WARNING: Please make dependencies first. $(BUILD_DEPEND3) is missing.$(CLRRST)
|
---|
| 1234 | ! endif
|
---|
| 1235 | ! endif
|
---|
[8253] | 1236 | ! endif
|
---|
| 1237 | !endif
|
---|
| 1238 |
|
---|
| 1239 |
|
---|
| 1240 | !endif
|
---|
| 1241 |
|
---|
[8423] | 1242 |
|
---|
| 1243 | #
|
---|
| 1244 | # If BUILD_MULTIJOBS is nonempty make sure the job daemon is up running.
|
---|
| 1245 | #
|
---|
| 1246 | !if "$(BUILD_MULTIJOBS)" != ""
|
---|
| 1247 | ! if [$(TOOL_JOB_UP)] != 0
|
---|
| 1248 | ! if "$(BUILD_QUITE)" == ""
|
---|
[8714] | 1249 | ! ifndef MAKEVER
|
---|
| 1250 | ! if [$(ECHO) Starting Job Daemon With $(TOOL_JOB_WORKERS) Workers...$(CLRRST)]
|
---|
| 1251 | ! endif
|
---|
| 1252 | ! else
|
---|
| 1253 | $(ECHO) Starting Job Daemon With $(TOOL_JOB_WORKERS) Workers...$(CLRRST)
|
---|
[8423] | 1254 | ! endif
|
---|
| 1255 | ! endif
|
---|
| 1256 | ! if [$(TOOL_JOB_INIT) $(TOOL_JOB_WORKERS)] != 0
|
---|
[8714] | 1257 | ! ifndef MAKEVER
|
---|
| 1258 | ! if [$(ECHO) $(CLRERR)Fatal error: Failed to start job daemon.$(CLRRST)]
|
---|
| 1259 | ! endif
|
---|
| 1260 | ! error
|
---|
| 1261 | !else
|
---|
| 1262 | ! error $(CLRERR)Fatal error: Failed to start job daemon.$(CLRRST)
|
---|
| 1263 | !endif
|
---|
[8423] | 1264 | ! endif
|
---|
| 1265 | ! endif
|
---|
| 1266 | !endif
|
---|
| 1267 |
|
---|
[8714] | 1268 | !endif #!TESTCASE
|
---|