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