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