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