[9135] | 1 | # $Id: process.mak,v 1.24 2002-08-27 03:01:01 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
|
---|
[9127] | 73 | ! if [$(ECHO) $(CLRERR)Fatal Error: Bad TARGET_MODE="$(TARGET_MODE)". Valid ones are: EXE, DLL, SYS, IFS, VDD, LIB, SYSLIB, IFSLIB, DEPEND, TESTCASE and EMPTY.$(CLRRST)]
|
---|
[9028] | 74 | ! endif
|
---|
| 75 | ! error
|
---|
| 76 | ! else
|
---|
[9127] | 77 | ! error $(CLRERR)Fatal Error: Bad TARGET_MODE="$(TARGET_MODE)". Valid ones are: EXE, DLL, SYS, IFS, VDD, LIB, SYSLIB, IFSLIB, DEPEND, 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 |
|
---|
[9127] | 92 | # stuff which has changed behavior.
|
---|
| 93 | !if 1
|
---|
[8290] | 94 |
|
---|
[9127] | 95 | ! ifdef TARGET_PUBNAME
|
---|
| 96 | ! if [$(ECHO) $(CLRERR)Fatal error: TARGET_PUBNAME isn't supported. The pubname stuff has changed!$(CLRRST)]
|
---|
| 97 | ! endif
|
---|
| 98 | ! error
|
---|
| 99 | ! endif
|
---|
| 100 |
|
---|
| 101 | ! ifdef PATH_INCLUDE
|
---|
| 102 | ! if [$(ECHO) $(CLRERR)Fatal error: PATH_INCLUDE has changed name to PATH_INCLUDES!$(CLRRST)]
|
---|
| 103 | ! endif
|
---|
| 104 | ! error
|
---|
| 105 | ! endif
|
---|
| 106 |
|
---|
| 107 | !endif
|
---|
| 108 |
|
---|
| 109 |
|
---|
| 110 |
|
---|
[8253] | 111 | # -----------------------------------------------------------------------------
|
---|
| 112 | # Provide overridable defaults
|
---|
| 113 | # -----------------------------------------------------------------------------
|
---|
| 114 |
|
---|
| 115 | # Default target mode is executable.
|
---|
| 116 | !ifndef TARGET_MODE
|
---|
[9135] | 117 | ! if "$(_BUILD_PROJECT)" != "Odin32"
|
---|
[8253] | 118 | TARGET_MODE = EXE
|
---|
[9116] | 119 | ! else
|
---|
| 120 | # Odin32 defaults.
|
---|
| 121 | ! ifndef CUSTOMBUILD
|
---|
| 122 | TARGET_MODE = DLL
|
---|
| 123 | ! else
|
---|
| 124 | TARGET_MODE = LIB
|
---|
| 125 | ! endif
|
---|
| 126 | ! endif
|
---|
[8253] | 127 | !endif
|
---|
| 128 |
|
---|
| 129 | # Default extension corresponds to the target mode.
|
---|
| 130 | !ifndef TARGET_EXT
|
---|
[8423] | 131 | ! if "$(TARGET_MODE)" == "DLL"
|
---|
[8253] | 132 | TARGET_EXT = $(EXT_DLL)
|
---|
| 133 | ! endif
|
---|
| 134 | ! if "$(TARGET_MODE)" == "SYS"
|
---|
| 135 | TARGET_EXT = $(EXT_SYS)
|
---|
| 136 | ! endif
|
---|
[8290] | 137 | ! if "$(TARGET_MODE)" == "IFS"
|
---|
| 138 | TARGET_EXT = $(EXT_IFS)
|
---|
| 139 | ! endif
|
---|
| 140 | ! if "$(TARGET_MODE)" == "VDD"
|
---|
| 141 | TARGET_EXT = $(EXT_VDD)
|
---|
| 142 | ! endif
|
---|
[8253] | 143 | ! if "$(TARGET_MODE)" == "EXE"
|
---|
| 144 | TARGET_EXT = $(EXT_EXE)
|
---|
| 145 | ! endif
|
---|
[8290] | 146 | ! if "$(TARGET_MODE)" == "LIB" || "$(TARGET_MODE)" == "SYSLIB" || "$(TARGET_MODE)" == "IFSLIB"
|
---|
[8253] | 147 | TARGET_EXT = $(EXT_LIB)
|
---|
| 148 | ! endif
|
---|
| 149 | ! if "$(TARGET_MODE)" == "EMPTY"
|
---|
| 150 | TARGET_EXT = empty
|
---|
| 151 | ! endif
|
---|
[9028] | 152 | ! if "$(TARGET_MODE)" == "DEPEND"
|
---|
| 153 | TARGET_EXT = depend
|
---|
| 154 | ! endif
|
---|
[8714] | 155 | ! if "$(TARGET_MODE)" == "TESTCASE"
|
---|
| 156 | TARGET_EXT = testcase
|
---|
| 157 | ! endif
|
---|
[8253] | 158 | ! ifndef TARGET_EXT
|
---|
[8714] | 159 | ! ifndef MAKEVER
|
---|
| 160 | ! if [$(ECHO) $(CLRERR)Internal Error: TARGET_EXT not set. Probably invalid TARGET_MODE. (TARGET_MODE="$(TARGET_MODE)")$(CLRRST)]
|
---|
| 161 | ! endif
|
---|
| 162 | ! error
|
---|
| 163 | ! else
|
---|
| 164 | ! error $(CLRERR)Internal Error: TARGET_EXT not set. Probably invalid TARGET_MODE. (TARGET_MODE="$(TARGET_MODE)")$(CLRRST)
|
---|
[8423] | 165 | ! endif
|
---|
[8253] | 166 | ! endif
|
---|
| 167 | !endif
|
---|
| 168 |
|
---|
| 169 | # Default target path. (where all the generated stuff for this target goes)
|
---|
| 170 | !ifndef PATH_TARGET
|
---|
[9127] | 171 | !if "$(TARGET_SUB)" != ""
|
---|
| 172 | PATH_TARGET = $(PATH_OBJ)\$(TARGET_SUB)\$(TARGET_NAME).$(TARGET_EXT)
|
---|
| 173 | !else
|
---|
[8253] | 174 | PATH_TARGET = $(PATH_OBJ)\$(TARGET_NAME).$(TARGET_EXT)
|
---|
| 175 | !endif
|
---|
[9127] | 176 | !endif
|
---|
[8253] | 177 |
|
---|
| 178 | # Default target file. (output)
|
---|
[8197] | 179 | !ifndef TARGET
|
---|
[8270] | 180 | ! if "$(TARGET_MODE)" != "EMPTY"
|
---|
[8714] | 181 | ! if "$(TARGET_MODE)" != "TESTCASE"
|
---|
[8253] | 182 | TARGET = $(PATH_TARGET)\$(TARGET_NAME).$(TARGET_EXT)
|
---|
[8714] | 183 | ! else
|
---|
| 184 | TARGET = testcase
|
---|
| 185 | ! endif
|
---|
[8270] | 186 | ! endif
|
---|
[8197] | 187 | !endif
|
---|
| 188 |
|
---|
[8333] | 189 | # Default target .sym file. (output)
|
---|
| 190 | !ifndef TARGET_SYM
|
---|
| 191 | TARGET_SYM = $(PATH_TARGET)\$(TARGET_NAME).$(EXT_SYM)
|
---|
| 192 | !endif
|
---|
[8270] | 193 |
|
---|
[8253] | 194 | # Default object file. (output)
|
---|
[8197] | 195 | !ifndef TARGET_OBJS
|
---|
[8253] | 196 | TARGET_OBJS = $(PATH_TARGET)\$(TARGET_NAME).$(EXT_OBJ)
|
---|
[8197] | 197 | !endif
|
---|
| 198 |
|
---|
[8253] | 199 | # Default libraries. (input)
|
---|
[8197] | 200 | !ifndef TARGET_LIBS
|
---|
[8253] | 201 | TARGET_LIBS = $(LIB_C_DLL) $(LIB_OS) $(LIB_C_RTDLL)
|
---|
[8197] | 202 | !endif
|
---|
| 203 |
|
---|
[8253] | 204 | # Default definition file. (input)
|
---|
[8197] | 205 | !ifndef TARGET_DEF
|
---|
[8253] | 206 | TARGET_DEF = $(MAKEDIR)\$(PATH_DEF)\$(TARGET_NAME).def
|
---|
[8197] | 207 | !endif
|
---|
| 208 |
|
---|
[8333] | 209 | # Default modified definition filename. (output)
|
---|
| 210 | !ifndef TARGET_DEF_LINK
|
---|
| 211 | TARGET_DEF_LINK = $(PATH_TARGET)\$(TARGET_NAME)_link.def
|
---|
| 212 | !endif
|
---|
| 213 |
|
---|
[8253] | 214 | # Default definition file for generating the import library. (input)
|
---|
[8197] | 215 | !ifndef TARGET_IDEF
|
---|
[9135] | 216 | ! if "$(_BUILD_PROJECT)" != "Odin32"
|
---|
[8253] | 217 | TARGET_IDEF = $(TARGET_DEF)
|
---|
[9116] | 218 | ! else
|
---|
[9135] | 219 | ! if defined(TARGET_IDEF_CONV) || "$(TARGET_IDEF_ORG)" != ""
|
---|
[9116] | 220 | TARGET_IDEF = $(PATH_TARGET)\$(TARGET_NAME)_implib.def
|
---|
[9135] | 221 | ! ifndef TARGET_IDEF_ORG
|
---|
[9116] | 222 | TARGET_IDEF_ORG = $(TARGET_DEF)
|
---|
[9135] | 223 | ! endif
|
---|
[9116] | 224 | ! else
|
---|
| 225 | TARGET_IDEF = $(TARGET_DEF)
|
---|
| 226 | TARGET_IDEF_ORG = $(TARGET_DEF)
|
---|
| 227 | ! endif
|
---|
| 228 | ! endif
|
---|
[9135] | 229 |
|
---|
[8197] | 230 | !endif
|
---|
| 231 |
|
---|
[8253] | 232 | # Default map file. (output)
|
---|
[8197] | 233 | !ifndef TARGET_MAP
|
---|
[8333] | 234 | TARGET_MAP = $(PATH_TARGET)\$(TARGET_NAME).$(EXT_MAP)
|
---|
[8197] | 235 | !endif
|
---|
| 236 |
|
---|
[8253] | 237 | # Default link file. (output)
|
---|
[8197] | 238 | !ifndef TARGET_LNK
|
---|
[8253] | 239 | TARGET_LNK = $(PATH_TARGET)\$(TARGET_NAME).lnk
|
---|
[8197] | 240 | !endif
|
---|
| 241 |
|
---|
[8253] | 242 | # Default import library file. (output)
|
---|
| 243 | !ifndef TARGET_ILIB
|
---|
[9090] | 244 | ! if "$(TARGET_MODE)" == "DLL" || "$(TARGET_ILIB_YES)" != ""
|
---|
[9127] | 245 | TARGET_ILIB = $(PATH_LIB)\$(TARGET_NAME).$(EXT_ILIB)
|
---|
[8253] | 246 | ! endif
|
---|
[8197] | 247 | !endif
|
---|
| 248 |
|
---|
[9127] | 249 | # Default public base directory. (publish)
|
---|
| 250 | !ifndef TARGET_PUB_BASE
|
---|
| 251 | TARGET_PUB_BASE = $(PATH_PUB)
|
---|
| 252 | !endif
|
---|
| 253 |
|
---|
| 254 | # Default public base directory for unstripped release version.
|
---|
| 255 | !ifndef TARGET_PUB_BASE_DEB
|
---|
| 256 | ! if "$(BUILD_MODE)" == "RELEASE" && "$(TARGET_MODE:LIB=...)" == "$(TARGET_MODE)"
|
---|
| 257 | ! if "$(TARGET_MODE)" == "EXE" || "$(TARGET_MODE)" == "DLL" || "$(TARGET_MODE)" == "SYS" || "$(TARGET_MODE)" == "IFS" || "$(TARGET_MODE)" == "VDD"
|
---|
| 258 | TARGET_PUB_BASE_DEB = $(PATH_PUB_DEB)
|
---|
[8290] | 259 | ! endif
|
---|
[9127] | 260 | ! endif
|
---|
| 261 | !endif
|
---|
| 262 |
|
---|
| 263 | # Default sub directory.
|
---|
| 264 | !ifndef TARGET_PUB_SUB
|
---|
| 265 | ! if "$(TARGET_SUB)" != ""
|
---|
| 266 | TARGET_PUB_SUB = $(TARGET_SUB)
|
---|
| 267 | ! else
|
---|
[8290] | 268 | ! if "$(TARGET_MODE)" == "EXE"
|
---|
[9127] | 269 | TARGET_PUB_SUB = $(PATH_SUB_BIN)
|
---|
[8290] | 270 | ! endif
|
---|
[8423] | 271 | ! if "$(TARGET_MODE)" == "DLL"
|
---|
[9127] | 272 | TARGET_PUB_SUB = $(PATH_SUB_DLL)
|
---|
[8290] | 273 | ! endif
|
---|
[9127] | 274 | ! if "$(TARGET_MODE)" == "LIB" || "$(TARGET_MODE)" == "SYSLIB" || "$(TARGET_MODE)" == "IFSLIB"
|
---|
| 275 | TARGET_PUB_SUB = $(PATH_SUB_LIB)
|
---|
| 276 | ! endif
|
---|
[8290] | 277 | ! if "$(TARGET_MODE)" == "SYS" || "$(TARGET_MODE)" == "IFS"
|
---|
[9127] | 278 | TARGET_PUB_SUB = $(PATH_SUB_SYS)
|
---|
[8290] | 279 | ! endif
|
---|
| 280 | ! if "$(TARGET_MODE)" == "VDD"
|
---|
[9127] | 281 | TARGET_PUB_SUB = $(PATH_SUB_VDD)
|
---|
[8290] | 282 | ! endif
|
---|
[8253] | 283 | ! endif
|
---|
[8197] | 284 | !endif
|
---|
[8253] | 285 |
|
---|
[9127] | 286 | # Default public directory.
|
---|
| 287 | !ifndef TARGET_PUB_DIR
|
---|
| 288 | TARGET_PUB_DIR = $(TARGET_PUB_BASE)\$(TARGET_PUB_SUB)
|
---|
| 289 | !endif
|
---|
| 290 |
|
---|
| 291 | # Default unstripped public directory.
|
---|
| 292 | !if !defined(TARGET_PUB_DIR_DEB) && "$(TARGET_PUB_BASE_DEB)" != ""
|
---|
| 293 | TARGET_PUB_DIR_DEB = $(TARGET_PUB_BASE_DEB)\$(TARGET_PUB_SUB)
|
---|
| 294 | !endif
|
---|
| 295 |
|
---|
| 296 | # Default public name.
|
---|
| 297 | !ifndef TARGET_PUB_NAME
|
---|
| 298 | TARGET_PUB_NAME = $(TARGET_NAME)
|
---|
| 299 | !endif
|
---|
| 300 |
|
---|
| 301 | # Default public ext.
|
---|
| 302 | !ifndef TARGET_PUB_EXT
|
---|
| 303 | TARGET_PUB_EXT = $(TARGET_EXT)
|
---|
| 304 | !endif
|
---|
| 305 |
|
---|
| 306 | # Default public full name.
|
---|
| 307 | !ifndef TARGET_PUB
|
---|
| 308 | TARGET_PUB = $(TARGET_PUB_DIR)\$(TARGET_PUB_NAME).$(TARGET_PUB_EXT)
|
---|
| 309 | !endif
|
---|
| 310 |
|
---|
| 311 | # Default public full name of unstripped version.
|
---|
| 312 | !if !defined(TARGET_PUB_DEB) && "$(TARGET_PUB_DIR_DEB)" != ""
|
---|
| 313 | TARGET_PUB_DEB = $(TARGET_PUB_DIR_DEB)\$(TARGET_PUB_NAME).$(TARGET_PUB_EXT)
|
---|
| 314 | !endif
|
---|
| 315 |
|
---|
[8253] | 316 | # Default depend filename.
|
---|
| 317 | !ifndef TARGET_DEPEND
|
---|
| 318 | TARGET_DEPEND = $(PATH_TARGET)\.depend
|
---|
[8197] | 319 | !endif
|
---|
| 320 |
|
---|
[8423] | 321 | # Default makefile names.
|
---|
| 322 | !ifndef BUILD_MAKEFILE
|
---|
| 323 | BUILD_MAKEFILE = Makefile
|
---|
| 324 | !endif
|
---|
| 325 |
|
---|
[8253] | 326 | # Default makefile name.
|
---|
| 327 | !ifndef MAKEFILE
|
---|
[8423] | 328 | MAKEFILE = $(BUILD_MAKEFILE)
|
---|
[8197] | 329 | !endif
|
---|
| 330 |
|
---|
[8253] | 331 | # Ignore linker warnings for some target modes.
|
---|
| 332 | !ifndef TARGET_IGNORE_LINKER_WARNINGS
|
---|
[8423] | 333 | ! if "$(TARGET_MODE)" == "DLL"
|
---|
[8253] | 334 | TARGET_IGNORE_LINKER_WARNINGS = 1
|
---|
| 335 | ! endif
|
---|
[8197] | 336 | !endif
|
---|
| 337 |
|
---|
| 338 |
|
---|
[8253] | 339 | # Default stacksize
|
---|
[8355] | 340 | # If 16bit: 8KB
|
---|
| 341 | # Else (32bit): 64KB
|
---|
[8197] | 342 | !ifndef TARGET_STACKSIZE
|
---|
[8355] | 343 | ! ifdef ENV_16BIT
|
---|
[8197] | 344 | TARGET_STACKSIZE=0x2000
|
---|
| 345 | ! else
|
---|
| 346 | TARGET_STACKSIZE=0x10000
|
---|
| 347 | ! endif
|
---|
| 348 | !endif
|
---|
| 349 |
|
---|
[8253] | 350 |
|
---|
| 351 |
|
---|
| 352 | # -----------------------------------------------------------------------------
|
---|
[9127] | 353 | # Internal helper macros - don't mess!
|
---|
| 354 | # -----------------------------------------------------------------------------
|
---|
| 355 |
|
---|
| 356 | # Helper for doing early publish of a target.
|
---|
| 357 | !if defined(TARGET_NEEDED) || defined(TARGET_PUBLIC)
|
---|
| 358 | _TARGET_EARLY_PUBLISH = publish_target
|
---|
| 359 | !else
|
---|
| 360 | _TARGET_EARLY_PUBLISH =
|
---|
| 361 | !endif
|
---|
| 362 |
|
---|
| 363 | # The unstripped release name (internal!)
|
---|
| 364 | _TARGET_DEB = $(TARGET).unstripped
|
---|
| 365 |
|
---|
| 366 |
|
---|
| 367 |
|
---|
| 368 | # -----------------------------------------------------------------------------
|
---|
[8253] | 369 | # Tell user what we're building.
|
---|
| 370 | # -----------------------------------------------------------------------------
|
---|
| 371 | !ifndef BUILD_QUIET
|
---|
[9044] | 372 | ! if "$(TARGET)" != ""
|
---|
| 373 | ! ifndef MAKEVER
|
---|
| 374 | ! if [$(ECHO) Target is $(CLRFIL)$(TARGET)$(CLRRST)]
|
---|
| 375 | ! endif
|
---|
| 376 | ! else
|
---|
| 377 | $(ECHO) Target is $(CLRFIL)$(TARGET)$(CLRRST)
|
---|
[8714] | 378 | ! endif
|
---|
| 379 | ! endif
|
---|
[8197] | 380 | !endif
|
---|
| 381 |
|
---|
| 382 |
|
---|
[8253] | 383 | # -----------------------------------------------------------------------------
|
---|
| 384 | # Ensure the platform-specific target path exists
|
---|
| 385 | # -----------------------------------------------------------------------------
|
---|
| 386 |
|
---|
| 387 | !if "$(TARGET_MODE)" != "EMPTY"
|
---|
| 388 | ! if "$(PATH_TARGET)" != ""
|
---|
[8714] | 389 | ! ifndef MAKEVER
|
---|
| 390 | ! if [$(TOOL_EXISTS) $(PATH_TARGET)] != 0
|
---|
| 391 | ! ifndef BUILD_QUIET
|
---|
| 392 | ! if [$(ECHO) Target path $(CLRFIL)$(PATH_TARGET)$(CLRTXT) does NOT exist. Creating. $(CLRRST)]
|
---|
| 393 | ! endif
|
---|
[8253] | 394 | ! endif
|
---|
[8714] | 395 | ! if [$(TOOL_CREATEPATH) $(PATH_TARGET)]
|
---|
| 396 | ! if [$(ECHO) $(CLRERR)Error: Could not create $(CLRFIL)$(PATH_TARGET)$(CLRRST)]
|
---|
| 397 | ! endif
|
---|
| 398 | ! error
|
---|
| 399 | ! endif
|
---|
[8253] | 400 | ! endif
|
---|
[8714] | 401 | ! else
|
---|
| 402 | ! if %exist($(PATH_TARGET)) == 0
|
---|
| 403 | ! ifndef BUILD_QUIET
|
---|
| 404 | $(ECHO) Target path $(CLRFIL)$(PATH_TARGET)$(CLRTXT) does NOT exist. Creating. $(CLRRST)
|
---|
[8423] | 405 | ! endif
|
---|
[8714] | 406 | ! else
|
---|
| 407 | ! if [$(TOOL_CREATEPATH) $(PATH_TARGET)]
|
---|
| 408 | ! error $(CLRERR)Error: Could not create $(CLRFIL)$(PATH_TARGET)$(CLRRST)
|
---|
| 409 | ! endif
|
---|
[8253] | 410 | ! endif
|
---|
[8197] | 411 | ! endif
|
---|
| 412 | ! endif
|
---|
| 413 | !endif
|
---|
[8253] | 414 | # not 100% sure about the != EMPTY stuff, but this is way faster.
|
---|
[8197] | 415 |
|
---|
| 416 |
|
---|
[9135] | 417 | # -----------------------------------------------------------------------------
|
---|
| 418 | # Make all targets 'unprecious'. (works only on nmake5)
|
---|
| 419 | # -----------------------------------------------------------------------------
|
---|
| 420 | .PRECIOUS: .force
|
---|
[8197] | 421 |
|
---|
[9135] | 422 |
|
---|
[8253] | 423 | # -----------------------------------------------------------------------------
|
---|
| 424 | # Common inference rules
|
---|
| 425 | # -----------------------------------------------------------------------------
|
---|
[8197] | 426 | .SUFFIXES:
|
---|
[9116] | 427 | .SUFFIXES: .c .cpp .orc .asm .$(EXT_OBJ) .$(EXT_RES) .rc .ii .s
|
---|
[8197] | 428 |
|
---|
[8714] | 429 | #
|
---|
| 430 | # A workaround for SlickEdits inability to find the buggy files..
|
---|
| 431 | # This makes the source filenames in the error listing have full path.
|
---|
| 432 | # See setup.mak for compile command line.
|
---|
| 433 | #
|
---|
| 434 | _SRC = $<
|
---|
| 435 | !ifdef SLKRUNS
|
---|
| 436 | _SRC = $(PATH_CURRENT)\$<
|
---|
| 437 | !endif
|
---|
[8197] | 438 |
|
---|
[8714] | 439 |
|
---|
[8197] | 440 | # Assembling assembly source.
|
---|
| 441 | .asm{$(PATH_TARGET)}.$(EXT_OBJ):
|
---|
[8714] | 442 | @$(ECHO) Assembling $(CLRFIL)$(_SRC) $(CLRTXT)$(TOOL_JOB_SUB_MSG) $(CLRRST)
|
---|
| 443 | \
|
---|
[8423] | 444 | ! ifndef BUILD_VERBOSE
|
---|
[8290] | 445 | @ \
|
---|
[8423] | 446 | ! endif
|
---|
[8213] | 447 | !if "$(TARGET_MODE)" == "SYS" || "$(TARGET_MODE)" == "SYSLIB" || "$(TARGET_MODE)" == "IFS" || "$(TARGET_MODE)" == "IFSLIB"
|
---|
[8714] | 448 | $(TOOL_JOB_SUB) $(AS) $(AS_FLAGS_SYS) $(_SRC) $(AS_OBJ_OUT)$@
|
---|
[8197] | 449 | !else
|
---|
[8714] | 450 | $(TOOL_JOB_SUB) $(AS) $(AS_FLAGS) $(_SRC) $(AS_OBJ_OUT)$@
|
---|
[8197] | 451 | !endif
|
---|
| 452 |
|
---|
| 453 | .asm.$(EXT_OBJ):
|
---|
[8714] | 454 | @$(ECHO) Assembling $(CLRFIL)$(_SRC) $(CLRRST)
|
---|
| 455 | \
|
---|
[8290] | 456 | !ifndef BUILD_VERBOSE
|
---|
| 457 | @ \
|
---|
| 458 | !endif
|
---|
[8213] | 459 | !if "$(TARGET_MODE)" == "SYS" || "$(TARGET_MODE)" == "SYSLIB" || "$(TARGET_MODE)" == "IFS" || "$(TARGET_MODE)" == "IFSLIB"
|
---|
[8714] | 460 | $(AS) $(AS_FLAGS_SYS) $(_SRC) $(AS_OBJ_OUT)$(PATH_TARGET)\$(@F)
|
---|
[8197] | 461 | !else
|
---|
[8714] | 462 | $(AS) $(AS_FLAGS) $(_SRC) $(AS_OBJ_OUT)$(PATH_TARGET)\$(@F)
|
---|
[8197] | 463 | !endif
|
---|
| 464 |
|
---|
[8714] | 465 | # C++ Compiler base line
|
---|
| 466 | _CXX_BASELINE = $(CXX) \
|
---|
[8290] | 467 | !if "$(TARGET_MODE)" == "EXE" || "$(TARGET_MODE)" == "LIB"
|
---|
[8197] | 468 | $(CXX_FLAGS_EXE) \
|
---|
| 469 | !endif
|
---|
| 470 | !if "$(TARGET_MODE)" == "DLL"
|
---|
| 471 | $(CXX_FLAGS_DLL) \
|
---|
| 472 | !endif
|
---|
| 473 | !if "$(TARGET_MODE)" == "SYS" || "$(TARGET_MODE)" == "SYSLIB"
|
---|
| 474 | $(CXX_FLAGS_SYS) \
|
---|
| 475 | !endif
|
---|
[8213] | 476 | !if "$(TARGET_MODE)" == "IFS" || "$(TARGET_MODE)" == "IFSLIB"
|
---|
| 477 | $(CXX_FLAGS_IFS) \
|
---|
| 478 | !endif
|
---|
[8714] | 479 |
|
---|
| 480 | # Compiling C++ source.
|
---|
| 481 | .cpp{$(PATH_TARGET)}.$(EXT_OBJ):
|
---|
| 482 | @$(ECHO) C++ Compiler $(CLRFIL)$(_SRC) $(CLRTXT)$(TOOL_JOB_SUB_MSG) $(CLRRST)
|
---|
| 483 | \
|
---|
| 484 | !ifndef BUILD_VERBOSE
|
---|
| 485 | @ \
|
---|
| 486 | !endif
|
---|
| 487 | $(TOOL_JOB_SUB) $(_CXX_BASELINE) \
|
---|
[8253] | 488 | !if "$(CXX_LST_OUT)" != ""
|
---|
[8213] | 489 | $(CXX_LST_OUT)$(PATH_TARGET)\$(@B).s \
|
---|
| 490 | !endif
|
---|
[8714] | 491 | $(CXX_OBJ_OUT)$@ $(_SRC)
|
---|
[8197] | 492 |
|
---|
| 493 | .cpp.$(EXT_OBJ):
|
---|
[8714] | 494 | @$(ECHO) C++ Compiler $(CLRFIL)$(_SRC) $(CLRRST)
|
---|
| 495 | \
|
---|
[8290] | 496 | !ifndef BUILD_VERBOSE
|
---|
| 497 | @ \
|
---|
| 498 | !endif
|
---|
[8714] | 499 | $(_CXX_BASELINE) \
|
---|
[8253] | 500 | !if "$(CXX_LST_OUT)" != ""
|
---|
[8213] | 501 | $(CXX_LST_OUT)$(PATH_TARGET)\$(@B).s \
|
---|
| 502 | !endif
|
---|
[8714] | 503 | $(CXX_OBJ_OUT)$(PATH_TARGET)\$(@F) $(_SRC)
|
---|
[8197] | 504 |
|
---|
| 505 |
|
---|
| 506 | # Pre-Compiling C++ source.
|
---|
[8714] | 507 | .cpp.ii:
|
---|
| 508 | @$(ECHO) C++ Compiler $(CLRFIL)$(_SRC) $(CLRRST)
|
---|
| 509 | \
|
---|
[8290] | 510 | !ifndef BUILD_VERBOSE
|
---|
| 511 | @ \
|
---|
| 512 | !endif
|
---|
[8714] | 513 | $(_CXX_BASELINE) \
|
---|
| 514 | $(CXX_PC_2_STDOUT) $(_SRC) > $@
|
---|
[8197] | 515 |
|
---|
| 516 |
|
---|
[8714] | 517 | # Compiler C++ source to assembly.
|
---|
| 518 | !if "$(CXX_AS_2_FILE)" != ""
|
---|
| 519 | .cpp.s:
|
---|
| 520 | @$(ECHO) C++ To Assembly $(CLRFIL)$(_SRC) $(CLRRST)
|
---|
| 521 | \
|
---|
[8290] | 522 | !ifndef BUILD_VERBOSE
|
---|
| 523 | @ \
|
---|
| 524 | !endif
|
---|
[8714] | 525 | $(_CXX_BASELINE) \
|
---|
| 526 | $(CXX_AS_2_FILE)$@ $(_SRC)
|
---|
| 527 | !endif
|
---|
| 528 |
|
---|
| 529 |
|
---|
| 530 |
|
---|
| 531 | # C Compiler base line
|
---|
| 532 | _CC_BASELINE = $(CC) \
|
---|
[8290] | 533 | !if "$(TARGET_MODE)" == "EXE" || "$(TARGET_MODE)" == "LIB"
|
---|
[8197] | 534 | $(CC_FLAGS_EXE) \
|
---|
| 535 | !endif
|
---|
| 536 | !if "$(TARGET_MODE)" == "DLL"
|
---|
| 537 | $(CC_FLAGS_DLL) \
|
---|
| 538 | !endif
|
---|
| 539 | !if "$(TARGET_MODE)" == "SYS" || "$(TARGET_MODE)" == "SYSLIB"
|
---|
| 540 | $(CC_FLAGS_SYS) \
|
---|
| 541 | !endif
|
---|
[8213] | 542 | !if "$(TARGET_MODE)" == "IFS" || "$(TARGET_MODE)" == "IFSLIB"
|
---|
| 543 | $(CC_FLAGS_IFS) \
|
---|
| 544 | !endif
|
---|
[8714] | 545 |
|
---|
| 546 | # Compiling C source.
|
---|
| 547 | .c{$(PATH_TARGET)}.$(EXT_OBJ):
|
---|
| 548 | @$(ECHO) C Compiler $(CLRFIL)$(_SRC) $(CLRTXT)$(TOOL_JOB_SUB_MSG) $(CLRRST)
|
---|
| 549 | \
|
---|
| 550 | !ifndef BUILD_VERBOSE
|
---|
| 551 | @ \
|
---|
| 552 | !endif
|
---|
| 553 | $(TOOL_JOB_SUB) $(_CC_BASELINE) \
|
---|
[8253] | 554 | !if "$(CC_LST_OUT)" != ""
|
---|
[8213] | 555 | $(CC_LST_OUT)$(PATH_TARGET)\$(@B).s \
|
---|
| 556 | !endif
|
---|
[8714] | 557 | $(CC_OBJ_OUT)$@ $(_SRC)
|
---|
[8197] | 558 |
|
---|
| 559 | .c.$(EXT_OBJ):
|
---|
[8714] | 560 | @$(ECHO) C Compiler $(CLRFIL)$(_SRC) $(CLRRST)
|
---|
| 561 | \
|
---|
[8290] | 562 | !ifndef BUILD_VERBOSE
|
---|
| 563 | @ \
|
---|
| 564 | !endif
|
---|
[8714] | 565 | $(_CC_BASELINE) \
|
---|
[8253] | 566 | !if "$(CC_LST_OUT)" != ""
|
---|
[8213] | 567 | $(CC_LST_OUT)$(PATH_TARGET)\$(@B).s \
|
---|
| 568 | !endif
|
---|
[8714] | 569 | $(CC_OBJ_OUT)$(PATH_TARGET)\$(@F) $(_SRC)
|
---|
[8197] | 570 |
|
---|
| 571 |
|
---|
| 572 | # Pre-Compiling C source.
|
---|
[8714] | 573 | .c.ii:
|
---|
| 574 | @$(ECHO) C PreCompiler $(CLRFIL)$(_SRC) $(CLRRST)
|
---|
| 575 | \
|
---|
[8290] | 576 | !ifndef BUILD_VERBOSE
|
---|
| 577 | @ \
|
---|
| 578 | !endif
|
---|
[8714] | 579 | $(_CC_BASELINE) \
|
---|
| 580 | $(CC_PC_2_STDOUT) $(_SRC) > $@
|
---|
| 581 |
|
---|
| 582 |
|
---|
| 583 | # Compiler C source to assembly.
|
---|
| 584 | !if "$(CC_AS_2_FILE)" != ""
|
---|
| 585 | .c.s:
|
---|
| 586 | @$(ECHO) C To Assembly $(CLRFIL)$(_SRC) $(CLRRST)
|
---|
| 587 | \
|
---|
| 588 | !ifndef BUILD_VERBOSE
|
---|
| 589 | @ \
|
---|
[8197] | 590 | !endif
|
---|
[8714] | 591 | $(_CC_BASELINE) \
|
---|
| 592 | $(CC_AS_2_FILE)$@ $(_SRC)
|
---|
[8197] | 593 | !endif
|
---|
| 594 |
|
---|
| 595 |
|
---|
| 596 | # Compiling resources.
|
---|
| 597 | .rc{$(PATH_TARGET)}.res:
|
---|
[8714] | 598 | @$(ECHO) RC Compiler $(CLRFIL)$(_SRC) $(CLRTXT)$(TOOL_JOB_SUB_MSG)$(CLRRST)
|
---|
| 599 | \
|
---|
[8290] | 600 | !ifndef BUILD_VERBOSE
|
---|
| 601 | @ \
|
---|
| 602 | !endif
|
---|
[8714] | 603 | $(TOOL_JOB_SUB) $(RC) $(RC_FLAGS) $(_SRC) $@
|
---|
[8197] | 604 |
|
---|
| 605 | .rc.res:
|
---|
[8714] | 606 | @$(ECHO) RC Compiler $(CLRFIL)$(_SRC) $(CLRRST)
|
---|
| 607 | \
|
---|
[8290] | 608 | !ifndef BUILD_VERBOSE
|
---|
| 609 | @ \
|
---|
| 610 | !endif
|
---|
[8714] | 611 | $(RC) $(RC_FLAGS) $(_SRC) $(PATH_TARGET)\$(@F)
|
---|
[8197] | 612 |
|
---|
| 613 |
|
---|
[9116] | 614 | # Compiling Odin32 resources.
|
---|
| 615 | .orc{$(PATH_TARGET)}.obj:
|
---|
| 616 | @$(ECHO) ORC Compiler $(CLRFIL)$(_SRC) $(CLRTXT)$(TOOL_JOB_SUB_MSG)$(CLRRST)
|
---|
| 617 | \
|
---|
| 618 | !ifndef BUILD_VERBOSE
|
---|
| 619 | @ \
|
---|
| 620 | !endif
|
---|
| 621 | $(ORC) $(ORC_FLAGS) $(ORC_ASM_OUT)$(PATH_TARGET)\$(@B).asm $(_SRC)
|
---|
| 622 | \
|
---|
| 623 | !ifndef BUILD_VERBOSE
|
---|
| 624 | @ \
|
---|
| 625 | !endif
|
---|
| 626 | $(AS) $(AS_FLAGS) $(PATH_TARGET)\$(@B).asm $(AS_OBJ_OUT)$(PATH_TARGET)\$(@F)
|
---|
[8253] | 627 |
|
---|
[9116] | 628 | .orc.obj:
|
---|
| 629 | @$(ECHO) ORC Compiler $(CLRFIL)$(_SRC) $(CLRRST)
|
---|
| 630 | \
|
---|
| 631 | !ifndef BUILD_VERBOSE
|
---|
| 632 | @ \
|
---|
| 633 | !endif
|
---|
| 634 | $(ORC) $(ORC_FLAGS) $(ORC_ASM_OUT)$(PATH_TARGET)\$(@B).asm $(_SRC)
|
---|
| 635 | \
|
---|
| 636 | !ifndef BUILD_VERBOSE
|
---|
| 637 | @ \
|
---|
| 638 | !endif
|
---|
| 639 | $(AS) $(AS_FLAGS) $(PATH_TARGET)\$(@B).asm $(AS_OBJ_OUT)$(PATH_TARGET)\$(@F)
|
---|
[8253] | 640 |
|
---|
| 641 |
|
---|
[9116] | 642 |
|
---|
| 643 |
|
---|
| 644 |
|
---|
[8253] | 645 | # -----------------------------------------------------------------------------
|
---|
| 646 | # The all rule - The default one, as it's the first rule in the file.
|
---|
| 647 | # -----------------------------------------------------------------------------
|
---|
[8197] | 648 | all: build
|
---|
| 649 |
|
---|
| 650 |
|
---|
[8253] | 651 |
|
---|
| 652 | # -----------------------------------------------------------------------------
|
---|
[9031] | 653 | # The build rule - This runs all passes:
|
---|
| 654 | # 1. Make Dependencies
|
---|
[9090] | 655 | # 2. Make Needed Tools (stuff required in the next steps)
|
---|
| 656 | # 3. Make Libraries (all kinds)
|
---|
| 657 | # 4. Make Executables
|
---|
| 658 | # 5. Make Miscellaneous Targets
|
---|
| 659 | # 6. Make Install
|
---|
[9031] | 660 | # Note: In order to load dependencies we'll do a forwarding after making them.
|
---|
[8253] | 661 | # -----------------------------------------------------------------------------
|
---|
[9031] | 662 | build: _build
|
---|
| 663 | !if "$(MAKEFLAGS:I=_)" == "$(MAKEFLAGS)" # this is of course broken in nmake v5.0 for OS/2.
|
---|
| 664 | @$(ECHO)$(CLRMAK)[Successfully Built Everything!] $(CLRRST)
|
---|
| 665 | !else
|
---|
| 666 | @$(ECHO)$(CLRMAK)[Built Everything! (Ignore option specified)] $(CLRRST)
|
---|
| 667 | !endif
|
---|
| 668 |
|
---|
| 669 | # internal rule shared by rebuild and build.
|
---|
| 670 | _build: _build_banner_dep dep
|
---|
| 671 | !ifndef BUILD_QUIET
|
---|
| 672 | @$(ECHO) Restarting $(CLRFIL)$(MAKEFILE)$(CLRTXT) with new dependencies. $(CLRRST)
|
---|
| 673 | !endif
|
---|
| 674 | \
|
---|
| 675 | !ifndef BUILD_VERBOSE
|
---|
| 676 | @ \
|
---|
| 677 | !endif
|
---|
| 678 | $(TOOL_MAKE) -f $(MAKEFILE) _build_new_dependencies_
|
---|
| 679 |
|
---|
| 680 | # internal rule used to reload dependencies.
|
---|
| 681 | _build_new_dependencies_: \
|
---|
[9090] | 682 | _build_banner_needed needed \
|
---|
[9031] | 683 | _build_banner_lib lib \
|
---|
| 684 | _build_banner_executable executable \
|
---|
| 685 | _build_banner_miscellaneous miscellaneous \
|
---|
[9127] | 686 | _build_banner_publish publish
|
---|
[9031] | 687 |
|
---|
| 688 | # Banners for rebuild and build.
|
---|
| 689 | _build_banner_clean:
|
---|
| 690 | @$(ECHO)$(CLRMAK)[Start Pass 0 - Make Clean] $(CLRRST)
|
---|
| 691 | @SET _BUILD_PASS=0
|
---|
| 692 | _build_banner_dep:
|
---|
| 693 | @$(ECHO)$(CLRMAK)[Start Pass 1 - Make Dependencies] $(CLRRST)
|
---|
| 694 | @SET _BUILD_PASS=1
|
---|
[9090] | 695 | _build_banner_needed:
|
---|
| 696 | @$(ECHO)$(CLRMAK)[Start Pass 2 - Make Needed Tools] $(CLRRST)
|
---|
| 697 | @SET _BUILD_PASS=2
|
---|
[9031] | 698 | _build_banner_lib:
|
---|
[9090] | 699 | @$(ECHO)$(CLRMAK)[Start Pass 3 - Make Libraries] $(CLRRST)
|
---|
| 700 | @SET _BUILD_PASS=3
|
---|
[9031] | 701 | _build_banner_executable:
|
---|
[9090] | 702 | @$(ECHO)$(CLRMAK)[Start Pass 4 - Make Executables] $(CLRRST)
|
---|
| 703 | @SET _BUILD_PASS=4
|
---|
[9031] | 704 | _build_banner_miscellaneous:
|
---|
[9090] | 705 | @$(ECHO)$(CLRMAK)[Start Pass 5 - Make Miscellaneous Targets] $(CLRRST)
|
---|
| 706 | @SET _BUILD_PASS=5
|
---|
[9127] | 707 | _build_banner_publish:
|
---|
| 708 | @$(ECHO)$(CLRMAK)[Start Pass 6 - Make Public (i.e. Publish)] $(CLRRST)
|
---|
[9090] | 709 | @SET _BUILD_PASS=6
|
---|
[9031] | 710 |
|
---|
| 711 |
|
---|
| 712 |
|
---|
| 713 | # -----------------------------------------------------------------------------
|
---|
| 714 | # The rebuild rule - Same as build but does a clean first (as Pass 0).
|
---|
| 715 | # -----------------------------------------------------------------------------
|
---|
| 716 | rebuild: \
|
---|
| 717 | _build_banner_clean clean \
|
---|
| 718 | _build
|
---|
| 719 | !if "$(MAKEFLAGS:i=_)" == "$(MAKEFLAGS)"
|
---|
| 720 | @$(ECHO)$(CLRMAK)[Successfully Rebuilt Everything!] $(CLRRST)
|
---|
| 721 | !else
|
---|
| 722 | @$(ECHO)$(CLRMAK)[Rebuilt Everything! (Ignore option specified)] $(CLRRST)
|
---|
| 723 | !endif
|
---|
| 724 |
|
---|
| 725 |
|
---|
| 726 |
|
---|
| 727 | # -----------------------------------------------------------------------------
|
---|
| 728 | # Pass 0 - The clean rule - Clean up output files.
|
---|
[9127] | 729 | # The current setup doesn't clean the published ones.
|
---|
[9031] | 730 | # -----------------------------------------------------------------------------
|
---|
| 731 | !if "$(TARGET_MODE)" != "TESTCASE"
|
---|
| 732 | clean:
|
---|
| 733 | @$(ECHO) Cleaning... $(CLRRST)
|
---|
| 734 | \
|
---|
| 735 | ! ifndef BUILD_VERBOSE
|
---|
| 736 | @ \
|
---|
| 737 | ! endif
|
---|
[9116] | 738 | $(TOOL_RM) @<<
|
---|
| 739 | "$(PATH_TARGET)\*.$(EXT_OBJ)"
|
---|
| 740 | "$(PATH_TARGET)\*.$(EXT_ILIB)"
|
---|
| 741 | "$(PATH_TARGET)\*.$(EXT_EXE)"
|
---|
| 742 | "$(PATH_TARGET)\*.$(EXT_DLL)"
|
---|
| 743 | "$(PATH_TARGET)\*.$(EXT_RES)"
|
---|
| 744 | "$(PATH_TARGET)\*.$(EXT_SYS)"
|
---|
| 745 | "$(PATH_TARGET)\*.$(EXT_LIB)"
|
---|
| 746 | "$(PATH_TARGET)\*.$(EXT_IFS)"
|
---|
| 747 | "$(PATH_TARGET)\*.$(EXT_MAP)"
|
---|
| 748 | "$(PATH_TARGET)\*.$(EXT_SYM)"
|
---|
| 749 | "$(PATH_TARGET)\*.$(EXT_DEF)"
|
---|
| 750 | "$(PATH_TARGET)\*.s"
|
---|
| 751 | "$(PATH_TARGET)\*.lst"
|
---|
| 752 | "$(PATH_TARGET)\*.lnk"
|
---|
| 753 | "$(PATH_TARGET)\*.ii"
|
---|
| 754 | "$(PATH_TARGET)\.depend"
|
---|
| 755 | "$(TARGET_DEPEND)"
|
---|
| 756 | .\*.ii
|
---|
| 757 | .\*.err
|
---|
| 758 | .\.depend
|
---|
| 759 | <<
|
---|
[9090] | 760 | !ifdef SUBDIRS_CLEAN
|
---|
| 761 | @$(TOOL_DODIRS) "$(SUBDIRS_CLEAN)" $(TOOL_MAKE) -f $(BUILD_MAKEFILE) NODEP=1 $@
|
---|
| 762 | !else
|
---|
[9127] | 763 | ! if "$(SUBDIRS)$(SUBDIRS_NEEDED)$(SUBDIRS_LIB)$(SUBDIRS_EXECUTABLES)$(SUBDIRS_MISC)" != ""
|
---|
[9090] | 764 | @$(TOOL_DODIRS) "$(SUBDIRS) $(SUBDIRS_NEEDED) $(SUBDIRS_LIB) $(SUBDIRS_EXECUTABLES) $(SUBDIRS_MISC)" $(TOOL_MAKE) -f $(BUILD_MAKEFILE) NODEP=1 $@
|
---|
| 765 | ! endif
|
---|
[8197] | 766 | !endif
|
---|
[9090] | 767 | !ifdef PREMAKEFILES_CLEAN
|
---|
| 768 | @$(TOOL_DOMAKES) "$(PREMAKEFILES_CLEAN)" $(TOOL_MAKE) NODEP=1 $@
|
---|
| 769 | !else
|
---|
[9127] | 770 | ! if "$(PREMAKEFILES)$(PREMAKEFILES_NEEDED)$(PREMAKEFILES_LIB)$(PREMAKEFILES_EXECUTABLES)$(PREMAKEFILES_MISC)" != ""
|
---|
[9090] | 771 | @$(TOOL_DOMAKES) "$(PREMAKEFILES) $(PREMAKEFILES_NEEDED) $(PREMAKEFILES_LIB) $(PREMAKEFILES_EXECUTABLES) $(PREMAKEFILES_MISC)" $(TOOL_MAKE) NODEP=1 $@
|
---|
| 772 | ! endif
|
---|
[9031] | 773 | !endif
|
---|
[9090] | 774 | !ifdef POSTMAKEFILES_CLEAN
|
---|
| 775 | @$(TOOL_DOMAKES) "$(POSTMAKEFILES_CLEAN)" $(TOOL_MAKE) NODEP=1 $@
|
---|
| 776 | !else
|
---|
[9127] | 777 | ! if "$(POSTMAKEFILES)$(POSTMAKEFILES_NEEDED)$(POSTMAKEFILES_LIB)$(POSTMAKEFILES_EXECUTABLES)$(POSTMAKEFILES_MISC)" != ""
|
---|
[9090] | 778 | @$(TOOL_DOMAKES) "$(POSTMAKEFILES) $(POSTMAKEFILES_NEEDED) $(POSTMAKEFILES_LIB) $(POSTMAKEFILES_EXECUTABLES) $(POSTMAKEFILES_MISC)" $(TOOL_MAKE) NODEP=1 $@
|
---|
| 779 | ! endif
|
---|
[9031] | 780 | !endif
|
---|
[9090] | 781 |
|
---|
[9031] | 782 | !endif #!TESTCASE
|
---|
[8197] | 783 |
|
---|
[9031] | 784 |
|
---|
| 785 |
|
---|
| 786 | # -----------------------------------------------------------------------------
|
---|
| 787 | # Pass 1 - The dep rule - Make dependencies.
|
---|
| 788 | # -----------------------------------------------------------------------------
|
---|
| 789 | dep:
|
---|
[9044] | 790 | !if "$(TARGET_MODE)" != "EMPTY" && "$(TARGET_MODE)" != "TESTCASE"
|
---|
[9031] | 791 | @$(ECHO) Making dependencies... $(CLRRST)
|
---|
| 792 | \
|
---|
[9044] | 793 | ! ifndef BUILD_VERBOSE
|
---|
[9031] | 794 | @ \
|
---|
[9044] | 795 | ! endif
|
---|
[9031] | 796 | $(TOOL_DEP) $(TOOL_DEP_FLAGS) -o$$(PATH_TARGET) -d$(TARGET_DEPEND)\
|
---|
| 797 | ! ifdef TARGET_NO_DEP
|
---|
| 798 | -x$(TARGET_NO_DEP: =;)\
|
---|
| 799 | ! endif
|
---|
| 800 | $(TOOL_DEP_FILES)
|
---|
| 801 | !endif
|
---|
[9090] | 802 | !ifdef SUBDIRS_DEP
|
---|
| 803 | @$(TOOL_DODIRS) "$(SUBDIRS_DEP)" $(TOOL_MAKE) -f $(BUILD_MAKEFILE) NODEP=1 $@
|
---|
| 804 | !else
|
---|
[9127] | 805 | ! if "$(SUBDIRS)$(SUBDIRS_NEEDED)$(SUBDIRS_LIB)$(SUBDIRS_EXECUTABLES)$(SUBDIRS_MISC)" != ""
|
---|
[9090] | 806 | @$(TOOL_DODIRS) "$(SUBDIRS) $(SUBDIRS_NEEDED) $(SUBDIRS_LIB) $(SUBDIRS_EXECUTABLES) $(SUBDIRS_MISC)" $(TOOL_MAKE) -f $(BUILD_MAKEFILE) NODEP=1 $@
|
---|
| 807 | ! endif
|
---|
[9031] | 808 | !endif
|
---|
[9090] | 809 | !ifdef PREMAKEFILES_DEP
|
---|
| 810 | @$(TOOL_DOMAKES) "$(PREMAKEFILES_DEP)" $(TOOL_MAKE) NODEP=1 $@
|
---|
| 811 | !else
|
---|
[9127] | 812 | ! if "$(PREMAKEFILES)$(PREMAKEFILES_NEEDED)$(PREMAKEFILES_LIB)$(PREMAKEFILES_EXECUTABLES)$(PREMAKEFILES_MISC)" != ""
|
---|
[9090] | 813 | @$(TOOL_DOMAKES) "$(PREMAKEFILES) $(PREMAKEFILES_NEEDED) $(PREMAKEFILES_LIB) $(PREMAKEFILES_EXECUTABLES) $(PREMAKEFILES_MISC)" $(TOOL_MAKE) NODEP=1 $@
|
---|
| 814 | ! endif
|
---|
[8197] | 815 | !endif
|
---|
[9090] | 816 | !ifdef POSTMAKEFILES_DEP
|
---|
| 817 | @$(TOOL_DOMAKES) "$(POSTMAKEFILES_DEP)" $(TOOL_MAKE) NODEP=1 $@
|
---|
| 818 | !else
|
---|
[9127] | 819 | ! if "$(POSTMAKEFILES)$(POSTMAKEFILES_NEEDED)$(POSTMAKEFILES_LIB)$(POSTMAKEFILES_EXECUTABLES)$(POSTMAKEFILES_MISC)" != ""
|
---|
[9090] | 820 | @$(TOOL_DOMAKES) "$(POSTMAKEFILES) $(POSTMAKEFILES_NEEDED) $(POSTMAKEFILES_LIB) $(POSTMAKEFILES_EXECUTABLES) $(POSTMAKEFILES_MISC)" $(TOOL_MAKE) NODEP=1 $@
|
---|
| 821 | ! endif
|
---|
[8197] | 822 | !endif
|
---|
| 823 |
|
---|
| 824 |
|
---|
[8253] | 825 |
|
---|
| 826 | # -----------------------------------------------------------------------------
|
---|
[9090] | 827 | # Pass 2 - The needed rule - Make need tools.
|
---|
| 828 | # That is tools and stuff that is required for the next passes.
|
---|
| 829 | # WARNING! These tools and stuff shouldn't rely on libraries and other
|
---|
| 830 | # results of later passes.
|
---|
[8253] | 831 | # -----------------------------------------------------------------------------
|
---|
[9090] | 832 | !ifdef SUBDIRS_NEEDED
|
---|
| 833 | _SUBDIRS_NEEDED = _subdir_needed
|
---|
| 834 | $(_SUBDIRS_NEEDED):
|
---|
| 835 | @$(TOOL_DODIRS) "$(SUBDIRS_NEEDED)" $(TOOL_MAKE) -f $(BUILD_MAKEFILE) needed
|
---|
| 836 | !else
|
---|
| 837 | ! ifdef SUBDIRS
|
---|
| 838 | _SUBDIRS_NEEDED = _subdir_needed
|
---|
| 839 | $(_SUBDIRS_NEEDED):
|
---|
| 840 | @$(TOOL_DODIRS) "$(SUBDIRS)" $(TOOL_MAKE) -f $(BUILD_MAKEFILE) needed
|
---|
| 841 | ! endif
|
---|
| 842 | !endif
|
---|
| 843 |
|
---|
| 844 | !ifdef PREMAKEFILES_NEEDED
|
---|
| 845 | _PREMAKEFILES_NEEDED = _premakefiles_needed
|
---|
| 846 | $(_PREMAKEFILES_NEEDED):
|
---|
| 847 | @$(TOOL_DOMAKES) "$(PREMAKEFILES_NEEDED)" $(TOOL_MAKE) needed
|
---|
| 848 | !else
|
---|
| 849 | ! ifdef PREMAKEFILES
|
---|
| 850 | _PREMAKEFILES_NEEDED = _premakefiles_needed
|
---|
| 851 | $(_PREMAKEFILES_NEEDED):
|
---|
| 852 | @$(TOOL_DOMAKES) "$(PREMAKEFILES)" $(TOOL_MAKE) needed
|
---|
| 853 | ! endif
|
---|
| 854 | !endif
|
---|
| 855 |
|
---|
[9127] | 856 | !ifdef TARGET_NEEDED
|
---|
[9090] | 857 | needed: $(_SUBDIRS_NEEDED) $(_PREMAKEFILES_NEEDED) target
|
---|
| 858 | !else
|
---|
| 859 | needed: $(_SUBDIRS_NEEDED) $(_PREMAKEFILES_NEEDED)
|
---|
| 860 | !endif
|
---|
| 861 | !ifdef POSTMAKEFILES_NEEDED
|
---|
| 862 | @$(TOOL_DOMAKES) "$(POSTMAKEFILES_NEEDED)" $(TOOL_MAKE) $@
|
---|
| 863 | !else
|
---|
| 864 | ! ifdef POSTMAKEFILES
|
---|
| 865 | @$(TOOL_DOMAKES) "$(POSTMAKEFILES)" $(TOOL_MAKE) $@
|
---|
| 866 | ! endif
|
---|
| 867 | !endif
|
---|
| 868 |
|
---|
| 869 |
|
---|
| 870 |
|
---|
| 871 | # -----------------------------------------------------------------------------
|
---|
| 872 | # Pass 3 - The lib rule - Make libraries.
|
---|
| 873 | # -----------------------------------------------------------------------------
|
---|
| 874 | !ifdef SUBDIRS_LIB
|
---|
| 875 | _SUBDIRS_LIB = _subdir_lib
|
---|
| 876 | $(_SUBDIRS_LIB):
|
---|
| 877 | @$(TOOL_DODIRS) "$(SUBDIRS_LIB)" $(TOOL_MAKE) -f $(BUILD_MAKEFILE) lib
|
---|
| 878 | !else
|
---|
| 879 | ! ifdef SUBDIRS
|
---|
| 880 | _SUBDIRS_LIB = _subdir_lib
|
---|
| 881 | $(_SUBDIRS_LIB):
|
---|
[8423] | 882 | @$(TOOL_DODIRS) "$(SUBDIRS)" $(TOOL_MAKE) -f $(BUILD_MAKEFILE) lib
|
---|
[9090] | 883 | ! endif
|
---|
[8197] | 884 | !endif
|
---|
| 885 |
|
---|
[9090] | 886 | !ifdef PREMAKEFILES_LIB
|
---|
| 887 | _PREMAKEFILES_LIB = _premakefiles_lib
|
---|
| 888 | $(_PREMAKEFILES_LIB):
|
---|
| 889 | @$(TOOL_DOMAKES) "$(PREMAKEFILES_LIB)" $(TOOL_MAKE) lib
|
---|
| 890 | !else
|
---|
| 891 | ! ifdef PREMAKEFILES
|
---|
| 892 | _PREMAKEFILES_LIB = _premakefiles_lib
|
---|
| 893 | $(_PREMAKEFILES_LIB):
|
---|
[8197] | 894 | @$(TOOL_DOMAKES) "$(PREMAKEFILES)" $(TOOL_MAKE) lib
|
---|
[9090] | 895 | ! endif
|
---|
[8197] | 896 | !endif
|
---|
| 897 |
|
---|
[9090] | 898 | lib: $(_SUBDIRS_LIB) $(_PREMAKEFILES_LIB) \
|
---|
[9127] | 899 | !if !defined(TARGET_NEEDED) && ("$(TARGET_MODE)" == "LIB" || "$(TARGET_MODE)" == "SYSLIB" || "$(TARGET_MODE)" == "IFSLIB")
|
---|
| 900 | $(TARGET) $(_TARGET_EARLY_PUBLISH) \
|
---|
[9031] | 901 | !endif
|
---|
| 902 | $(TARGET_ILIB)
|
---|
[9090] | 903 | !ifdef POSTMAKEFILES_LIB
|
---|
| 904 | @$(TOOL_DOMAKES) "$(POSTMAKEFILES_LIB)" $(TOOL_MAKE) $@
|
---|
| 905 | !else
|
---|
| 906 | ! ifdef POSTMAKEFILES
|
---|
[9031] | 907 | @$(TOOL_DOMAKES) "$(POSTMAKEFILES)" $(TOOL_MAKE) $@
|
---|
[9090] | 908 | ! endif
|
---|
[9031] | 909 | !endif
|
---|
| 910 |
|
---|
| 911 |
|
---|
| 912 |
|
---|
| 913 | # -----------------------------------------------------------------------------
|
---|
[9090] | 914 | # Pass 4 - The executable rule - Build the executables.
|
---|
[9031] | 915 | # -----------------------------------------------------------------------------
|
---|
[9090] | 916 | !ifdef SUBDIRS_EXECUTABLE
|
---|
| 917 | _SUBDIRS_EXECUTABLE = _subdir_executable
|
---|
| 918 | $(_SUBDIRS_EXECUTABLE):
|
---|
| 919 | @$(TOOL_DODIRS) "$(SUBDIRS_EXECUTABLE)" $(TOOL_MAKE) -f $(BUILD_MAKEFILE) executable
|
---|
| 920 | !else
|
---|
| 921 | ! ifdef SUBDIRS
|
---|
| 922 | _SUBDIRS_EXECUTABLE = _subdir_executable
|
---|
| 923 | $(_SUBDIRS_EXECUTABLE):
|
---|
[9031] | 924 | @$(TOOL_DODIRS) "$(SUBDIRS)" $(TOOL_MAKE) -f $(BUILD_MAKEFILE) executable
|
---|
[9090] | 925 | ! endif
|
---|
[9031] | 926 | !endif
|
---|
| 927 |
|
---|
[9090] | 928 | !ifdef PREMAKEFILES_EXECUTABLE
|
---|
| 929 | _PREMAKEFILES_EXECUTABLE = _premakefiles_executable
|
---|
| 930 | $(_PREMAKEFILES_EXECUTABLE):
|
---|
| 931 | @$(TOOL_DOMAKES) "$(PREMAKEFILES_EXECUTABLE)" $(TOOL_MAKE) executable
|
---|
| 932 | !else
|
---|
| 933 | ! ifdef PREMAKEFILES
|
---|
| 934 | _PREMAKEFILES_EXECUTABLE = _premakefiles_executable
|
---|
| 935 | $(_PREMAKEFILES_EXECUTABLE):
|
---|
[9031] | 936 | @$(TOOL_DOMAKES) "$(PREMAKEFILES)" $(TOOL_MAKE) executable
|
---|
[9090] | 937 | ! endif
|
---|
[9031] | 938 | !endif
|
---|
| 939 |
|
---|
| 940 | executable: \
|
---|
[9127] | 941 | !if "$(TARGET_MODE)" != "LIB" && "$(TARGET_MODE)" != "SYSLIB" && "$(TARGET_MODE)" != "IFSLIB" && !defined(TARGET_NEEDED)
|
---|
| 942 | $(_SUBDIRS_EXECUTABLE) $(_PREMAKEFILES_EXECUTABLE) $(TARGET) $(_TARGET_EARLY_PUBLISH)
|
---|
[8290] | 943 | !else
|
---|
[9090] | 944 | $(_SUBDIRS_EXECUTABLE) $(_PREMAKEFILES_EXECUTABLE)
|
---|
[8290] | 945 | !endif
|
---|
[9090] | 946 | !ifdef POSTMAKEFILES_EXECUTABLE
|
---|
| 947 | @$(TOOL_DOMAKES) "$(POSTMAKEFILES_EXECUTABLE)" $(TOOL_MAKE) $@
|
---|
| 948 | !else
|
---|
| 949 | ! ifdef POSTMAKEFILES
|
---|
[8197] | 950 | @$(TOOL_DOMAKES) "$(POSTMAKEFILES)" $(TOOL_MAKE) $@
|
---|
[9090] | 951 | ! endif
|
---|
[8197] | 952 | !endif
|
---|
| 953 |
|
---|
| 954 |
|
---|
[8253] | 955 |
|
---|
| 956 | # -----------------------------------------------------------------------------
|
---|
[9090] | 957 | # Pass 5 - The miscellaneous rule - Makes other miscellaneous stuff like
|
---|
[9031] | 958 | # documentations etc. This is experimental for the moment.
|
---|
| 959 | # -----------------------------------------------------------------------------
|
---|
[9090] | 960 | !ifdef SUBDIRS_MISC
|
---|
| 961 | _SUBDIRS_MISC = _subdir_misc
|
---|
[9031] | 962 | $(SUBDIRS_MISC):
|
---|
[9090] | 963 | @$(TOOL_DODIRS) "$(SUBDIRS_MISC)" $(TOOL_MAKE) -f $(BUILD_MAKEFILE) miscellaneous
|
---|
| 964 | !else
|
---|
| 965 | ! ifdef SUBDIRS
|
---|
| 966 | _SUBDIRS_MISC = _subdir_misc
|
---|
| 967 | $(_SUBDIRS_MISC):
|
---|
[9031] | 968 | @$(TOOL_DODIRS) "$(SUBDIRS)" $(TOOL_MAKE) -f $(BUILD_MAKEFILE) miscellaneous
|
---|
[9090] | 969 | ! endif
|
---|
[9031] | 970 | !endif
|
---|
| 971 |
|
---|
[9090] | 972 | !ifdef PREMAKEFILES_MISC
|
---|
| 973 | _PREMAKEFILES_MISC = _premakefiles_misc
|
---|
[9031] | 974 | $(PREMAKEFILES_MISC):
|
---|
[9090] | 975 | @$(TOOL_DOMAKES) "$(PREMAKEFILES_MISC)" $(TOOL_MAKE) miscellaneous
|
---|
| 976 | !else
|
---|
| 977 | ! ifdef PREMAKEFILES
|
---|
| 978 | _PREMAKEFILES_MISC = _premakefiles_misc
|
---|
| 979 | $(_PREMAKEFILES_MISC):
|
---|
[9031] | 980 | @$(TOOL_DOMAKES) "$(PREMAKEFILES)" $(TOOL_MAKE) miscellaneous
|
---|
[9090] | 981 | ! endif
|
---|
[9031] | 982 | !endif
|
---|
| 983 |
|
---|
[9090] | 984 | miscellaneous: $(_SUBDIRS_MISC) $(_PREMAKEFILES_MISC) \
|
---|
[9031] | 985 | $(TARGET_DOCS) $(TARGET_MISC)
|
---|
| 986 | !if "$(TARGET_DOCS)$(TARGET_MISC)" != ""
|
---|
| 987 | @$(ECHO) Successfully Built $(CLRFIL)$(TARGET_DOCS) $(TARGET_MISC)$(CLRRST)
|
---|
[9090] | 988 | !endif
|
---|
| 989 | !ifdef POSTMAKEFILES_MISC
|
---|
| 990 | @$(TOOL_DOMAKES) "$(POSTMAKEFILES_MISC)" $(TOOL_MAKE) $@
|
---|
[9031] | 991 | !else
|
---|
[9090] | 992 | ! ifdef POSTMAKEFILES
|
---|
[9031] | 993 | @$(TOOL_DOMAKES) "$(POSTMAKEFILES)" $(TOOL_MAKE) $@
|
---|
[9090] | 994 | ! endif
|
---|
[9031] | 995 | !endif
|
---|
| 996 |
|
---|
| 997 |
|
---|
| 998 |
|
---|
| 999 | # -----------------------------------------------------------------------------
|
---|
[9127] | 1000 | # Pass 6 - The publish rule - Copies target to main binary directory.
|
---|
[8253] | 1001 | # Installation order is not concidered vital, so subdirectories and
|
---|
[9127] | 1002 | # pre-makefiles are processed after this directory.
|
---|
| 1003 | # However, this order might be changed!
|
---|
[8253] | 1004 | # -----------------------------------------------------------------------------
|
---|
[9127] | 1005 | !if "$(_TARGET_EARLY_PUBLISH)" != ""
|
---|
| 1006 | publish:
|
---|
| 1007 | !else
|
---|
| 1008 | publish: publish_target
|
---|
[8197] | 1009 | !endif
|
---|
[9127] | 1010 | !ifdef SUBDIRS_PUBLISH
|
---|
| 1011 | @$(TOOL_DODIRS) "$(SUBDIRS_PUBLISH)" $(TOOL_MAKE) -f $(BUILD_MAKEFILE) $@
|
---|
[9090] | 1012 | !else
|
---|
| 1013 | ! ifdef SUBDIRS
|
---|
[8423] | 1014 | @$(TOOL_DODIRS) "$(SUBDIRS)" $(TOOL_MAKE) -f $(BUILD_MAKEFILE) $@
|
---|
[9090] | 1015 | ! endif
|
---|
[8197] | 1016 | !endif
|
---|
[9127] | 1017 | !ifdef PREMAKEFILES_PUBLISH
|
---|
| 1018 | @$(TOOL_DOMAKES) "$(PREMAKEFILES_PUBLISH)" $(TOOL_MAKE) $@
|
---|
[9090] | 1019 | !else
|
---|
| 1020 | ! ifdef PREMAKEFILES
|
---|
[8197] | 1021 | @$(TOOL_DOMAKES) "$(PREMAKEFILES)" $(TOOL_MAKE) $@
|
---|
[9090] | 1022 | ! endif
|
---|
[8197] | 1023 | !endif
|
---|
[9127] | 1024 | !ifdef POSTMAKEFILES_PUBLISH
|
---|
| 1025 | @$(TOOL_DOMAKES) "$(POSTMAKEFILES_PUBLISH)" $(TOOL_MAKE) $@
|
---|
[9090] | 1026 | !else
|
---|
| 1027 | ! ifdef POSTMAKEFILES
|
---|
[8197] | 1028 | @$(TOOL_DOMAKES) "$(POSTMAKEFILES)" $(TOOL_MAKE) $@
|
---|
[9090] | 1029 | ! endif
|
---|
[8197] | 1030 | !endif
|
---|
| 1031 |
|
---|
[9135] | 1032 |
|
---|
[9127] | 1033 | #
|
---|
| 1034 | # Publish rule which doesn't go down into subdirs and submakes.
|
---|
| 1035 | # This one is invoked when a target is 'needed' or early published.
|
---|
| 1036 | #
|
---|
| 1037 | publish_target:
|
---|
| 1038 | !if "$(_TARGET_EARLY_PUBLISH)" != "" || "$(TARGET_MODE:LIB=cute)" == "$(TARGET_MODE)"
|
---|
| 1039 | ! if "$(TARGET_MODE)" != "EMPTY" && "$(TARGET_MODE)" != "TESTCASE" && "$(TARGET_MODE)" != "DEPEND"
|
---|
| 1040 | @$(ECHO) Publishing $(CLRFIL)$(TARGET)$(CLRTXT) to directory $(CLRFIL)$(TARGET_PUB_DIR)\$(TARGET_PUB_SUB)$(CLRRST)
|
---|
| 1041 | @if not exist "$(TARGET)" $(TOOL_ECHO) $(CLRERR)WARNING: $(CLRFIL)$(TARGET)$(CLRERR) doesn't exist. $(CLRRST)
|
---|
| 1042 | @if not exist "$(TARGET_PUB_DIR)" $(TOOL_CREATEPATH) $(TARGET_PUB_DIR)
|
---|
| 1043 | @if exist "$(TARGET)" $(TOOL_COPY) "$(TARGET)" "$(TARGET_PUB)"
|
---|
| 1044 | @if exist "$(TARGET_SYM)" $(TOOL_COPY) "$(TARGET_SYM)" "$(TARGET_PUB_DIR)"
|
---|
| 1045 | ! if "$(TARGET_PUB_DEB)" != ""
|
---|
| 1046 | @$(ECHO) Publishing unstripped $(CLRFIL)$(TARGET)$(CLRTXT) to directory $(CLRFIL)$(TARGET_PUB_DIR_DEB)$(CLRRST)
|
---|
| 1047 | @if not exist "$(_TARGET_DEB)" $(TOOL_ECHO) $(CLRERR)WARNING: $(CLRFIL)$(_TARGET)$(CLRERR) doesn't exist. $(CLRRST)
|
---|
| 1048 | @if not exist "$(TARGET_PUB_DIR_DEB)" $(TOOL_CREATEPATH) $(TARGET_PUB_DIR_DEB)
|
---|
| 1049 | @if exist "$(_TARGET_DEB)" $(TOOL_COPY) "$(_TARGET_DEB)" "$(TARGET_PUB_DEB)"
|
---|
| 1050 | @if exist "$(TARGET_SYM)" $(TOOL_COPY) "$(TARGET_SYM)" "$(TARGET_PUB_DIR_DEB)"
|
---|
| 1051 | ! endif
|
---|
| 1052 | ! endif
|
---|
| 1053 | !endif
|
---|
| 1054 | !if "$(TARGET_DOCS)" != ""
|
---|
| 1055 | $(TOOL_COPY) $(TARGET_DOCS) $(PATH_DOC)
|
---|
| 1056 | !endif
|
---|
[8197] | 1057 |
|
---|
[8253] | 1058 |
|
---|
[9127] | 1059 |
|
---|
[9031] | 1060 | # -----------------------------------------------------------------------------
|
---|
| 1061 | # Pass x - The testcase rule - Execute testcases when present.
|
---|
| 1062 | # Testcases are either a testcase.mak file or a testcase subdirectory.
|
---|
| 1063 | # -----------------------------------------------------------------------------
|
---|
[8714] | 1064 | !if "$(TARGET_MODE)" != "TESTCASE"
|
---|
| 1065 | !ifndef BUILD_OWN_TESTCASE_RULE
|
---|
[9090] | 1066 |
|
---|
[8714] | 1067 | !ifndef MAKEVER
|
---|
| 1068 | _TESTCASE_TST1 = [$(TOOL_EXISTS) testcase] == 0
|
---|
| 1069 | _TESTCASE_TST2 = [$(TOOL_EXISTS) testcase.mak] == 0
|
---|
| 1070 | !else
|
---|
| 1071 | _TESTCASE_TST1 = exists(testcase) != 0
|
---|
| 1072 | _TESTCASE_TST2 = exists(testcase.mak) != 0
|
---|
| 1073 | !endif
|
---|
[9031] | 1074 |
|
---|
[8290] | 1075 | testcase:
|
---|
[9031] | 1076 | @$(ECHO) Executing testcases $(CLRRST)
|
---|
[8714] | 1077 | !if $(_TESTCASE_TST1)
|
---|
[8423] | 1078 | @$(TOOL_DODIRS) "testcase" $(TOOL_MAKE) -f $(BUILD_MAKEFILE) $@
|
---|
[8197] | 1079 | !endif
|
---|
[8714] | 1080 | !if $(_TESTCASE_TST2)
|
---|
[8197] | 1081 | @$(TOOL_DOMAKES) "testcase.mak" $(TOOL_MAKE) $@
|
---|
| 1082 | !endif
|
---|
[9090] | 1083 | !ifdef SUBDIRS_TESTCASE
|
---|
| 1084 | @$(TOOL_DODIRS) "$(SUBDIRS_TESTCASE)" $(TOOL_MAKE) -f $(BUILD_MAKEFILE) $@
|
---|
| 1085 | !else
|
---|
| 1086 | ! ifdef SUBDIRS
|
---|
[8423] | 1087 | @$(TOOL_DODIRS) "$(SUBDIRS)" $(TOOL_MAKE) -f $(BUILD_MAKEFILE) $@
|
---|
[9090] | 1088 | ! endif
|
---|
[8197] | 1089 | !endif
|
---|
[9090] | 1090 | !ifdef PREMAKEFILES_TESTCASE
|
---|
| 1091 | @$(TOOL_DOMAKES) "$(PREMAKEFILES_TESTCASE)" $(TOOL_MAKE) $@
|
---|
| 1092 | !else
|
---|
| 1093 | ! ifdef PREMAKEFILES
|
---|
[8197] | 1094 | @$(TOOL_DOMAKES) "$(PREMAKEFILES)" $(TOOL_MAKE) $@
|
---|
[9090] | 1095 | ! endif
|
---|
[8197] | 1096 | !endif
|
---|
[9090] | 1097 | !ifdef POSTMAKEFILES_TESTCASE
|
---|
| 1098 | @$(TOOL_DOMAKES) "$(POSTMAKEFILES_TESTCASE)" $(TOOL_MAKE) $@
|
---|
| 1099 | !else
|
---|
| 1100 | ! ifdef POSTMAKEFILES
|
---|
[8197] | 1101 | @$(TOOL_DOMAKES) "$(POSTMAKEFILES)" $(TOOL_MAKE) $@
|
---|
[9090] | 1102 | ! endif
|
---|
[8197] | 1103 | !endif
|
---|
[9090] | 1104 |
|
---|
| 1105 | !endif # BUILD_OWN_TESTCASE_RULE
|
---|
[8714] | 1106 | !endif #!TESTCASE
|
---|
[8197] | 1107 |
|
---|
| 1108 |
|
---|
[8253] | 1109 |
|
---|
| 1110 | # -----------------------------------------------------------------------------
|
---|
[9031] | 1111 | # The target rule - Build the target.
|
---|
[9090] | 1112 | # NOTE! NO SUBDIRS OR POST/PREMAKED INVOLVED!
|
---|
[8298] | 1113 | # -----------------------------------------------------------------------------
|
---|
[9127] | 1114 | target: $(TARGET) $(TARGET_ILIB) $(_TARGET_EARLY_PUBLISH)
|
---|
| 1115 | !if "$(TARGET)$(TARGET_ILIB)" != ""
|
---|
[9031] | 1116 | @$(ECHO) Successfully Built $(CLRFIL)$(TARGET) $(TARGET_ILIB)$(CLRRST)
|
---|
[9127] | 1117 | !else
|
---|
| 1118 | @$(ECHO) .$(CLRRST)
|
---|
| 1119 | !endif
|
---|
[8197] | 1120 |
|
---|
| 1121 |
|
---|
[8253] | 1122 |
|
---|
| 1123 | # -----------------------------------------------------------------------------
|
---|
[9031] | 1124 | # The shell rule - Setup the correcte shell environment and start a shell.
|
---|
[8253] | 1125 | # -----------------------------------------------------------------------------
|
---|
[9031] | 1126 | shell:
|
---|
| 1127 | @$(ECHO) Creating work shell $(CLRRST)
|
---|
| 1128 | \
|
---|
| 1129 | !ifndef BUILD_VERBOSE
|
---|
| 1130 | @ \
|
---|
[8197] | 1131 | !endif
|
---|
[9031] | 1132 | -$(TOOL_BUILDENV) $(BUILD_ENVS_BASE_PRE) $(BUILD_ENVS_PRE) $(ENV_ENVS) \
|
---|
| 1133 | $(BUILD_ENVS_BASE_POST) $(BUILD_ENVS_POST) * $(COMSPEC)
|
---|
[8714] | 1134 |
|
---|
| 1135 |
|
---|
| 1136 |
|
---|
| 1137 | # -----------------------------------------------------------------------------
|
---|
| 1138 | # The nothing rule - Rule for testing the makefile structure.
|
---|
| 1139 | # -----------------------------------------------------------------------------
|
---|
| 1140 | nothing:
|
---|
[9031] | 1141 | @$(ECHO) Doing nothing in $(MAKEFILE).
|
---|
[8714] | 1142 | !ifdef SUBDIRS
|
---|
[8423] | 1143 | @$(TOOL_DODIRS) "$(SUBDIRS)" $(TOOL_MAKE) -f $(BUILD_MAKEFILE) $@
|
---|
[8197] | 1144 | !endif
|
---|
| 1145 | !ifdef PREMAKEFILES
|
---|
| 1146 | @$(TOOL_DOMAKES) "$(PREMAKEFILES)" $(TOOL_MAKE) $@
|
---|
| 1147 | !endif
|
---|
| 1148 | !ifdef POSTMAKEFILES
|
---|
| 1149 | @$(TOOL_DOMAKES) "$(POSTMAKEFILES)" $(TOOL_MAKE) $@
|
---|
| 1150 | !endif
|
---|
[8714] | 1151 | @$(ECHO) Completed nothing in $(MAKEFILE).
|
---|
[8197] | 1152 |
|
---|
| 1153 |
|
---|
[8253] | 1154 |
|
---|
| 1155 | # -----------------------------------------------------------------------------
|
---|
| 1156 | # The $(TARGET) rule - For EXE, DLL, SYS and IFS targets
|
---|
| 1157 | # -----------------------------------------------------------------------------
|
---|
[8423] | 1158 | !if "$(TARGET_MODE)" == "EXE" || "$(TARGET_MODE)" == "DLL" || "$(TARGET_MODE)" == "SYS" || "$(TARGET_MODE)" == "IFS" || "$(TARGET_MODE)" == "VDD"
|
---|
[8333] | 1159 | $(TARGET): $(TARGET_OBJS) $(TARGET_RES) $(TARGET_DEF_LINK) $(TARGET_LNK) $(TARGET_DEPS)
|
---|
[8423] | 1160 | !if "$(TOOL_JOB_WAIT)" != ""
|
---|
| 1161 | ! ifndef BUILD_QUIET
|
---|
[8714] | 1162 | @$(ECHO) Waiting for jobs to complete $(CLRRST)
|
---|
[8423] | 1163 | ! endif
|
---|
[8714] | 1164 | \
|
---|
[8423] | 1165 | ! ifndef BUILD_VERBOSE
|
---|
[8714] | 1166 | @ \
|
---|
[8423] | 1167 | ! endif
|
---|
[8714] | 1168 | $(TOOL_JOB_WAIT)
|
---|
[8423] | 1169 | !endif
|
---|
[8197] | 1170 | @$(ECHO) Linking $(TARGET_MODE) $(CLRFIL)$@ $(CLRRST)
|
---|
[8714] | 1171 | \
|
---|
[8290] | 1172 | !ifndef BUILD_VERBOSE
|
---|
| 1173 | @ \
|
---|
| 1174 | !endif
|
---|
[8197] | 1175 | !ifdef TARGET_IGNORE_LINKER_WARNINGS
|
---|
| 1176 | -4 \
|
---|
| 1177 | !endif
|
---|
| 1178 | !if "$(TARGET_MODE)" == "EXE"
|
---|
[8253] | 1179 | $(LINK_CMD_EXE)
|
---|
[8197] | 1180 | !endif
|
---|
[8423] | 1181 | !if "$(TARGET_MODE)" == "DLL"
|
---|
[8290] | 1182 | $(LINK_CMD_DLL)
|
---|
[8197] | 1183 | !endif
|
---|
| 1184 | !if "$(TARGET_MODE)" == "SYS"
|
---|
[8290] | 1185 | $(LINK_CMD_SYS)
|
---|
[8197] | 1186 | !endif
|
---|
[8213] | 1187 | !if "$(TARGET_MODE)" == "IFS"
|
---|
[8290] | 1188 | $(LINK_CMD_IFS)
|
---|
[8213] | 1189 | !endif
|
---|
[8290] | 1190 | !if "$(TARGET_MODE)" == "VDD"
|
---|
| 1191 | $(LINK_CMD_VDD)
|
---|
| 1192 | !endif
|
---|
[8197] | 1193 | !if "$(TARGET_RES)" != "" && "$(RL)" != ""
|
---|
| 1194 | @$(ECHO) Linking Resources $(CLRRST)
|
---|
[8714] | 1195 | \
|
---|
[8290] | 1196 | ! ifndef BUILD_VERBOSE
|
---|
| 1197 | @ \
|
---|
| 1198 | ! endif
|
---|
| 1199 | $(RL) $(RL_FLAGS) $(TARGET_RES) $@
|
---|
[8197] | 1200 | !endif
|
---|
| 1201 | !if "$(TARGET_DLLRNAME)" != ""
|
---|
| 1202 | @$(ECHO) Dll Rename $(TARGET_DLLRNAME)
|
---|
[8714] | 1203 | \
|
---|
[8290] | 1204 | ! ifndef BUILD_VERBOSE
|
---|
| 1205 | @ \
|
---|
| 1206 | ! endif
|
---|
[8197] | 1207 | $(TOOL_DLLRNAME) $(TARGET) $(TARGET_DLLRNAME)
|
---|
| 1208 | !endif
|
---|
[8333] | 1209 | !if "$(TOOL_MAPSYM)" != "" && "$(TARGET_SYM)" != "" && "$(TARGET_MAP)" != ""
|
---|
[8714] | 1210 | \
|
---|
[8333] | 1211 | ! ifndef BUILD_VERBOSE
|
---|
| 1212 | @ \
|
---|
| 1213 | ! endif
|
---|
| 1214 | $(TOOL_MAPSYM) $(TARGET_MAP) $(TARGET_SYM)
|
---|
| 1215 | !endif
|
---|
[9127] | 1216 | !if "$(BUILD_MODE)" == "RELEASE"
|
---|
| 1217 | \
|
---|
| 1218 | ! ifndef BUILD_VERBOSE
|
---|
| 1219 | @ \
|
---|
| 1220 | ! endif
|
---|
| 1221 | $(TOOL_COPY) "$@" "$(_TARGET_DEB)"
|
---|
| 1222 | ! if "$(TOOL_STRIP)" != ""
|
---|
| 1223 | \
|
---|
| 1224 | ! ifndef BUILD_VERBOSE
|
---|
| 1225 | @ \
|
---|
| 1226 | ! endif
|
---|
| 1227 | $(TOOL_STRIP) $@
|
---|
| 1228 | ! endif
|
---|
| 1229 | !endif
|
---|
[8197] | 1230 |
|
---|
| 1231 |
|
---|
| 1232 | #
|
---|
| 1233 | # Linker parameter file.
|
---|
| 1234 | #
|
---|
| 1235 | $(TARGET_LNK): $(MAKE_INCLUDE_PROCESS) $(MAKE_INCLUDE_SETUP) $(PATH_MAKE)\setup.mak $(MAKEFILE)
|
---|
[8362] | 1236 | !ifndef TOOL_DEFCONV
|
---|
[9116] | 1237 | @$(TOOL_ECHOTXT) Creating Linker Input File $(CLRRST)<<$@
|
---|
[8197] | 1238 | $(LINK_LNK1)
|
---|
| 1239 | $(LINK_LNK2)
|
---|
| 1240 | $(LINK_LNK3)
|
---|
| 1241 | $(LINK_LNK4)
|
---|
| 1242 | $(LINK_LNK5)
|
---|
| 1243 | <<KEEP
|
---|
[8362] | 1244 | !else
|
---|
| 1245 | @$(ECHO) Creating Linker Input File $(CLRRST) $@
|
---|
[9044] | 1246 | @$(TOOL_RM) "$@"
|
---|
[8714] | 1247 | \
|
---|
[8362] | 1248 | ! ifdef BUILD_VERBOSE
|
---|
| 1249 | @ \
|
---|
| 1250 | ! endif
|
---|
| 1251 | $(TOOL_DEFCONV) $(TARGET_DEF_LINK) $@ <<$(TARGET_LNK)2
|
---|
| 1252 | #
|
---|
| 1253 | # LINK_LNK[1-5]:
|
---|
| 1254 | #
|
---|
| 1255 | $(LINK_LNK1)
|
---|
| 1256 | $(LINK_LNK2)
|
---|
| 1257 | $(LINK_LNK3)
|
---|
| 1258 | $(LINK_LNK4)
|
---|
| 1259 | $(LINK_LNK5)
|
---|
| 1260 | <<keep
|
---|
| 1261 | !endif
|
---|
[8355] | 1262 | !ifdef BUILD_VERBOSE
|
---|
| 1263 | @type $@
|
---|
| 1264 | !endif
|
---|
[8333] | 1265 |
|
---|
| 1266 |
|
---|
| 1267 | #
|
---|
| 1268 | # Builddef modified definition file.
|
---|
| 1269 | #
|
---|
| 1270 | !if "$(TARGET_DEF_LINK)" != "$(TARGET_DEF)"
|
---|
| 1271 | $(TARGET_DEF_LINK): $(TARGET_DEF)
|
---|
| 1272 | ! ifndef BUILD_QUIET
|
---|
| 1273 | @$(ECHO) Stamping deffile with build level info.$(CLRRST)
|
---|
| 1274 | ! endif
|
---|
[8714] | 1275 | \
|
---|
[8333] | 1276 | ! ifndef BUILD_VERBOSE
|
---|
| 1277 | @ \
|
---|
| 1278 | ! endif
|
---|
| 1279 | $(TOOL_BLDLEVEL) $(BUILD_BLDLEVEL_FLAGS) $(TARGET_BLDLEVEL_FLAGS) -R$** $** $@
|
---|
[8290] | 1280 | !endif
|
---|
[8197] | 1281 |
|
---|
[8333] | 1282 | !endif
|
---|
[8197] | 1283 |
|
---|
[8333] | 1284 |
|
---|
[8253] | 1285 | # -----------------------------------------------------------------------------
|
---|
[8290] | 1286 | # The $(TARGET) rule - For LIB, SYSLIB, and IFSLIB targets.
|
---|
[8253] | 1287 | # -----------------------------------------------------------------------------
|
---|
[8290] | 1288 | !if "$(TARGET_MODE)" == "LIB" || "$(TARGET_MODE)" == "SYSLIB" || "$(TARGET_MODE)" == "IFSLIB"
|
---|
[8197] | 1289 | $(TARGET): $(TARGET_OBJS) $(TARGET_LNK) $(TARGET_DEPS)
|
---|
[8423] | 1290 | !if "$(TOOL_JOB_WAIT)" != ""
|
---|
| 1291 | ! ifndef BUILD_QUIET
|
---|
| 1292 | @$(ECHO) Waiting for jobs to complete $(CLRRST)
|
---|
| 1293 | ! endif
|
---|
[8714] | 1294 | \
|
---|
[8423] | 1295 | ! ifndef BUILD_VERBOSE
|
---|
| 1296 | @ \
|
---|
| 1297 | ! endif
|
---|
| 1298 | $(TOOL_JOB_WAIT)
|
---|
| 1299 | !endif
|
---|
[8197] | 1300 | @$(ECHO) Creating Library $(CLRFIL)$@ $(CLRRST)
|
---|
[8290] | 1301 | !ifndef BUILD_VERBOSE
|
---|
[9044] | 1302 | @$(TOOL_RM) "$@"
|
---|
[8290] | 1303 | @$(AR_CMD)
|
---|
| 1304 | !else
|
---|
[9044] | 1305 | $(TOOL_RM) "$@"
|
---|
[8197] | 1306 | $(AR_CMD)
|
---|
[8290] | 1307 | !endif
|
---|
[8197] | 1308 |
|
---|
| 1309 |
|
---|
| 1310 | #
|
---|
| 1311 | # Lib parameter file.
|
---|
| 1312 | #
|
---|
| 1313 | $(TARGET_LNK): $(MAKE_INCLUDE_PROCESS) $(MAKE_INCLUDE_SETUP) $(PATH_MAKE)\setup.mak $(MAKEFILE)
|
---|
[9116] | 1314 | @$(TOOL_ECHOTXT) Creating Lib Input File $(CLRRST)<<$@
|
---|
[8197] | 1315 | $(AR_LNK1)
|
---|
| 1316 | $(AR_LNK2)
|
---|
| 1317 | $(AR_LNK3)
|
---|
| 1318 | $(AR_LNK4)
|
---|
| 1319 | $(AR_LNK5)
|
---|
| 1320 | <<KEEP
|
---|
[8423] | 1321 | !ifdef BUILD_VERBOSE
|
---|
| 1322 | @type $@
|
---|
[8197] | 1323 | !endif
|
---|
[8423] | 1324 | !endif
|
---|
[8197] | 1325 |
|
---|
| 1326 |
|
---|
[9031] | 1327 | # -----------------------------------------------------------------------------
|
---|
| 1328 | # The $(TARGET) rule - For DEPEND targets.
|
---|
[8253] | 1329 | # -----------------------------------------------------------------------------
|
---|
[9028] | 1330 | !if "$(TARGET_MODE)" == "DEPEND"
|
---|
| 1331 | $(TARGET):
|
---|
| 1332 | @$(ECHO) .
|
---|
[8197] | 1333 | !endif
|
---|
| 1334 |
|
---|
| 1335 |
|
---|
[8253] | 1336 |
|
---|
| 1337 | # -----------------------------------------------------------------------------
|
---|
| 1338 | # The $(TARGET_ILIB) rule - Make import library.
|
---|
| 1339 | # -----------------------------------------------------------------------------
|
---|
| 1340 | !ifdef TARGET_ILIB
|
---|
| 1341 | $(TARGET_ILIB): $(TARGET_IDEF)
|
---|
| 1342 | @$(ECHO) Creating Import Library $(CLRFIL)$@ $(CLRRST)
|
---|
[8714] | 1343 | \
|
---|
[8290] | 1344 | !ifndef BUILD_VERBOSE
|
---|
[9065] | 1345 | @if not exist $(@D) $(ECHO) Target implib path $(CLRFIL)$(@D)$(CLRTXT) does NOT exist. Creating. $(CLRRST)
|
---|
| 1346 | !endif
|
---|
| 1347 | @if not exist $(@D) $(TOOL_CREATEPATH) $(@D)
|
---|
| 1348 | \
|
---|
| 1349 | !ifndef BUILD_VERBOSE
|
---|
[8290] | 1350 | @ \
|
---|
| 1351 | !endif
|
---|
[8253] | 1352 | $(IMPLIB) $(IMPLIB_FLAGS) $@ $(TARGET_IDEF)
|
---|
[9116] | 1353 |
|
---|
| 1354 |
|
---|
| 1355 | #
|
---|
| 1356 | # Conversion rule for converting the .def file before passing along to implib.
|
---|
| 1357 | #
|
---|
| 1358 | ! if "$(TARGET_IDEF_ORG)" != "" && "$(TARGET_IDEF_ORG)" != "$(TARGET_IDEF)"
|
---|
| 1359 | $(TARGET_IDEF): $(TARGET_IDEF_ORG)
|
---|
| 1360 | @$(ECHO) Making Import Definition File $(CLRFIL)$@ $(CLRRST)
|
---|
| 1361 | \
|
---|
| 1362 | !ifndef BUILD_VERBOSE
|
---|
| 1363 | @if not exist $(@D) $(ECHO) Target .def path $(CLRFIL)$(@D)$(CLRTXT) does NOT exist. Creating. $(CLRRST)
|
---|
[8253] | 1364 | !endif
|
---|
[9116] | 1365 | @if not exist $(@D) $(TOOL_CREATEPATH) $(@D)
|
---|
| 1366 | \
|
---|
| 1367 | !ifndef BUILD_VERBOSE
|
---|
| 1368 | @ \
|
---|
| 1369 | !endif
|
---|
| 1370 | $(TOOL_IDEFCONV) $(TOOL_IDEFCONV_FLAGS) $(TARGET_IDEF_ORG) $@
|
---|
| 1371 | ! endif
|
---|
[8253] | 1372 |
|
---|
[9116] | 1373 | !endif
|
---|
[8253] | 1374 |
|
---|
| 1375 |
|
---|
[9116] | 1376 |
|
---|
[8253] | 1377 | # -----------------------------------------------------------------------------
|
---|
| 1378 | # The .force rule - Force a remake of something everytime.
|
---|
| 1379 | # -----------------------------------------------------------------------------
|
---|
| 1380 | .force:
|
---|
[8290] | 1381 | !ifndef BUILD_VERBOSE
|
---|
[8253] | 1382 | @$(ECHO) .
|
---|
[8290] | 1383 | !else
|
---|
| 1384 | @$(ECHO) . (force) .
|
---|
| 1385 | !endif
|
---|
[8253] | 1386 |
|
---|
| 1387 |
|
---|
| 1388 |
|
---|
| 1389 | # -----------------------------------------------------------------------------
|
---|
| 1390 | # Read Dependencies.
|
---|
| 1391 | # -----------------------------------------------------------------------------
|
---|
[9028] | 1392 | !if "$(TARGET_MODE)" != "TESTCASE" && "$(TARGET_MODE)" != "DEPEND"
|
---|
[8714] | 1393 | !if "$(TARGET_MODE)" != "EMPTY" && "$(NODEP)" == ""
|
---|
[8253] | 1394 |
|
---|
[8197] | 1395 | #
|
---|
[8253] | 1396 | # Read dependency file for current directory
|
---|
[8197] | 1397 | #
|
---|
[8714] | 1398 | !ifndef MAKEVER
|
---|
| 1399 | ! if [$(TOOL_EXISTS) $(TARGET_DEPEND)] == 0
|
---|
| 1400 | ! ifdef BUILD_VERBOSE
|
---|
| 1401 | ! if [$(ECHO) Including dependency $(CLRFIL)$(TARGET_DEPEND)$(CLRRST)]
|
---|
| 1402 | ! endif
|
---|
[8197] | 1403 | ! endif
|
---|
[8714] | 1404 | ! include $(TARGET_DEPEND)
|
---|
| 1405 | ! else
|
---|
[9062] | 1406 | #! ifndef NODEP
|
---|
| 1407 | #! if [$(ECHO) $(CLRERR)WARNING: Please make dependencies first. $(TARGET_DEPEND) is missing.$(CLRRST)]
|
---|
| 1408 | #! endif
|
---|
| 1409 | #! endif
|
---|
[8253] | 1410 | ! endif
|
---|
[8714] | 1411 | !else
|
---|
| 1412 | ! if %exists($(TARGET_DEPEND)) != 0
|
---|
| 1413 | ! ifdef BUILD_VERBOSE
|
---|
| 1414 | $(ECHO) Including dependency $(CLRFIL)$(TARGET_DEPEND)$(CLRRST)
|
---|
| 1415 | ! endif
|
---|
| 1416 | ! include $(TARGET_DEPEND)
|
---|
| 1417 | ! else
|
---|
[9062] | 1418 | #! ifndef NODEP
|
---|
| 1419 | #$(ECHO) $(CLRERR)WARNING: Please make dependencies first. $(TARGET_DEPEND) is missing.$(CLRRST)
|
---|
| 1420 | #! endif
|
---|
[8714] | 1421 | ! endif
|
---|
[8253] | 1422 | !endif
|
---|
| 1423 |
|
---|
| 1424 |
|
---|
| 1425 | #
|
---|
| 1426 | # Read global dependency files.
|
---|
| 1427 | #
|
---|
| 1428 | !ifdef BUILD_DEPEND1
|
---|
[8714] | 1429 | ! ifndef MAKEVER
|
---|
| 1430 | ! if [$(TOOL_EXISTS) $(BUILD_DEPEND1)] == 0
|
---|
| 1431 | ! ifdef BUILD_VERBOSE
|
---|
| 1432 | ! if [$(ECHO) Including dependency $(CLRFIL)$(BUILD_DEPEND1)$(CLRRST)]
|
---|
| 1433 | ! endif
|
---|
[8253] | 1434 | ! endif
|
---|
[8714] | 1435 | ! include $(BUILD_DEPEND1)
|
---|
| 1436 | ! else
|
---|
| 1437 | ! ifndef NODEP
|
---|
[8253] | 1438 | ! if [$(ECHO) $(CLRERR)WARNING: Please make dependencies first. $(BUILD_DEPEND1) is missing.$(CLRRST)]
|
---|
[8197] | 1439 | ! endif
|
---|
[8714] | 1440 | ! endif
|
---|
[8197] | 1441 | ! endif
|
---|
[8714] | 1442 | ! else
|
---|
| 1443 | ! if %exists($(BUILD_DEPEND1)) != 0
|
---|
| 1444 | ! ifdef BUILD_VERBOSE
|
---|
| 1445 | $(ECHO) Including dependency $(CLRFIL)$(BUILD_DEPEND1)$(CLRRST)
|
---|
| 1446 | ! endif
|
---|
| 1447 | ! include $(BUILD_DEPEND1)
|
---|
| 1448 | ! else
|
---|
| 1449 | ! ifndef NODEP
|
---|
| 1450 | $(ECHO) $(CLRERR)WARNING: Please make dependencies first. $(BUILD_DEPEND1) is missing.$(CLRRST)
|
---|
| 1451 | ! endif
|
---|
| 1452 | ! endif
|
---|
[8197] | 1453 | ! endif
|
---|
| 1454 | !endif
|
---|
| 1455 |
|
---|
[8714] | 1456 |
|
---|
[8253] | 1457 | !ifdef BUILD_DEPEND2
|
---|
[8714] | 1458 | ! ifndef MAKEVER
|
---|
| 1459 | ! if [$(TOOL_EXISTS) $(BUILD_DEPEND2)] == 0
|
---|
| 1460 | ! ifdef BUILD_VERBOSE
|
---|
| 1461 | ! if [$(ECHO) Including dependency $(CLRFIL)$(BUILD_DEPEND2)$(CLRRST)]
|
---|
| 1462 | ! endif
|
---|
[8253] | 1463 | ! endif
|
---|
[8714] | 1464 | ! include $(BUILD_DEPEND2)
|
---|
| 1465 | ! else
|
---|
| 1466 | ! ifndef NODEP
|
---|
[8253] | 1467 | ! if [$(ECHO) $(CLRERR)WARNING: Please make dependencies first. $(BUILD_DEPEND2) is missing.$(CLRRST)]
|
---|
| 1468 | ! endif
|
---|
[8714] | 1469 | ! endif
|
---|
[8253] | 1470 | ! endif
|
---|
[8714] | 1471 | ! else
|
---|
| 1472 | ! if %exists($(BUILD_DEPEND2)) != 0
|
---|
| 1473 | ! ifdef BUILD_VERBOSE
|
---|
| 1474 | $(ECHO) Including dependency $(CLRFIL)$(BUILD_DEPEND2)$(CLRRST)
|
---|
| 1475 | ! endif
|
---|
| 1476 | ! include $(BUILD_DEPEND2)
|
---|
| 1477 | ! else
|
---|
| 1478 | ! ifndef NODEP
|
---|
| 1479 | $(ECHO) $(CLRERR)WARNING: Please make dependencies first. $(BUILD_DEPEND2) is missing.$(CLRRST)
|
---|
| 1480 | ! endif
|
---|
| 1481 | ! endif
|
---|
[8253] | 1482 | ! endif
|
---|
| 1483 | !endif
|
---|
[8197] | 1484 |
|
---|
| 1485 |
|
---|
[8253] | 1486 | !ifdef BUILD_DEPEND3
|
---|
[8714] | 1487 | ! ifndef MAKEVER
|
---|
| 1488 | ! if [$(TOOL_EXISTS) $(BUILD_DEPEND3)] == 0
|
---|
| 1489 | ! ifdef BUILD_VERBOSE
|
---|
| 1490 | ! if [$(ECHO) Including dependency $(CLRFIL)$(BUILD_DEPEND3)$(CLRRST)]
|
---|
| 1491 | ! endif
|
---|
[8253] | 1492 | ! endif
|
---|
[8714] | 1493 | ! include $(BUILD_DEPEND3)
|
---|
| 1494 | ! else
|
---|
| 1495 | ! ifndef NODEP
|
---|
[8253] | 1496 | ! if [$(ECHO) $(CLRERR)WARNING: Please make dependencies first. $(BUILD_DEPEND3) is missing.$(CLRRST)]
|
---|
| 1497 | ! endif
|
---|
[8714] | 1498 | ! endif
|
---|
[8253] | 1499 | ! endif
|
---|
[8714] | 1500 | ! else
|
---|
| 1501 | ! if %exists($(BUILD_DEPEND3)) != 0
|
---|
| 1502 | ! ifdef BUILD_VERBOSE
|
---|
| 1503 | $(ECHO) Including dependency $(CLRFIL)$(BUILD_DEPEND3)$(CLRRST)
|
---|
| 1504 | ! endif
|
---|
| 1505 | ! include $(BUILD_DEPEND3)
|
---|
| 1506 | ! else
|
---|
| 1507 | ! ifndef NODEP
|
---|
| 1508 | $(ECHO) $(CLRERR)WARNING: Please make dependencies first. $(BUILD_DEPEND3) is missing.$(CLRRST)
|
---|
| 1509 | ! endif
|
---|
| 1510 | ! endif
|
---|
[8253] | 1511 | ! endif
|
---|
| 1512 | !endif
|
---|
| 1513 |
|
---|
| 1514 |
|
---|
| 1515 | !endif
|
---|
| 1516 |
|
---|
[8423] | 1517 |
|
---|
| 1518 | #
|
---|
| 1519 | # If BUILD_MULTIJOBS is nonempty make sure the job daemon is up running.
|
---|
| 1520 | #
|
---|
| 1521 | !if "$(BUILD_MULTIJOBS)" != ""
|
---|
| 1522 | ! if [$(TOOL_JOB_UP)] != 0
|
---|
| 1523 | ! if "$(BUILD_QUITE)" == ""
|
---|
[8714] | 1524 | ! ifndef MAKEVER
|
---|
| 1525 | ! if [$(ECHO) Starting Job Daemon With $(TOOL_JOB_WORKERS) Workers...$(CLRRST)]
|
---|
| 1526 | ! endif
|
---|
| 1527 | ! else
|
---|
| 1528 | $(ECHO) Starting Job Daemon With $(TOOL_JOB_WORKERS) Workers...$(CLRRST)
|
---|
[8423] | 1529 | ! endif
|
---|
| 1530 | ! endif
|
---|
| 1531 | ! if [$(TOOL_JOB_INIT) $(TOOL_JOB_WORKERS)] != 0
|
---|
[8714] | 1532 | ! ifndef MAKEVER
|
---|
| 1533 | ! if [$(ECHO) $(CLRERR)Fatal error: Failed to start job daemon.$(CLRRST)]
|
---|
| 1534 | ! endif
|
---|
| 1535 | ! error
|
---|
| 1536 | !else
|
---|
| 1537 | ! error $(CLRERR)Fatal error: Failed to start job daemon.$(CLRRST)
|
---|
| 1538 | !endif
|
---|
[8423] | 1539 | ! endif
|
---|
| 1540 | ! endif
|
---|
| 1541 | !endif
|
---|
| 1542 |
|
---|
[8714] | 1543 | !endif #!TESTCASE
|
---|