| 1 | # $Id: process.mak,v 1.36 2003-03-07 09:35:24 bird Exp $ | 
|---|
| 2 | # | 
|---|
| 3 | # Generic Buildsystem | 
|---|
| 4 | # | 
|---|
| 5 | #   The common build process rules | 
|---|
| 6 | # | 
|---|
| 7 | # Copyright (c) 2001-2002 knut st. osmundsen <bird@anduin.net> | 
|---|
| 8 | # Copyright (c) 2001 Patrick Haller | 
|---|
| 9 | # | 
|---|
| 10 | # This file is part of Generic Buildsystem. | 
|---|
| 11 | # | 
|---|
| 12 |  | 
|---|
| 13 |  | 
|---|
| 14 | # ----------------------------------------------------------------------------- | 
|---|
| 15 | # Assertions. | 
|---|
| 16 | #   This makefile expects setup.mak and the specific setup to be included | 
|---|
| 17 | #   already. | 
|---|
| 18 | #   It also requires the TARGET_NAME to be specified in the makefile. | 
|---|
| 19 | # ----------------------------------------------------------------------------- | 
|---|
| 20 | !if "$(MAKE_SETUP_INCLUDED)"  != "YES" | 
|---|
| 21 | ! ifndef MAKEVER | 
|---|
| 22 | !  if [$(ECHO) $(CLRERR)Fatal error: You must include setup.mak before process.mak in the makefile.$(CLRRST)] | 
|---|
| 23 | !  endif | 
|---|
| 24 | !  error | 
|---|
| 25 | !else | 
|---|
| 26 | !  error $(CLRERR)Fatal error: You must include setup.mak before process.mak in the makefile.$(CLRRST) | 
|---|
| 27 | !endif | 
|---|
| 28 | !endif | 
|---|
| 29 | !if "$(ENV_STATUS)" != "OK" | 
|---|
| 30 | ! ifndef MAKEVER | 
|---|
| 31 | !  if [$(ECHO) $(CLRERR)Fatal error: The environment is not valid. Bad setup.mak?$(CLRRST)] | 
|---|
| 32 | !  endif | 
|---|
| 33 | !  error | 
|---|
| 34 | ! else | 
|---|
| 35 | !  error $(CLRERR)Fatal error: The environment is not valid. Bad setup.mak?$(CLRRST) | 
|---|
| 36 | ! endif | 
|---|
| 37 | !endif | 
|---|
| 38 |  | 
|---|
| 39 | !if "$(TARGET_NAME)" == "" && "$(TARGET_MODE)" != "EMPTY" | 
|---|
| 40 | ! ifndef MAKEVER | 
|---|
| 41 | !  if [$(ECHO) $(CLRERR)Fatal error: TARGET_NAME is not defined! Should be set in the makefile.$(CLRRST)] | 
|---|
| 42 | !  endif | 
|---|
| 43 | !  error | 
|---|
| 44 | ! else | 
|---|
| 45 | !  error $(CLRERR)Fatal error: TARGET_NAME is not defined! Should be set in the makefile.$(CLRRST) | 
|---|
| 46 | ! endif | 
|---|
| 47 | !endif | 
|---|
| 48 |  | 
|---|
| 49 | !ifdef TARGET_MODE | 
|---|
| 50 | # Executable target mode. | 
|---|
| 51 | ! if "$(TARGET_MODE)" != "EXE" | 
|---|
| 52 | # Dynamic Load Library target mode. | 
|---|
| 53 | !  if "$(TARGET_MODE)" != "DLL" | 
|---|
| 54 | # Drive (/ system software) target mode. | 
|---|
| 55 | !   if "$(TARGET_MODE)" != "SYS" | 
|---|
| 56 | # Installable File System Drive target mode. (Also called FSD, File System Driver.) | 
|---|
| 57 | !    if "$(TARGET_MODE)" != "IFS" | 
|---|
| 58 | # Virtual Device Driver target mode. | 
|---|
| 59 | !     if "$(TARGET_MODE)" != "VDD" | 
|---|
| 60 | # Object Library target mode. | 
|---|
| 61 | !      if "$(TARGET_MODE)" != "LIB" | 
|---|
| 62 | # Object Library target mode - Special variant which is to be linked with a SYS target. | 
|---|
| 63 | !       if "$(TARGET_MODE)" != "SYSLIB" | 
|---|
| 64 | # Object Library target mode - Special variant which is to be linked with an IFS target. | 
|---|
| 65 | !        if "$(TARGET_MODE)" != "IFSLIB" | 
|---|
| 66 | # Dummy/Hub/TopLevel empty makefile. This has no target. | 
|---|
| 67 | !         if "$(TARGET_MODE)" != "EMPTY" | 
|---|
| 68 | # Dependency only makefile. (typical for include directories) | 
|---|
| 69 | !          if "$(TARGET_MODE)" != "DEPEND" | 
|---|
| 70 | # Testcase makefile. | 
|---|
| 71 | !           if "$(TARGET_MODE)" != "TESTCASE" | 
|---|
| 72 | # Bad TARGET_MODE complain. | 
|---|
| 73 | !            ifndef MAKEVER | 
|---|
| 74 | !             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)] | 
|---|
| 75 | !             endif | 
|---|
| 76 | !             error | 
|---|
| 77 | !            else | 
|---|
| 78 | !             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) | 
|---|
| 79 | !            endif | 
|---|
| 80 | !           endif | 
|---|
| 81 | !          endif | 
|---|
| 82 | !         endif | 
|---|
| 83 | !        endif | 
|---|
| 84 | !       endif | 
|---|
| 85 | !      endif | 
|---|
| 86 | !     endif | 
|---|
| 87 | !    endif | 
|---|
| 88 | !   endif | 
|---|
| 89 | !  endif | 
|---|
| 90 | ! endif | 
|---|
| 91 | !endif | 
|---|
| 92 |  | 
|---|
| 93 | # stuff which has changed behavior. | 
|---|
| 94 | !if 1 | 
|---|
| 95 |  | 
|---|
| 96 | ! ifdef TARGET_PUBNAME | 
|---|
| 97 | !  if [$(ECHO) $(CLRERR)Fatal error: TARGET_PUBNAME isn't supported. The pubname stuff has changed!$(CLRRST)] | 
|---|
| 98 | !  endif | 
|---|
| 99 | !  error | 
|---|
| 100 | ! endif | 
|---|
| 101 |  | 
|---|
| 102 | ! ifdef PATH_INCLUDE | 
|---|
| 103 | !  if [$(ECHO) $(CLRERR)Fatal error: PATH_INCLUDE has changed name to PATH_INCLUDES!$(CLRRST)] | 
|---|
| 104 | !  endif | 
|---|
| 105 | !  error | 
|---|
| 106 | ! endif | 
|---|
| 107 |  | 
|---|
| 108 | !endif | 
|---|
| 109 |  | 
|---|
| 110 |  | 
|---|
| 111 |  | 
|---|
| 112 | # ----------------------------------------------------------------------------- | 
|---|
| 113 | # Provide overridable defaults | 
|---|
| 114 | # ----------------------------------------------------------------------------- | 
|---|
| 115 |  | 
|---|
| 116 | # Default target mode is executable. | 
|---|
| 117 | !ifndef TARGET_MODE | 
|---|
| 118 | ! if "$(_BUILD_PROJECT)" != "Odin32" | 
|---|
| 119 | TARGET_MODE = EXE | 
|---|
| 120 | ! else | 
|---|
| 121 | # Odin32 defaults. | 
|---|
| 122 | !  ifndef CUSTOMBUILD | 
|---|
| 123 | TARGET_MODE = DLL | 
|---|
| 124 | !  else | 
|---|
| 125 | TARGET_MODE = LIB | 
|---|
| 126 | !  endif | 
|---|
| 127 | ! endif | 
|---|
| 128 | !endif | 
|---|
| 129 |  | 
|---|
| 130 | # Default extension corresponds to the target mode. | 
|---|
| 131 | !ifndef TARGET_EXT | 
|---|
| 132 | ! if "$(TARGET_MODE)" == "DLL" | 
|---|
| 133 | TARGET_EXT  = $(EXT_DLL) | 
|---|
| 134 | ! endif | 
|---|
| 135 | ! if "$(TARGET_MODE)" == "SYS" | 
|---|
| 136 | TARGET_EXT  = $(EXT_SYS) | 
|---|
| 137 | ! endif | 
|---|
| 138 | ! if "$(TARGET_MODE)" == "IFS" | 
|---|
| 139 | TARGET_EXT  = $(EXT_IFS) | 
|---|
| 140 | ! endif | 
|---|
| 141 | ! if "$(TARGET_MODE)" == "VDD" | 
|---|
| 142 | TARGET_EXT  = $(EXT_VDD) | 
|---|
| 143 | ! endif | 
|---|
| 144 | ! if "$(TARGET_MODE)" == "EXE" | 
|---|
| 145 | TARGET_EXT  = $(EXT_EXE) | 
|---|
| 146 | ! endif | 
|---|
| 147 | ! if "$(TARGET_MODE)" == "LIB" || "$(TARGET_MODE)" == "SYSLIB" || "$(TARGET_MODE)" == "IFSLIB" | 
|---|
| 148 | TARGET_EXT  = $(EXT_LIB) | 
|---|
| 149 | ! endif | 
|---|
| 150 | ! if "$(TARGET_MODE)" == "EMPTY" | 
|---|
| 151 | TARGET_EXT  = empty | 
|---|
| 152 | ! endif | 
|---|
| 153 | ! if "$(TARGET_MODE)" == "DEPEND" | 
|---|
| 154 | TARGET_EXT  = depend | 
|---|
| 155 | ! endif | 
|---|
| 156 | ! if "$(TARGET_MODE)" == "TESTCASE" | 
|---|
| 157 | TARGET_EXT  = testcase | 
|---|
| 158 | ! endif | 
|---|
| 159 | ! ifndef TARGET_EXT | 
|---|
| 160 | !  ifndef MAKEVER | 
|---|
| 161 | !   if [$(ECHO) $(CLRERR)Internal Error: TARGET_EXT not set. Probably invalid TARGET_MODE. (TARGET_MODE="$(TARGET_MODE)")$(CLRRST)] | 
|---|
| 162 | !   endif | 
|---|
| 163 | !   error | 
|---|
| 164 | !  else | 
|---|
| 165 | !   error $(CLRERR)Internal Error: TARGET_EXT not set. Probably invalid TARGET_MODE. (TARGET_MODE="$(TARGET_MODE)")$(CLRRST) | 
|---|
| 166 | !  endif | 
|---|
| 167 | ! endif | 
|---|
| 168 | !endif | 
|---|
| 169 |  | 
|---|
| 170 | # Default target path. (where all the generated stuff for this target goes) | 
|---|
| 171 | !ifndef PATH_TARGET | 
|---|
| 172 | !if "$(TARGET_SUB)" != "" | 
|---|
| 173 | PATH_TARGET = $(PATH_OBJ)\$(TARGET_SUB)\$(TARGET_NAME).$(TARGET_EXT) | 
|---|
| 174 | !else | 
|---|
| 175 | PATH_TARGET = $(PATH_OBJ)\$(TARGET_NAME).$(TARGET_EXT) | 
|---|
| 176 | !endif | 
|---|
| 177 | !endif | 
|---|
| 178 |  | 
|---|
| 179 | # Default target file. (output) | 
|---|
| 180 | !ifndef TARGET | 
|---|
| 181 | ! if "$(TARGET_MODE)" != "EMPTY" | 
|---|
| 182 | !  if "$(TARGET_MODE)" != "TESTCASE" | 
|---|
| 183 | TARGET      = $(PATH_TARGET)\$(TARGET_NAME).$(TARGET_EXT) | 
|---|
| 184 | !  else | 
|---|
| 185 | TARGET      = testcase | 
|---|
| 186 | !  endif | 
|---|
| 187 | ! endif | 
|---|
| 188 | !endif | 
|---|
| 189 |  | 
|---|
| 190 | # Default target .sym file. (output) | 
|---|
| 191 | !ifndef TARGET_SYM | 
|---|
| 192 | TARGET_SYM  = $(PATH_TARGET)\$(TARGET_NAME).$(EXT_SYM) | 
|---|
| 193 | !endif | 
|---|
| 194 |  | 
|---|
| 195 | # Default object file. (output) | 
|---|
| 196 | !ifndef TARGET_OBJS | 
|---|
| 197 | TARGET_OBJS = $(PATH_TARGET)\$(TARGET_NAME).$(EXT_OBJ) | 
|---|
| 198 | !endif | 
|---|
| 199 |  | 
|---|
| 200 | # Default libraries. (input) | 
|---|
| 201 | !ifndef TARGET_LIBS | 
|---|
| 202 | TARGET_LIBS = $(LIB_C_DLL) $(LIB_OS) $(LIB_C_RTDLL) | 
|---|
| 203 | !endif | 
|---|
| 204 |  | 
|---|
| 205 | # Default definition file. (input) | 
|---|
| 206 | !ifndef TARGET_DEF | 
|---|
| 207 | TARGET_DEF  = $(MAKEDIR)\$(PATH_DEF)\$(TARGET_NAME).def | 
|---|
| 208 | !endif | 
|---|
| 209 |  | 
|---|
| 210 | # Default modified definition filename. (output) | 
|---|
| 211 | !ifndef TARGET_DEF_LINK | 
|---|
| 212 | TARGET_DEF_LINK = $(PATH_TARGET)\$(TARGET_NAME)_link.def | 
|---|
| 213 | !endif | 
|---|
| 214 |  | 
|---|
| 215 | # Default definition file for generating the import library. (input) | 
|---|
| 216 | !ifndef TARGET_IDEF | 
|---|
| 217 | ! if "$(_BUILD_PROJECT)" != "Odin32" | 
|---|
| 218 | TARGET_IDEF = $(TARGET_DEF) | 
|---|
| 219 | ! else | 
|---|
| 220 | !  if defined(TARGET_IDEF_CONV) || "$(TARGET_IDEF_ORG)" != "" | 
|---|
| 221 | TARGET_IDEF = $(PATH_TARGET)\$(TARGET_NAME)_implib.def | 
|---|
| 222 | !   ifndef TARGET_IDEF_ORG | 
|---|
| 223 | TARGET_IDEF_ORG = $(TARGET_DEF) | 
|---|
| 224 | !   endif | 
|---|
| 225 | !  else | 
|---|
| 226 | TARGET_IDEF = $(TARGET_DEF) | 
|---|
| 227 | TARGET_IDEF_ORG = $(TARGET_DEF) | 
|---|
| 228 | !  endif | 
|---|
| 229 | ! endif | 
|---|
| 230 |  | 
|---|
| 231 | !endif | 
|---|
| 232 |  | 
|---|
| 233 | # Default map file. (output) | 
|---|
| 234 | !ifndef TARGET_MAP | 
|---|
| 235 | TARGET_MAP  = $(PATH_TARGET)\$(TARGET_NAME).$(EXT_MAP) | 
|---|
| 236 | !endif | 
|---|
| 237 |  | 
|---|
| 238 | # Default link file. (output) | 
|---|
| 239 | !ifndef TARGET_LNK | 
|---|
| 240 | TARGET_LNK  = $(PATH_TARGET)\$(TARGET_NAME).lnk | 
|---|
| 241 | !endif | 
|---|
| 242 |  | 
|---|
| 243 | # Default import library file. (output) | 
|---|
| 244 | !ifndef TARGET_ILIB | 
|---|
| 245 | ! if "$(TARGET_MODE)" == "DLL" || "$(TARGET_ILIB_YES)" != "" | 
|---|
| 246 | TARGET_ILIB = $(PATH_LIB)\$(TARGET_NAME).$(EXT_ILIB) | 
|---|
| 247 | ! endif | 
|---|
| 248 | !endif | 
|---|
| 249 |  | 
|---|
| 250 | # Default public base directory. (publish) | 
|---|
| 251 | !ifndef TARGET_PUB_BASE | 
|---|
| 252 | ! if "$(TARGET_MODE)" == "LIB" || "$(TARGET_MODE)" == "SYSLIB" || "$(TARGET_MODE)" == "IFSLIB" | 
|---|
| 253 | TARGET_PUB_BASE = $(PATH_LIB) | 
|---|
| 254 | ! else | 
|---|
| 255 | TARGET_PUB_BASE = $(PATH_PUB) | 
|---|
| 256 | !endif | 
|---|
| 257 | !endif | 
|---|
| 258 |  | 
|---|
| 259 | # Default public base directory for unstripped release version. | 
|---|
| 260 | !ifndef TARGET_PUB_BASE_DEB | 
|---|
| 261 | ! if "$(BUILD_MODE)" == "RELEASE" && "$(TARGET_MODE:LIB=...)" == "$(TARGET_MODE)" | 
|---|
| 262 | !  if "$(TARGET_MODE)" == "EXE" || "$(TARGET_MODE)" == "DLL" || "$(TARGET_MODE)" == "SYS" || "$(TARGET_MODE)" == "IFS" || "$(TARGET_MODE)" == "VDD" | 
|---|
| 263 | TARGET_PUB_BASE_DEB = $(PATH_PUB_DEB) | 
|---|
| 264 | !  endif | 
|---|
| 265 | ! endif | 
|---|
| 266 | !endif | 
|---|
| 267 |  | 
|---|
| 268 | # Default sub directory. | 
|---|
| 269 | !ifndef TARGET_PUB_SUB | 
|---|
| 270 | ! if "$(TARGET_SUB)" != "" | 
|---|
| 271 | TARGET_PUB_SUB  = $(TARGET_SUB) | 
|---|
| 272 | ! else | 
|---|
| 273 | !  if "$(TARGET_MODE)" == "EXE" | 
|---|
| 274 | TARGET_PUB_SUB  = $(PATH_SUB_BIN) | 
|---|
| 275 | !  endif | 
|---|
| 276 | !  if "$(TARGET_MODE)" == "DLL" | 
|---|
| 277 | TARGET_PUB_SUB  = $(PATH_SUB_DLL) | 
|---|
| 278 | !  endif | 
|---|
| 279 | !  if "$(TARGET_MODE)" == "LIB" || "$(TARGET_MODE)" == "SYSLIB" || "$(TARGET_MODE)" == "IFSLIB" | 
|---|
| 280 | TARGET_PUB_SUB  = . | 
|---|
| 281 | !  endif | 
|---|
| 282 | !  if "$(TARGET_MODE)" == "SYS" || "$(TARGET_MODE)" == "IFS" | 
|---|
| 283 | TARGET_PUB_SUB  = $(PATH_SUB_SYS) | 
|---|
| 284 | !  endif | 
|---|
| 285 | !  if "$(TARGET_MODE)" == "VDD" | 
|---|
| 286 | TARGET_PUB_SUB  = $(PATH_SUB_VDD) | 
|---|
| 287 | !  endif | 
|---|
| 288 | ! endif | 
|---|
| 289 | !endif | 
|---|
| 290 |  | 
|---|
| 291 | # Default public directory. | 
|---|
| 292 | !ifndef TARGET_PUB_DIR | 
|---|
| 293 | TARGET_PUB_DIR  = $(TARGET_PUB_BASE)\$(TARGET_PUB_SUB) | 
|---|
| 294 | !endif | 
|---|
| 295 |  | 
|---|
| 296 | # Default unstripped public directory. | 
|---|
| 297 | !if !defined(TARGET_PUB_DIR_DEB) && "$(TARGET_PUB_BASE_DEB)" != "" | 
|---|
| 298 | TARGET_PUB_DIR_DEB  = $(TARGET_PUB_BASE_DEB)\$(TARGET_PUB_SUB) | 
|---|
| 299 | !endif | 
|---|
| 300 |  | 
|---|
| 301 | # Default public name. | 
|---|
| 302 | !ifndef TARGET_PUB_NAME | 
|---|
| 303 | TARGET_PUB_NAME = $(TARGET_NAME) | 
|---|
| 304 | !endif | 
|---|
| 305 |  | 
|---|
| 306 | # Default public ext. | 
|---|
| 307 | !ifndef TARGET_PUB_EXT | 
|---|
| 308 | TARGET_PUB_EXT  = $(TARGET_EXT) | 
|---|
| 309 | !endif | 
|---|
| 310 |  | 
|---|
| 311 | # Default public full name. | 
|---|
| 312 | !ifndef TARGET_PUB | 
|---|
| 313 | TARGET_PUB      = $(TARGET_PUB_DIR)\$(TARGET_PUB_NAME).$(TARGET_PUB_EXT) | 
|---|
| 314 | !endif | 
|---|
| 315 |  | 
|---|
| 316 | # Default public full name of unstripped version. | 
|---|
| 317 | !if !defined(TARGET_PUB_DEB) && "$(TARGET_PUB_DIR_DEB)" != "" | 
|---|
| 318 | TARGET_PUB_DEB  = $(TARGET_PUB_DIR_DEB)\$(TARGET_PUB_NAME).$(TARGET_PUB_EXT) | 
|---|
| 319 | !endif | 
|---|
| 320 |  | 
|---|
| 321 | # Default public book dirs | 
|---|
| 322 | !ifndef TARGET_BOOK_PUB_BASE | 
|---|
| 323 | TARGET_BOOK_PUB_BASE = $(PATH_PUB) | 
|---|
| 324 | !endif | 
|---|
| 325 | !ifndef TARGET_BOOK_PUB_SUB | 
|---|
| 326 | TARGET_BOOK_PUB_SUB = $(PATH_SUB_BOOK) | 
|---|
| 327 | !endif | 
|---|
| 328 | !ifndef TARGET_BOOK_PUB_DIR | 
|---|
| 329 | TARGET_BOOK_PUB_DIR = $(TARGET_BOOK_PUB_BASE)\$(TARGET_BOOK_PUB_SUB) | 
|---|
| 330 | !endif | 
|---|
| 331 |  | 
|---|
| 332 | # Default public help dirs | 
|---|
| 333 | !ifndef TARGET_HELP_PUB_BASE | 
|---|
| 334 | TARGET_HELP_PUB_BASE = $(PATH_PUB) | 
|---|
| 335 | !endif | 
|---|
| 336 | !ifndef TARGET_HELP_PUB_SUB | 
|---|
| 337 | TARGET_HELP_PUB_SUB = $(PATH_SUB_HELP) | 
|---|
| 338 | !endif | 
|---|
| 339 | !ifndef TARGET_HELP_PUB_DIR | 
|---|
| 340 | TARGET_HELP_PUB_DIR = $(TARGET_HELP_PUB_BASE)\$(TARGET_HELP_PUB_SUB) | 
|---|
| 341 | !endif | 
|---|
| 342 |  | 
|---|
| 343 | # Default public docs dirs | 
|---|
| 344 | !ifndef TARGET_DOC_PUB_BASE | 
|---|
| 345 | TARGET_DOC_PUB_BASE = $(PATH_PUB) | 
|---|
| 346 | !endif | 
|---|
| 347 | !ifndef TARGET_DOC_PUB_SUB | 
|---|
| 348 | TARGET_DOC_PUB_SUB = $(PATH_SUB_DOC) | 
|---|
| 349 | !endif | 
|---|
| 350 | !ifndef TARGET_DOC_PUB_DIR | 
|---|
| 351 | TARGET_DOC_PUB_DIR = $(TARGET_DOC_PUB_BASE)\$(TARGET_DOC_PUB_SUB) | 
|---|
| 352 | !endif | 
|---|
| 353 |  | 
|---|
| 354 | # Default depend filename. | 
|---|
| 355 | !ifndef TARGET_DEPEND | 
|---|
| 356 | TARGET_DEPEND = $(PATH_TARGET)\.depend | 
|---|
| 357 | !endif | 
|---|
| 358 |  | 
|---|
| 359 | # Default makefile names. | 
|---|
| 360 | !ifndef BUILD_MAKEFILE | 
|---|
| 361 | BUILD_MAKEFILE = Makefile | 
|---|
| 362 | !endif | 
|---|
| 363 |  | 
|---|
| 364 | # Default makefile name. | 
|---|
| 365 | !ifndef MAKEFILE | 
|---|
| 366 | MAKEFILE = $(BUILD_MAKEFILE) | 
|---|
| 367 | !endif | 
|---|
| 368 |  | 
|---|
| 369 | # Ignore linker warnings for some target modes. | 
|---|
| 370 | !ifndef TARGET_IGNORE_LINKER_WARNINGS | 
|---|
| 371 | ! if "$(TARGET_MODE)" == "DLL" | 
|---|
| 372 | TARGET_IGNORE_LINKER_WARNINGS = 1 | 
|---|
| 373 | ! endif | 
|---|
| 374 | !endif | 
|---|
| 375 |  | 
|---|
| 376 |  | 
|---|
| 377 | # Default stacksize | 
|---|
| 378 | # If 16bit:      8KB | 
|---|
| 379 | # Else (32bit): 64KB | 
|---|
| 380 | !ifndef TARGET_STACKSIZE | 
|---|
| 381 | ! ifdef ENV_16BIT | 
|---|
| 382 | TARGET_STACKSIZE=0x2000 | 
|---|
| 383 | ! else | 
|---|
| 384 | TARGET_STACKSIZE=0x10000 | 
|---|
| 385 | ! endif | 
|---|
| 386 | !endif | 
|---|
| 387 |  | 
|---|
| 388 |  | 
|---|
| 389 |  | 
|---|
| 390 | # ----------------------------------------------------------------------------- | 
|---|
| 391 | # Internal helper macros - don't mess! | 
|---|
| 392 | # ----------------------------------------------------------------------------- | 
|---|
| 393 |  | 
|---|
| 394 | # Helper for doing early publish of a target. | 
|---|
| 395 | !if defined(TARGET_NEEDED) || defined(TARGET_PUBLIC) | 
|---|
| 396 | _TARGET_EARLY_PUBLISH = publish_target | 
|---|
| 397 | !else | 
|---|
| 398 | _TARGET_EARLY_PUBLISH = | 
|---|
| 399 | !endif | 
|---|
| 400 |  | 
|---|
| 401 | # The unstripped release name (internal!) | 
|---|
| 402 | _TARGET_DEB = $(TARGET).unstripped | 
|---|
| 403 |  | 
|---|
| 404 |  | 
|---|
| 405 |  | 
|---|
| 406 | # ----------------------------------------------------------------------------- | 
|---|
| 407 | # Tell user what we're building. | 
|---|
| 408 | # ----------------------------------------------------------------------------- | 
|---|
| 409 | !ifndef BUILD_QUIET | 
|---|
| 410 | ! if "$(TARGET)" != "" | 
|---|
| 411 | !  ifndef MAKEVER | 
|---|
| 412 | !   if [$(ECHO) Target is $(CLRFIL)$(TARGET)$(CLRRST)] | 
|---|
| 413 | !   endif | 
|---|
| 414 | !  else | 
|---|
| 415 | $(ECHO) Target is $(CLRFIL)$(TARGET)$(CLRRST) | 
|---|
| 416 | !  endif | 
|---|
| 417 | ! endif | 
|---|
| 418 | !endif | 
|---|
| 419 |  | 
|---|
| 420 |  | 
|---|
| 421 | # ----------------------------------------------------------------------------- | 
|---|
| 422 | # Ensure the platform-specific target path exists | 
|---|
| 423 | # ----------------------------------------------------------------------------- | 
|---|
| 424 |  | 
|---|
| 425 | !if "$(TARGET_MODE)" != "EMPTY" | 
|---|
| 426 | ! if "$(PATH_TARGET)" != "" | 
|---|
| 427 | !  ifndef MAKEVER | 
|---|
| 428 | !   if [$(TOOL_EXISTS) $(PATH_TARGET)] != 0 | 
|---|
| 429 | !    ifndef BUILD_QUIET | 
|---|
| 430 | !     if [$(ECHO) Target path $(CLRFIL)$(PATH_TARGET)$(CLRTXT) does NOT exist. Creating. $(CLRRST)] | 
|---|
| 431 | !     endif | 
|---|
| 432 | !    endif | 
|---|
| 433 | !    if [$(TOOL_CREATEPATH) $(PATH_TARGET)] | 
|---|
| 434 | !     if [$(ECHO) $(CLRERR)Error: Could not create $(CLRFIL)$(PATH_TARGET)$(CLRRST)] | 
|---|
| 435 | !     endif | 
|---|
| 436 | !     error | 
|---|
| 437 | !    endif | 
|---|
| 438 | !   endif | 
|---|
| 439 | !  else | 
|---|
| 440 | !   if %exist($(PATH_TARGET)) == 0 | 
|---|
| 441 | !    ifndef BUILD_QUIET | 
|---|
| 442 | $(ECHO) Target path $(CLRFIL)$(PATH_TARGET)$(CLRTXT) does NOT exist. Creating. $(CLRRST) | 
|---|
| 443 | !    endif | 
|---|
| 444 | !   else | 
|---|
| 445 | !    if [$(TOOL_CREATEPATH) $(PATH_TARGET)] | 
|---|
| 446 | !     error $(CLRERR)Error: Could not create $(CLRFIL)$(PATH_TARGET)$(CLRRST) | 
|---|
| 447 | !    endif | 
|---|
| 448 | !   endif | 
|---|
| 449 | !  endif | 
|---|
| 450 | ! endif | 
|---|
| 451 | !endif | 
|---|
| 452 | # not 100% sure about the != EMPTY stuff, but this is way faster. | 
|---|
| 453 |  | 
|---|
| 454 |  | 
|---|
| 455 | # ----------------------------------------------------------------------------- | 
|---|
| 456 | # Make all targets 'unprecious'. (works only on nmake5) | 
|---|
| 457 | # ----------------------------------------------------------------------------- | 
|---|
| 458 | .PRECIOUS: .force | 
|---|
| 459 |  | 
|---|
| 460 |  | 
|---|
| 461 | # ----------------------------------------------------------------------------- | 
|---|
| 462 | # Common inference rules | 
|---|
| 463 | # ----------------------------------------------------------------------------- | 
|---|
| 464 | .SUFFIXES: | 
|---|
| 465 | .SUFFIXES: .c .cpp .orc .asm .$(EXT_OBJ) .$(EXT_RES) .rc .ii .s .ipp .ipf .$(EXT_INF) .$(EXT_HLP) | 
|---|
| 466 |  | 
|---|
| 467 | # | 
|---|
| 468 | # A workaround for SlickEdits inability to find the buggy files.. | 
|---|
| 469 | # This makes the source filenames in the error listing have full path. | 
|---|
| 470 | # See setup.mak for compile command line. | 
|---|
| 471 | # | 
|---|
| 472 | #_SRC = $< | 
|---|
| 473 | #!ifdef SLKRUNS | 
|---|
| 474 | _SRC = $(PATH_CURRENT)\$(<F) | 
|---|
| 475 | #!endif | 
|---|
| 476 | _DST = $(PATH_TARGET)\$(@F) | 
|---|
| 477 |  | 
|---|
| 478 |  | 
|---|
| 479 | # Assembling assembly source. | 
|---|
| 480 | .asm{$(PATH_TARGET)}.$(EXT_OBJ): | 
|---|
| 481 | @$(ECHO) Assembling $(CLRFIL)$(_SRC) $(CLRTXT)$(TOOL_JOB_SUB_MSG) $(CLRRST) | 
|---|
| 482 | \ | 
|---|
| 483 | ! ifndef BUILD_VERBOSE | 
|---|
| 484 | @ \ | 
|---|
| 485 | ! endif | 
|---|
| 486 | !if "$(TARGET_MODE)" == "SYS" || "$(TARGET_MODE)" == "SYSLIB" || "$(TARGET_MODE)" == "IFS" || "$(TARGET_MODE)" == "IFSLIB" | 
|---|
| 487 | ! ifdef AS_CMD_SYS | 
|---|
| 488 | $(TOOL_JOB_SUB) $(AS_CMD_SYS) | 
|---|
| 489 | ! else | 
|---|
| 490 | $(TOOL_JOB_SUB) $(AS) $(AS_FLAGS_SYS) $(_SRC) $(AS_OBJ_OUT)$(_DST) | 
|---|
| 491 | ! endif | 
|---|
| 492 | !else | 
|---|
| 493 | ! ifdef AS_CMD | 
|---|
| 494 | $(TOOL_JOB_SUB) $(AS_CMD) | 
|---|
| 495 | ! else | 
|---|
| 496 | $(TOOL_JOB_SUB) $(AS) $(AS_FLAGS) $(_SRC) $(AS_OBJ_OUT)$(_DST) | 
|---|
| 497 | ! endif | 
|---|
| 498 | !endif | 
|---|
| 499 |  | 
|---|
| 500 | .asm.$(EXT_OBJ): | 
|---|
| 501 | @$(ECHO) Assembling $(CLRFIL)$(_SRC) $(CLRRST) | 
|---|
| 502 | \ | 
|---|
| 503 | !ifndef BUILD_VERBOSE | 
|---|
| 504 | @ \ | 
|---|
| 505 | !endif | 
|---|
| 506 | !if "$(TARGET_MODE)" == "SYS" || "$(TARGET_MODE)" == "SYSLIB" || "$(TARGET_MODE)" == "IFS" || "$(TARGET_MODE)" == "IFSLIB" | 
|---|
| 507 | ! ifdef AS_CMD_SYS | 
|---|
| 508 | $(AS_CMD_SYS) | 
|---|
| 509 | ! else | 
|---|
| 510 | $(AS) $(AS_FLAGS_SYS) $(_SRC) $(AS_OBJ_OUT)$(_DST) | 
|---|
| 511 | ! endif | 
|---|
| 512 | !else | 
|---|
| 513 | ! ifdef AS_CMD | 
|---|
| 514 | $(AS_CMD) | 
|---|
| 515 | ! else | 
|---|
| 516 | $(AS) $(AS_FLAGS) $(_SRC) $(AS_OBJ_OUT)$(_DST) | 
|---|
| 517 | ! endif | 
|---|
| 518 | !endif | 
|---|
| 519 |  | 
|---|
| 520 | # C++ Compiler base line | 
|---|
| 521 | _CXX_BASELINE = $(CXX) \ | 
|---|
| 522 | !if "$(TARGET_MODE)" == "EXE" || "$(TARGET_MODE)" == "LIB" | 
|---|
| 523 | $(CXX_FLAGS_EXE) \ | 
|---|
| 524 | !endif | 
|---|
| 525 | !if "$(TARGET_MODE)" == "DLL" | 
|---|
| 526 | $(CXX_FLAGS_DLL) \ | 
|---|
| 527 | !endif | 
|---|
| 528 | !if "$(TARGET_MODE)" == "SYS" || "$(TARGET_MODE)" == "SYSLIB" | 
|---|
| 529 | $(CXX_FLAGS_SYS) \ | 
|---|
| 530 | !endif | 
|---|
| 531 | !if "$(TARGET_MODE)" == "IFS" || "$(TARGET_MODE)" == "IFSLIB" | 
|---|
| 532 | $(CXX_FLAGS_IFS) \ | 
|---|
| 533 | !endif | 
|---|
| 534 |  | 
|---|
| 535 | # Compiling C++ source. | 
|---|
| 536 | .cpp{$(PATH_TARGET)}.$(EXT_OBJ): | 
|---|
| 537 | @$(ECHO) C++ Compiler $(CLRFIL)$(_SRC) $(CLRTXT)$(TOOL_JOB_SUB_MSG) $(CLRRST) | 
|---|
| 538 | \ | 
|---|
| 539 | !ifndef BUILD_VERBOSE | 
|---|
| 540 | @ \ | 
|---|
| 541 | !endif | 
|---|
| 542 | $(TOOL_JOB_SUB) $(_CXX_BASELINE) \ | 
|---|
| 543 | !if "$(CXX_LST_OUT)" != "" | 
|---|
| 544 | $(CXX_LST_OUT)$(PATH_TARGET)\$(@B).s \ | 
|---|
| 545 | !endif | 
|---|
| 546 | $(CXX_OBJ_OUT)$(_DST) $(_SRC) | 
|---|
| 547 |  | 
|---|
| 548 | .cpp.$(EXT_OBJ): | 
|---|
| 549 | @$(ECHO) C++ Compiler $(CLRFIL)$(_SRC) $(CLRRST) | 
|---|
| 550 | \ | 
|---|
| 551 | !ifndef BUILD_VERBOSE | 
|---|
| 552 | @ \ | 
|---|
| 553 | !endif | 
|---|
| 554 | $(_CXX_BASELINE) \ | 
|---|
| 555 | !if "$(CXX_LST_OUT)" != "" | 
|---|
| 556 | $(CXX_LST_OUT)$(PATH_TARGET)\$(@B).s \ | 
|---|
| 557 | !endif | 
|---|
| 558 | $(CXX_OBJ_OUT)$(_DST) $(_SRC) | 
|---|
| 559 |  | 
|---|
| 560 |  | 
|---|
| 561 | # Pre-Compiling C++ source. | 
|---|
| 562 | .cpp.ii: | 
|---|
| 563 | @$(ECHO) C++ Compiler $(CLRFIL)$(_SRC) $(CLRRST) | 
|---|
| 564 | \ | 
|---|
| 565 | !ifndef BUILD_VERBOSE | 
|---|
| 566 | @ \ | 
|---|
| 567 | !endif | 
|---|
| 568 | $(_CXX_BASELINE) \ | 
|---|
| 569 | $(CXX_PC_2_STDOUT) $(_SRC) > $@ | 
|---|
| 570 |  | 
|---|
| 571 |  | 
|---|
| 572 | # Compiler C++ source to assembly. | 
|---|
| 573 | !if "$(CXX_AS_2_FILE)" != "" | 
|---|
| 574 | .cpp.s: | 
|---|
| 575 | @$(ECHO) C++ To Assembly $(CLRFIL)$(_SRC) $(CLRRST) | 
|---|
| 576 | \ | 
|---|
| 577 | !ifndef BUILD_VERBOSE | 
|---|
| 578 | @ \ | 
|---|
| 579 | !endif | 
|---|
| 580 | $(_CXX_BASELINE) \ | 
|---|
| 581 | $(CXX_AS_2_FILE)$@ $(_SRC) | 
|---|
| 582 | !endif | 
|---|
| 583 |  | 
|---|
| 584 |  | 
|---|
| 585 |  | 
|---|
| 586 | # C Compiler base line | 
|---|
| 587 | _CC_BASELINE = $(CC) \ | 
|---|
| 588 | !if "$(TARGET_MODE)" == "EXE" || "$(TARGET_MODE)" == "LIB" | 
|---|
| 589 | $(CC_FLAGS_EXE) \ | 
|---|
| 590 | !endif | 
|---|
| 591 | !if "$(TARGET_MODE)" == "DLL" | 
|---|
| 592 | $(CC_FLAGS_DLL) \ | 
|---|
| 593 | !endif | 
|---|
| 594 | !if "$(TARGET_MODE)" == "SYS" || "$(TARGET_MODE)" == "SYSLIB" | 
|---|
| 595 | $(CC_FLAGS_SYS) \ | 
|---|
| 596 | !endif | 
|---|
| 597 | !if "$(TARGET_MODE)" == "IFS" || "$(TARGET_MODE)" == "IFSLIB" | 
|---|
| 598 | $(CC_FLAGS_IFS) \ | 
|---|
| 599 | !endif | 
|---|
| 600 |  | 
|---|
| 601 | # Compiling C source. | 
|---|
| 602 | .c{$(PATH_TARGET)}.$(EXT_OBJ): | 
|---|
| 603 | @$(ECHO) C Compiler $(CLRFIL)$(_SRC) $(CLRTXT)$(TOOL_JOB_SUB_MSG) $(CLRRST) | 
|---|
| 604 | \ | 
|---|
| 605 | !ifndef BUILD_VERBOSE | 
|---|
| 606 | @ \ | 
|---|
| 607 | !endif | 
|---|
| 608 | $(TOOL_JOB_SUB) $(_CC_BASELINE) \ | 
|---|
| 609 | !if "$(CC_LST_OUT)" != "" | 
|---|
| 610 | $(CC_LST_OUT)$(PATH_TARGET)\$(@B).s \ | 
|---|
| 611 | !endif | 
|---|
| 612 | $(CC_OBJ_OUT)$(_DST) $(_SRC) | 
|---|
| 613 |  | 
|---|
| 614 | .c.$(EXT_OBJ): | 
|---|
| 615 | @$(ECHO) C Compiler $(CLRFIL)$(_SRC) $(CLRRST) | 
|---|
| 616 | \ | 
|---|
| 617 | !ifndef BUILD_VERBOSE | 
|---|
| 618 | @ \ | 
|---|
| 619 | !endif | 
|---|
| 620 | $(_CC_BASELINE) \ | 
|---|
| 621 | !if "$(CC_LST_OUT)" != "" | 
|---|
| 622 | $(CC_LST_OUT)$(PATH_TARGET)\$(@B).s \ | 
|---|
| 623 | !endif | 
|---|
| 624 | $(CC_OBJ_OUT)$(_DST) $(_SRC) | 
|---|
| 625 |  | 
|---|
| 626 |  | 
|---|
| 627 | # Pre-Compiling C source. | 
|---|
| 628 | .c.ii: | 
|---|
| 629 | @$(ECHO) C PreCompiler $(CLRFIL)$(_SRC) $(CLRRST) | 
|---|
| 630 | \ | 
|---|
| 631 | !ifndef BUILD_VERBOSE | 
|---|
| 632 | @ \ | 
|---|
| 633 | !endif | 
|---|
| 634 | $(_CC_BASELINE) \ | 
|---|
| 635 | $(CC_PC_2_STDOUT) $(_SRC) > $@ | 
|---|
| 636 |  | 
|---|
| 637 |  | 
|---|
| 638 | # Compiler C source to assembly. | 
|---|
| 639 | !if "$(CC_AS_2_FILE)" != "" | 
|---|
| 640 | .c.s: | 
|---|
| 641 | @$(ECHO) C To Assembly $(CLRFIL)$(_SRC) $(CLRRST) | 
|---|
| 642 | \ | 
|---|
| 643 | !ifndef BUILD_VERBOSE | 
|---|
| 644 | @ \ | 
|---|
| 645 | !endif | 
|---|
| 646 | $(_CC_BASELINE) \ | 
|---|
| 647 | $(CC_AS_2_FILE)$@ $(_SRC) | 
|---|
| 648 | !endif | 
|---|
| 649 |  | 
|---|
| 650 |  | 
|---|
| 651 | # Compiling resources. | 
|---|
| 652 | .rc{$(PATH_TARGET)}.res: | 
|---|
| 653 | @$(ECHO) RC Compiler $(CLRFIL)$(_SRC) $(CLRTXT)$(TOOL_JOB_SUB_MSG)$(CLRRST) | 
|---|
| 654 | \ | 
|---|
| 655 | !ifndef BUILD_VERBOSE | 
|---|
| 656 | @ \ | 
|---|
| 657 | !endif | 
|---|
| 658 | $(TOOL_JOB_SUB) $(RC) $(RC_FLAGS) $(_SRC) $(_DST) | 
|---|
| 659 |  | 
|---|
| 660 | .rc.res: | 
|---|
| 661 | @$(ECHO) RC Compiler $(CLRFIL)$(_SRC) $(CLRRST) | 
|---|
| 662 | \ | 
|---|
| 663 | !ifndef BUILD_VERBOSE | 
|---|
| 664 | @ \ | 
|---|
| 665 | !endif | 
|---|
| 666 | $(RC) $(RC_FLAGS) $(_SRC) $(_DST) | 
|---|
| 667 |  | 
|---|
| 668 |  | 
|---|
| 669 | # Compiling Odin32 resources. | 
|---|
| 670 | .orc{$(PATH_TARGET)}.obj: | 
|---|
| 671 | @$(ECHO) ORC Compiler $(CLRFIL)$(_SRC) $(CLRTXT)$(TOOL_JOB_SUB_MSG)$(CLRRST) | 
|---|
| 672 | \ | 
|---|
| 673 | !ifndef BUILD_VERBOSE | 
|---|
| 674 | @ \ | 
|---|
| 675 | !endif | 
|---|
| 676 | $(ORC) $(ORC_FLAGS) $(ORC_ASM_OUT)$(PATH_TARGET)\$(@B).asm $(_SRC) | 
|---|
| 677 | \ | 
|---|
| 678 | !ifndef BUILD_VERBOSE | 
|---|
| 679 | @ \ | 
|---|
| 680 | !endif | 
|---|
| 681 | $(AS) $(AS_FLAGS) $(PATH_TARGET)\$(@B).asm $(AS_OBJ_OUT)$(_DST) | 
|---|
| 682 |  | 
|---|
| 683 | .orc.obj: | 
|---|
| 684 | @$(ECHO) ORC Compiler $(CLRFIL)$(_SRC) $(CLRRST) | 
|---|
| 685 | \ | 
|---|
| 686 | !ifndef BUILD_VERBOSE | 
|---|
| 687 | @ \ | 
|---|
| 688 | !endif | 
|---|
| 689 | $(ORC) $(ORC_FLAGS) $(ORC_ASM_OUT)$(PATH_TARGET)\$(@B).asm $(_SRC) | 
|---|
| 690 | \ | 
|---|
| 691 | !ifndef BUILD_VERBOSE | 
|---|
| 692 | @ \ | 
|---|
| 693 | !endif | 
|---|
| 694 | $(AS) $(AS_FLAGS) $(PATH_TARGET)\$(@B).asm $(AS_OBJ_OUT)$(_DST) | 
|---|
| 695 |  | 
|---|
| 696 |  | 
|---|
| 697 | # Compiling INFs. | 
|---|
| 698 | .ipf{$(PATH_TARGET)}.$(EXT_INF): | 
|---|
| 699 | @$(ECHO) BOOK Compiler $(CLRFIL)$(_SRC)$(CLRRST) | 
|---|
| 700 | \ | 
|---|
| 701 | !ifndef BUILD_VERBOSE | 
|---|
| 702 | @ \ | 
|---|
| 703 | !endif | 
|---|
| 704 | $(INFC_CMD) | 
|---|
| 705 |  | 
|---|
| 706 | .ipf.inf: | 
|---|
| 707 | @$(ECHO) BOOK Compiler $(CLRFIL)$(_SRC)$(CLRRST) | 
|---|
| 708 | \ | 
|---|
| 709 | !ifndef BUILD_VERBOSE | 
|---|
| 710 | @ \ | 
|---|
| 711 | !endif | 
|---|
| 712 | $(INFC_CMD) | 
|---|
| 713 |  | 
|---|
| 714 |  | 
|---|
| 715 | # Compiling INFs with pre-compiling | 
|---|
| 716 | .ipp{$(PATH_TARGET)}.$(EXT_INF): | 
|---|
| 717 | @$(ECHO) CC Pre + BOOK Compiler $(CLRFIL)$(_SRC)$(CLRRST) | 
|---|
| 718 | !ifndef CC_PC_2_STRIPPED_STDOUT | 
|---|
| 719 | $(TOOL_ECHO) $(CLRERR)fatal error: CC_PC_2_STRIPPED_STDOUT isn't supported on this compiler. $(CLRRST) && false | 
|---|
| 720 | !endif | 
|---|
| 721 | \ | 
|---|
| 722 | !ifndef BUILD_VERBOSE | 
|---|
| 723 | @ \ | 
|---|
| 724 | !endif | 
|---|
| 725 | $(INFC_CMD_PRE) | 
|---|
| 726 |  | 
|---|
| 727 | .ipp.inf: | 
|---|
| 728 | @$(ECHO) CC Pre + BOOK Compiler $(CLRFIL)$(_SRC)$(CLRRST) | 
|---|
| 729 | !ifndef CC_PC_2_STRIPPED_STDOUT | 
|---|
| 730 | $(TOOL_ECHO) $(CLRERR)fatal error: CC_PC_2_STRIPPED_STDOUT isn't supported on this compiler. $(CLRRST) && false | 
|---|
| 731 | !endif | 
|---|
| 732 | \ | 
|---|
| 733 | !ifndef BUILD_VERBOSE | 
|---|
| 734 | @ \ | 
|---|
| 735 | !endif | 
|---|
| 736 | $(INFC_CMD_PRE) | 
|---|
| 737 |  | 
|---|
| 738 |  | 
|---|
| 739 | # Compiling HLPs | 
|---|
| 740 | .ipf{$(PATH_TARGET)}.$(EXT_HLP): | 
|---|
| 741 | @$(ECHO) HELP Compiler $(CLRFIL)$(_SRC)$(CLRRST) | 
|---|
| 742 | \ | 
|---|
| 743 | !ifndef BUILD_VERBOSE | 
|---|
| 744 | @ \ | 
|---|
| 745 | !endif | 
|---|
| 746 | $(HLPC_CMD) | 
|---|
| 747 |  | 
|---|
| 748 | .ipf.hlp: | 
|---|
| 749 | @$(ECHO) HELP Compiler $(CLRFIL)$(_SRC)$(CLRRST) | 
|---|
| 750 | \ | 
|---|
| 751 | !ifndef BUILD_VERBOSE | 
|---|
| 752 | @ \ | 
|---|
| 753 | !endif | 
|---|
| 754 | $(HLPC_CMD) | 
|---|
| 755 |  | 
|---|
| 756 |  | 
|---|
| 757 | # Compiling HLPs with pre-compiling | 
|---|
| 758 | .ipp{$(PATH_TARGET)}.$(EXT_HLP): | 
|---|
| 759 | @$(ECHO) CC Pre + HELP Compiler $(CLRFIL)$(_SRC)$(CLRRST) | 
|---|
| 760 | !ifndef CC_PC_2_STRIPPED_STDOUT | 
|---|
| 761 | $(TOOL_ECHO) $(CLRERR)fatal error: CC_PC_2_STRIPPED_STDOUT isn't supported on this compiler. $(CLRRST) && false | 
|---|
| 762 | !endif | 
|---|
| 763 | \ | 
|---|
| 764 | !ifndef BUILD_VERBOSE | 
|---|
| 765 | @ \ | 
|---|
| 766 | !endif | 
|---|
| 767 | $(HLPC_CMD_PRE) | 
|---|
| 768 |  | 
|---|
| 769 | .ipp.hlp: | 
|---|
| 770 | @$(ECHO) CC Pre + HELP Compiler $(CLRFIL)$(_SRC)$(CLRRST) | 
|---|
| 771 | !ifndef CC_PC_2_STRIPPED_STDOUT | 
|---|
| 772 | $(TOOL_ECHO) $(CLRERR)fatal error: CC_PC_2_STRIPPED_STDOUT isn't supported on this compiler. $(CLRRST) && false | 
|---|
| 773 | !endif | 
|---|
| 774 | \ | 
|---|
| 775 | !ifndef BUILD_VERBOSE | 
|---|
| 776 | @ \ | 
|---|
| 777 | !endif | 
|---|
| 778 | $(HLPC_CMD_PRE) | 
|---|
| 779 |  | 
|---|
| 780 |  | 
|---|
| 781 |  | 
|---|
| 782 | # ----------------------------------------------------------------------------- | 
|---|
| 783 | # The all rule - The default one, as it's the first rule in the file. | 
|---|
| 784 | # ----------------------------------------------------------------------------- | 
|---|
| 785 | all: build | 
|---|
| 786 |  | 
|---|
| 787 |  | 
|---|
| 788 |  | 
|---|
| 789 | # ----------------------------------------------------------------------------- | 
|---|
| 790 | # The build rule - This runs all passes: | 
|---|
| 791 | #   1. Make Dependencies | 
|---|
| 792 | #   2. Make Needed Tools (stuff required in the next steps) | 
|---|
| 793 | #   3. Make Libraries (all kinds) | 
|---|
| 794 | #   4. Make Binaries (ie. executable files) | 
|---|
| 795 | #   5. Make Miscellaneous Targets | 
|---|
| 796 | #   6. Make Install | 
|---|
| 797 | # Note: In order to load dependencies we'll do a forwarding after making them. | 
|---|
| 798 | # ----------------------------------------------------------------------------- | 
|---|
| 799 | build: _build | 
|---|
| 800 | !if "$(MAKEFLAGS:I=_)" == "$(MAKEFLAGS)" # this is of course broken in nmake v5.0 for OS/2. | 
|---|
| 801 | @$(ECHO)$(CLRMAK)[Successfully Built Everything!] $(CLRRST) | 
|---|
| 802 | !else | 
|---|
| 803 | @$(ECHO)$(CLRMAK)[Built Everything! (Ignore option specified)] $(CLRRST) | 
|---|
| 804 | !endif | 
|---|
| 805 |  | 
|---|
| 806 | # internal rule shared by rebuild and build. | 
|---|
| 807 | _build:  _build_banner_dep dep | 
|---|
| 808 | !ifndef BUILD_QUIET | 
|---|
| 809 | @$(ECHO) Restarting $(CLRFIL)$(MAKEFILE)$(CLRTXT) with new dependencies. $(CLRRST) | 
|---|
| 810 | !endif | 
|---|
| 811 | \ | 
|---|
| 812 | !ifndef BUILD_VERBOSE | 
|---|
| 813 | @ \ | 
|---|
| 814 | !endif | 
|---|
| 815 | $(TOOL_MAKE) -f $(MAKEFILE) _build_new_dependencies_ | 
|---|
| 816 |  | 
|---|
| 817 | # internal rule used to reload dependencies. | 
|---|
| 818 | _build_new_dependencies_: \ | 
|---|
| 819 | _build_banner_needed        needed \ | 
|---|
| 820 | _build_banner_lib           lib \ | 
|---|
| 821 | _build_banner_binary        binary \ | 
|---|
| 822 | _build_banner_misc          misc \ | 
|---|
| 823 | _build_banner_publish       publish | 
|---|
| 824 |  | 
|---|
| 825 |  | 
|---|
| 826 | # Banners for rebuild and build. | 
|---|
| 827 | _build_banner_clean: | 
|---|
| 828 | @$(ECHO)$(CLRMAK)[Start Pass 0 - Make Clean] $(CLRRST) | 
|---|
| 829 | @SET _BUILD_PASS=0 | 
|---|
| 830 | _build_banner_dep: | 
|---|
| 831 | @$(ECHO)$(CLRMAK)[Start Pass 1 - Make Dependencies] $(CLRRST) | 
|---|
| 832 | @SET _BUILD_PASS=1 | 
|---|
| 833 | _build_banner_needed: | 
|---|
| 834 | @$(ECHO)$(CLRMAK)[Start Pass 2 - Make Needed Tools] $(CLRRST) | 
|---|
| 835 | @SET _BUILD_PASS=2 | 
|---|
| 836 | _build_banner_lib: | 
|---|
| 837 | @$(ECHO)$(CLRMAK)[Start Pass 3 - Make Libraries] $(CLRRST) | 
|---|
| 838 | @SET _BUILD_PASS=3 | 
|---|
| 839 | _build_banner_binary: | 
|---|
| 840 | @$(ECHO)$(CLRMAK)[Start Pass 4 - Make Binaries] $(CLRRST) | 
|---|
| 841 | @SET _BUILD_PASS=4 | 
|---|
| 842 | _build_banner_misc: | 
|---|
| 843 | @$(ECHO)$(CLRMAK)[Start Pass 5 - Make Miscellaneous Targets] $(CLRRST) | 
|---|
| 844 | @SET _BUILD_PASS=5 | 
|---|
| 845 | _build_banner_publish: | 
|---|
| 846 | @$(ECHO)$(CLRMAK)[Start Pass 6 - Make Public (i.e. Publish)] $(CLRRST) | 
|---|
| 847 | @SET _BUILD_PASS=6 | 
|---|
| 848 |  | 
|---|
| 849 |  | 
|---|
| 850 |  | 
|---|
| 851 | # ----------------------------------------------------------------------------- | 
|---|
| 852 | # The rebuild rule - Same as build but does a clean first (as Pass 0). | 
|---|
| 853 | # ----------------------------------------------------------------------------- | 
|---|
| 854 | rebuild: \ | 
|---|
| 855 | _build_banner_clean clean \ | 
|---|
| 856 | _build | 
|---|
| 857 | !if "$(MAKEFLAGS:i=_)" == "$(MAKEFLAGS)" | 
|---|
| 858 | @$(ECHO)$(CLRMAK)[Successfully Rebuilt Everything!] $(CLRRST) | 
|---|
| 859 | !else | 
|---|
| 860 | @$(ECHO)$(CLRMAK)[Rebuilt Everything! (Ignore option specified)] $(CLRRST) | 
|---|
| 861 | !endif | 
|---|
| 862 |  | 
|---|
| 863 |  | 
|---|
| 864 |  | 
|---|
| 865 | # ----------------------------------------------------------------------------- | 
|---|
| 866 | # A number of shortcuts for lazy programmers. | 
|---|
| 867 | # ----------------------------------------------------------------------------- | 
|---|
| 868 | pass1:  build | 
|---|
| 869 |  | 
|---|
| 870 | pass2:  _build_new_dependencies_ | 
|---|
| 871 |  | 
|---|
| 872 | pass3:  _build_banner_lib           lib \ | 
|---|
| 873 | _build_banner_binary        binary \ | 
|---|
| 874 | _build_banner_misc          misc \ | 
|---|
| 875 | _build_banner_publish       publish | 
|---|
| 876 |  | 
|---|
| 877 | pass4:  _build_banner_binary        binary \ | 
|---|
| 878 | _build_banner_misc          misc \ | 
|---|
| 879 | _build_banner_publish       publish | 
|---|
| 880 |  | 
|---|
| 881 | pass5:  _build_banner_misc          misc \ | 
|---|
| 882 | _build_banner_publish       publish | 
|---|
| 883 |  | 
|---|
| 884 | pass6:  _build_banner_publish       publish | 
|---|
| 885 |  | 
|---|
| 886 | quick:  _build_banner_lib           lib \ | 
|---|
| 887 | _build_banner_binary        binary \ | 
|---|
| 888 | _build_banner_publish       publish | 
|---|
| 889 |  | 
|---|
| 890 |  | 
|---|
| 891 |  | 
|---|
| 892 | # ----------------------------------------------------------------------------- | 
|---|
| 893 | # Pass 0 - The clean rule - Clean up output files. | 
|---|
| 894 | #   The current setup doesn't clean the published ones. | 
|---|
| 895 | # ----------------------------------------------------------------------------- | 
|---|
| 896 | !if "$(TARGET_MODE)" != "TESTCASE" | 
|---|
| 897 | clean: | 
|---|
| 898 | @$(ECHO) Cleaning... $(CLRRST) | 
|---|
| 899 | \ | 
|---|
| 900 | ! ifndef BUILD_VERBOSE | 
|---|
| 901 | @ \ | 
|---|
| 902 | ! endif | 
|---|
| 903 | $(TOOL_RM) @<< | 
|---|
| 904 | "$(PATH_TARGET)\*.$(EXT_OBJ)" | 
|---|
| 905 | "$(PATH_TARGET)\*.$(EXT_ILIB)" | 
|---|
| 906 | "$(PATH_TARGET)\*.$(EXT_EXE)" | 
|---|
| 907 | "$(PATH_TARGET)\*.$(EXT_DLL)" | 
|---|
| 908 | "$(PATH_TARGET)\*.$(EXT_RES)" | 
|---|
| 909 | "$(PATH_TARGET)\*.$(EXT_SYS)" | 
|---|
| 910 | "$(PATH_TARGET)\*.$(EXT_LIB)" | 
|---|
| 911 | "$(PATH_TARGET)\*.$(EXT_IFS)" | 
|---|
| 912 | "$(PATH_TARGET)\*.$(EXT_MAP)" | 
|---|
| 913 | "$(PATH_TARGET)\*.$(EXT_SYM)" | 
|---|
| 914 | "$(PATH_TARGET)\*.$(EXT_DEF)" | 
|---|
| 915 | "$(PATH_TARGET)\*.s" | 
|---|
| 916 | "$(PATH_TARGET)\*.lst" | 
|---|
| 917 | "$(PATH_TARGET)\*.lnk" | 
|---|
| 918 | "$(PATH_TARGET)\*.ii" | 
|---|
| 919 | "$(PATH_TARGET)\.depend" | 
|---|
| 920 | "$(TARGET_DEPEND)" | 
|---|
| 921 | .\*.ii | 
|---|
| 922 | .\*.err | 
|---|
| 923 | .\.depend | 
|---|
| 924 | << | 
|---|
| 925 | !ifdef SUBDIRS_CLEAN | 
|---|
| 926 | @$(TOOL_DODIRS) "$(SUBDIRS_CLEAN)" $(TOOL_MAKE) -f $(BUILD_MAKEFILE) NODEP=1 $@ | 
|---|
| 927 | !else | 
|---|
| 928 | ! if "$(SUBDIRS)$(SUBDIRS_NEEDED)$(SUBDIRS_LIB)$(SUBDIRS_BINARY)$(SUBDIRS_MISC)" != "" | 
|---|
| 929 | @$(TOOL_DODIRS) "$(SUBDIRS) $(SUBDIRS_NEEDED) $(SUBDIRS_LIB) $(SUBDIRS_BINARY) $(SUBDIRS_MISC)" $(TOOL_MAKE) -f $(BUILD_MAKEFILE) NODEP=1 $@ | 
|---|
| 930 | ! endif | 
|---|
| 931 | !endif | 
|---|
| 932 | !ifdef PREMAKEFILES_CLEAN | 
|---|
| 933 | @$(TOOL_DOMAKES) "$(PREMAKEFILES_CLEAN)" $(TOOL_MAKE) NODEP=1 $@ | 
|---|
| 934 | !else | 
|---|
| 935 | ! if "$(PREMAKEFILES)$(PREMAKEFILES_NEEDED)$(PREMAKEFILES_LIB)$(PREMAKEFILES_BINARY)$(PREMAKEFILES_MISC)" != "" | 
|---|
| 936 | @$(TOOL_DOMAKES) "$(PREMAKEFILES) $(PREMAKEFILES_NEEDED) $(PREMAKEFILES_LIB) $(PREMAKEFILES_BINARY) $(PREMAKEFILES_MISC)" $(TOOL_MAKE) NODEP=1 $@ | 
|---|
| 937 | ! endif | 
|---|
| 938 | !endif | 
|---|
| 939 | !ifdef POSTMAKEFILES_CLEAN | 
|---|
| 940 | @$(TOOL_DOMAKES) "$(POSTMAKEFILES_CLEAN)" $(TOOL_MAKE) NODEP=1 $@ | 
|---|
| 941 | !else | 
|---|
| 942 | ! if "$(POSTMAKEFILES)$(POSTMAKEFILES_NEEDED)$(POSTMAKEFILES_LIB)$(POSTMAKEFILES_BINARY)$(POSTMAKEFILES_MISC)" != "" | 
|---|
| 943 | @$(TOOL_DOMAKES) "$(POSTMAKEFILES) $(POSTMAKEFILES_NEEDED) $(POSTMAKEFILES_LIB) $(POSTMAKEFILES_BINARY) $(POSTMAKEFILES_MISC)" $(TOOL_MAKE) NODEP=1 $@ | 
|---|
| 944 | ! endif | 
|---|
| 945 | !endif | 
|---|
| 946 |  | 
|---|
| 947 | !endif #!TESTCASE | 
|---|
| 948 |  | 
|---|
| 949 |  | 
|---|
| 950 |  | 
|---|
| 951 | # ----------------------------------------------------------------------------- | 
|---|
| 952 | # Pass 1 - The dep rule - Make dependencies. | 
|---|
| 953 | # ----------------------------------------------------------------------------- | 
|---|
| 954 | dep: | 
|---|
| 955 | !if "$(TARGET_MODE)" != "EMPTY" && "$(TARGET_MODE)" != "TESTCASE" | 
|---|
| 956 | @$(ECHO) Making dependencies... $(CLRRST) | 
|---|
| 957 | \ | 
|---|
| 958 | ! ifndef BUILD_VERBOSE | 
|---|
| 959 | @ \ | 
|---|
| 960 | ! endif | 
|---|
| 961 | $(TOOL_DEP) \ | 
|---|
| 962 | ! ifdef TARGET_NO_DEP | 
|---|
| 963 | -x$(TARGET_NO_DEP: =;)\ | 
|---|
| 964 | ! endif | 
|---|
| 965 | @<< | 
|---|
| 966 | $(TOOL_DEP_FLAGS) | 
|---|
| 967 | -o$$(PATH_TARGET) | 
|---|
| 968 | -d$(TARGET_DEPEND) | 
|---|
| 969 | -srcadd AS:$$(MAKE_INCLUDE_AS_SETUP) | 
|---|
| 970 | -srcadd AS:$$(MAKE_INCLUDE_AS_OPT) | 
|---|
| 971 | -srcadd RC:$$(MAKE_INCLUDE_RC_SETUP) | 
|---|
| 972 | -srcadd ORC:$$(MAKE_INCLUDE_ORC_SETUP) | 
|---|
| 973 | -srcadd CX:$$(MAKE_INCLUDE_SETUP) | 
|---|
| 974 | -srcadd CX:$$(MAKE_INCLUDE_CX_OPT) | 
|---|
| 975 | -srcadd IPF:$$(MAKE_INCLUDE_IPFC) | 
|---|
| 976 | -srcadd IPP:$$(MAKE_INCLUDE_IPFC) | 
|---|
| 977 | -srcadd IPP:$$(MAKE_INCLUDE_SETUP) | 
|---|
| 978 | -srcadd IPP:$$(MAKE_INCLUDE_CX_OPT) | 
|---|
| 979 | $(TOOL_DEP_FILES) | 
|---|
| 980 | << | 
|---|
| 981 | !ifdef BUILD_VERBOSE2 | 
|---|
| 982 | $(ECHO) Dependcy file: $(CLRRST) | 
|---|
| 983 | @type $(TARGET_DEPEND) | 
|---|
| 984 | !endif | 
|---|
| 985 | !endif | 
|---|
| 986 | !ifdef SUBDIRS_DEP | 
|---|
| 987 | @$(TOOL_DODIRS) "$(SUBDIRS_DEP)" $(TOOL_MAKE) -f $(BUILD_MAKEFILE) NODEP=1 $@ | 
|---|
| 988 | !else | 
|---|
| 989 | ! if "$(SUBDIRS)$(SUBDIRS_NEEDED)$(SUBDIRS_LIB)$(SUBDIRS_BINARY)$(SUBDIRS_MISC)" != "" | 
|---|
| 990 | @$(TOOL_DODIRS) "$(SUBDIRS) $(SUBDIRS_NEEDED) $(SUBDIRS_LIB) $(SUBDIRS_BINARY) $(SUBDIRS_MISC)" $(TOOL_MAKE) -f $(BUILD_MAKEFILE) NODEP=1 $@ | 
|---|
| 991 | ! endif | 
|---|
| 992 | !endif | 
|---|
| 993 | !ifdef PREMAKEFILES_DEP | 
|---|
| 994 | @$(TOOL_DOMAKES) "$(PREMAKEFILES_DEP)" $(TOOL_MAKE) NODEP=1 $@ | 
|---|
| 995 | !else | 
|---|
| 996 | ! if "$(PREMAKEFILES)$(PREMAKEFILES_NEEDED)$(PREMAKEFILES_LIB)$(PREMAKEFILES_BINARY)$(PREMAKEFILES_MISC)" != "" | 
|---|
| 997 | @$(TOOL_DOMAKES) "$(PREMAKEFILES) $(PREMAKEFILES_NEEDED) $(PREMAKEFILES_LIB) $(PREMAKEFILES_BINARY) $(PREMAKEFILES_MISC)" $(TOOL_MAKE) NODEP=1 $@ | 
|---|
| 998 | ! endif | 
|---|
| 999 | !endif | 
|---|
| 1000 | !ifdef POSTMAKEFILES_DEP | 
|---|
| 1001 | @$(TOOL_DOMAKES) "$(POSTMAKEFILES_DEP)" $(TOOL_MAKE) NODEP=1 $@ | 
|---|
| 1002 | !else | 
|---|
| 1003 | ! if "$(POSTMAKEFILES)$(POSTMAKEFILES_NEEDED)$(POSTMAKEFILES_LIB)$(POSTMAKEFILES_BINARY)$(POSTMAKEFILES_MISC)" != "" | 
|---|
| 1004 | @$(TOOL_DOMAKES) "$(POSTMAKEFILES) $(POSTMAKEFILES_NEEDED) $(POSTMAKEFILES_LIB) $(POSTMAKEFILES_BINARY) $(POSTMAKEFILES_MISC)" $(TOOL_MAKE) NODEP=1 $@ | 
|---|
| 1005 | ! endif | 
|---|
| 1006 | !endif | 
|---|
| 1007 |  | 
|---|
| 1008 |  | 
|---|
| 1009 |  | 
|---|
| 1010 | # ----------------------------------------------------------------------------- | 
|---|
| 1011 | # Pass 2 - The needed rule - Make need tools. | 
|---|
| 1012 | #   That is tools and stuff that is required for the next passes. | 
|---|
| 1013 | #   WARNING! These tools and stuff shouldn't rely on libraries and other | 
|---|
| 1014 | #            results of later passes. | 
|---|
| 1015 | # ----------------------------------------------------------------------------- | 
|---|
| 1016 | !ifdef SUBDIRS_NEEDED | 
|---|
| 1017 | _SUBDIRS_NEEDED = _subdir_needed | 
|---|
| 1018 | $(_SUBDIRS_NEEDED): | 
|---|
| 1019 | @$(TOOL_DODIRS) "$(SUBDIRS_NEEDED)" $(TOOL_MAKE) -f $(BUILD_MAKEFILE) needed | 
|---|
| 1020 | !else | 
|---|
| 1021 | ! ifdef SUBDIRS | 
|---|
| 1022 | _SUBDIRS_NEEDED = _subdir_needed | 
|---|
| 1023 | $(_SUBDIRS_NEEDED): | 
|---|
| 1024 | @$(TOOL_DODIRS) "$(SUBDIRS)" $(TOOL_MAKE) -f $(BUILD_MAKEFILE) needed | 
|---|
| 1025 | ! endif | 
|---|
| 1026 | !endif | 
|---|
| 1027 |  | 
|---|
| 1028 | !ifdef PREMAKEFILES_NEEDED | 
|---|
| 1029 | _PREMAKEFILES_NEEDED = _premakefiles_needed | 
|---|
| 1030 | $(_PREMAKEFILES_NEEDED): | 
|---|
| 1031 | @$(TOOL_DOMAKES) "$(PREMAKEFILES_NEEDED)" $(TOOL_MAKE) needed | 
|---|
| 1032 | !else | 
|---|
| 1033 | ! ifdef PREMAKEFILES | 
|---|
| 1034 | _PREMAKEFILES_NEEDED = _premakefiles_needed | 
|---|
| 1035 | $(_PREMAKEFILES_NEEDED): | 
|---|
| 1036 | @$(TOOL_DOMAKES) "$(PREMAKEFILES)" $(TOOL_MAKE) needed | 
|---|
| 1037 | ! endif | 
|---|
| 1038 | !endif | 
|---|
| 1039 |  | 
|---|
| 1040 | !ifdef TARGET_NEEDED | 
|---|
| 1041 | needed:    $(_SUBDIRS_NEEDED) $(_PREMAKEFILES_NEEDED) target | 
|---|
| 1042 | !else | 
|---|
| 1043 | needed:    $(_SUBDIRS_NEEDED) $(_PREMAKEFILES_NEEDED) | 
|---|
| 1044 | !endif | 
|---|
| 1045 | !ifdef POSTMAKEFILES_NEEDED | 
|---|
| 1046 | @$(TOOL_DOMAKES) "$(POSTMAKEFILES_NEEDED)" $(TOOL_MAKE) $@ | 
|---|
| 1047 | !else | 
|---|
| 1048 | ! ifdef POSTMAKEFILES | 
|---|
| 1049 | @$(TOOL_DOMAKES) "$(POSTMAKEFILES)" $(TOOL_MAKE) $@ | 
|---|
| 1050 | ! endif | 
|---|
| 1051 | !endif | 
|---|
| 1052 |  | 
|---|
| 1053 |  | 
|---|
| 1054 |  | 
|---|
| 1055 | # ----------------------------------------------------------------------------- | 
|---|
| 1056 | # Pass 3 - The lib rule - Make libraries. | 
|---|
| 1057 | # ----------------------------------------------------------------------------- | 
|---|
| 1058 | !ifdef SUBDIRS_LIB | 
|---|
| 1059 | _SUBDIRS_LIB = _subdir_lib | 
|---|
| 1060 | $(_SUBDIRS_LIB): | 
|---|
| 1061 | @$(TOOL_DODIRS) "$(SUBDIRS_LIB)" $(TOOL_MAKE) -f $(BUILD_MAKEFILE) lib | 
|---|
| 1062 | !else | 
|---|
| 1063 | ! ifdef SUBDIRS | 
|---|
| 1064 | _SUBDIRS_LIB = _subdir_lib | 
|---|
| 1065 | $(_SUBDIRS_LIB): | 
|---|
| 1066 | @$(TOOL_DODIRS) "$(SUBDIRS)" $(TOOL_MAKE) -f $(BUILD_MAKEFILE) lib | 
|---|
| 1067 | ! endif | 
|---|
| 1068 | !endif | 
|---|
| 1069 |  | 
|---|
| 1070 | !ifdef PREMAKEFILES_LIB | 
|---|
| 1071 | _PREMAKEFILES_LIB = _premakefiles_lib | 
|---|
| 1072 | $(_PREMAKEFILES_LIB): | 
|---|
| 1073 | @$(TOOL_DOMAKES) "$(PREMAKEFILES_LIB)" $(TOOL_MAKE) lib | 
|---|
| 1074 | !else | 
|---|
| 1075 | ! ifdef PREMAKEFILES | 
|---|
| 1076 | _PREMAKEFILES_LIB = _premakefiles_lib | 
|---|
| 1077 | $(_PREMAKEFILES_LIB): | 
|---|
| 1078 | @$(TOOL_DOMAKES) "$(PREMAKEFILES)" $(TOOL_MAKE) lib | 
|---|
| 1079 | ! endif | 
|---|
| 1080 | !endif | 
|---|
| 1081 |  | 
|---|
| 1082 | lib:    $(_SUBDIRS_LIB) $(_PREMAKEFILES_LIB) \ | 
|---|
| 1083 | !if !defined(TARGET_NEEDED) && ("$(TARGET_MODE)" == "LIB" || "$(TARGET_MODE)" == "SYSLIB" || "$(TARGET_MODE)" == "IFSLIB") | 
|---|
| 1084 | $(TARGET) $(_TARGET_EARLY_PUBLISH) \ | 
|---|
| 1085 | !endif | 
|---|
| 1086 | $(TARGET_ILIB) | 
|---|
| 1087 | !ifdef POSTMAKEFILES_LIB | 
|---|
| 1088 | @$(TOOL_DOMAKES) "$(POSTMAKEFILES_LIB)" $(TOOL_MAKE) $@ | 
|---|
| 1089 | !else | 
|---|
| 1090 | ! ifdef POSTMAKEFILES | 
|---|
| 1091 | @$(TOOL_DOMAKES) "$(POSTMAKEFILES)" $(TOOL_MAKE) $@ | 
|---|
| 1092 | ! endif | 
|---|
| 1093 | !endif | 
|---|
| 1094 |  | 
|---|
| 1095 |  | 
|---|
| 1096 |  | 
|---|
| 1097 | # ----------------------------------------------------------------------------- | 
|---|
| 1098 | # Pass 4 - The binary rule - Build the binary. | 
|---|
| 1099 | # ----------------------------------------------------------------------------- | 
|---|
| 1100 | !ifdef SUBDIRS_BINARY | 
|---|
| 1101 | _SUBDIRS_BINARY = _subdir_binary | 
|---|
| 1102 | $(_SUBDIRS_BINARY): | 
|---|
| 1103 | @$(TOOL_DODIRS) "$(SUBDIRS_BINARY)" $(TOOL_MAKE) -f $(BUILD_MAKEFILE) binary | 
|---|
| 1104 | !else | 
|---|
| 1105 | ! ifdef SUBDIRS | 
|---|
| 1106 | _SUBDIRS_BINARY = _subdir_binary | 
|---|
| 1107 | $(_SUBDIRS_BINARY): | 
|---|
| 1108 | @$(TOOL_DODIRS) "$(SUBDIRS)" $(TOOL_MAKE) -f $(BUILD_MAKEFILE) binary | 
|---|
| 1109 | ! endif | 
|---|
| 1110 | !endif | 
|---|
| 1111 |  | 
|---|
| 1112 | !ifdef PREMAKEFILES_BINARY | 
|---|
| 1113 | _PREMAKEFILES_BINARY = _premakefiles_binary | 
|---|
| 1114 | $(_PREMAKEFILES_BINARY): | 
|---|
| 1115 | @$(TOOL_DOMAKES) "$(PREMAKEFILES_BINARY)" $(TOOL_MAKE) binary | 
|---|
| 1116 | !else | 
|---|
| 1117 | ! ifdef PREMAKEFILES | 
|---|
| 1118 | _PREMAKEFILES_BINARY = _premakefiles_binary | 
|---|
| 1119 | $(_PREMAKEFILES_BINARY): | 
|---|
| 1120 | @$(TOOL_DOMAKES) "$(PREMAKEFILES)" $(TOOL_MAKE) binary | 
|---|
| 1121 | ! endif | 
|---|
| 1122 | !endif | 
|---|
| 1123 |  | 
|---|
| 1124 | binary executable: \ | 
|---|
| 1125 | !if "$(TARGET_MODE)" != "LIB" && "$(TARGET_MODE)" != "SYSLIB" && "$(TARGET_MODE)" != "IFSLIB" && !defined(TARGET_NEEDED) | 
|---|
| 1126 | $(_SUBDIRS_BINARY) $(_PREMAKEFILES_BINARY) $(TARGET) $(_TARGET_EARLY_PUBLISH) $(OTHERS) | 
|---|
| 1127 | !else | 
|---|
| 1128 | $(_SUBDIRS_BINARY) $(_PREMAKEFILES_BINARY) | 
|---|
| 1129 | !endif | 
|---|
| 1130 | !ifdef POSTMAKEFILES_BINARY | 
|---|
| 1131 | @$(TOOL_DOMAKES) "$(POSTMAKEFILES_BINARY)" $(TOOL_MAKE) $@ | 
|---|
| 1132 | !else | 
|---|
| 1133 | ! ifdef POSTMAKEFILES | 
|---|
| 1134 | @$(TOOL_DOMAKES) "$(POSTMAKEFILES)" $(TOOL_MAKE) $@ | 
|---|
| 1135 | ! endif | 
|---|
| 1136 | !endif | 
|---|
| 1137 |  | 
|---|
| 1138 |  | 
|---|
| 1139 |  | 
|---|
| 1140 | # ----------------------------------------------------------------------------- | 
|---|
| 1141 | # Pass 5 - The misc(ellaneous) rule - Makes miscellaneous stuff like | 
|---|
| 1142 | #   help, documentations etc. This is experimental for the moment. | 
|---|
| 1143 | # ----------------------------------------------------------------------------- | 
|---|
| 1144 | !ifdef SUBDIRS_MISC | 
|---|
| 1145 | _SUBDIRS_MISC = _subdir_misc | 
|---|
| 1146 | $(_SUBDIRS_MISC): | 
|---|
| 1147 | @$(TOOL_DODIRS) "$(SUBDIRS_MISC)" $(TOOL_MAKE) -f $(BUILD_MAKEFILE) misc | 
|---|
| 1148 | !else | 
|---|
| 1149 | ! ifdef SUBDIRS | 
|---|
| 1150 | _SUBDIRS_MISC = _subdir_misc | 
|---|
| 1151 | $(_SUBDIRS_MISC): | 
|---|
| 1152 | @$(TOOL_DODIRS) "$(SUBDIRS)" $(TOOL_MAKE) -f $(BUILD_MAKEFILE) misc | 
|---|
| 1153 | ! endif | 
|---|
| 1154 | !endif | 
|---|
| 1155 |  | 
|---|
| 1156 | !ifdef PREMAKEFILES_MISC | 
|---|
| 1157 | _PREMAKEFILES_MISC = _premakefiles_misc | 
|---|
| 1158 | $(PREMAKEFILES_MISC): | 
|---|
| 1159 | @$(TOOL_DOMAKES) "$(PREMAKEFILES_MISC)" $(TOOL_MAKE) misc | 
|---|
| 1160 | !else | 
|---|
| 1161 | ! ifdef PREMAKEFILES | 
|---|
| 1162 | _PREMAKEFILES_MISC = _premakefiles_misc | 
|---|
| 1163 | $(_PREMAKEFILES_MISC): | 
|---|
| 1164 | @$(TOOL_DOMAKES) "$(PREMAKEFILES)" $(TOOL_MAKE) misc | 
|---|
| 1165 | ! endif | 
|---|
| 1166 | !endif | 
|---|
| 1167 |  | 
|---|
| 1168 | misc miscellaneous: $(_SUBDIRS_MISC) $(_PREMAKEFILES_MISC) \ | 
|---|
| 1169 | $(TARGET_BOOKS) $(TARGET_HELPS) $(TARGET_DOCS) $(TARGET_MISC) | 
|---|
| 1170 | !if "$(TARGET_BOOKS)$(TARGET_HELPS)$(TARGET_DOCS)$(TARGET_MISC)" != "" | 
|---|
| 1171 | @$(ECHO) Successfully Built $(CLRFIL)$(TARGET_BOOKS) $(TARGET_HELPS) $(TARGET_DOCS) $(TARGET_MISC)$(CLRRST) | 
|---|
| 1172 | !endif | 
|---|
| 1173 | !ifdef POSTMAKEFILES_MISC | 
|---|
| 1174 | @$(TOOL_DOMAKES) "$(POSTMAKEFILES_MISC)" $(TOOL_MAKE) $@ | 
|---|
| 1175 | !else | 
|---|
| 1176 | ! ifdef POSTMAKEFILES | 
|---|
| 1177 | @$(TOOL_DOMAKES) "$(POSTMAKEFILES)" $(TOOL_MAKE) $@ | 
|---|
| 1178 | ! endif | 
|---|
| 1179 | !endif | 
|---|
| 1180 |  | 
|---|
| 1181 |  | 
|---|
| 1182 |  | 
|---|
| 1183 | # ----------------------------------------------------------------------------- | 
|---|
| 1184 | # Pass 6 - The publish rule - Copies target to main binary directory. | 
|---|
| 1185 | #   Installation order is not concidered vital, so subdirectories and | 
|---|
| 1186 | #   pre-makefiles are processed after this directory. | 
|---|
| 1187 | #   However, this order might be changed! | 
|---|
| 1188 | # ----------------------------------------------------------------------------- | 
|---|
| 1189 | !if "$(_TARGET_EARLY_PUBLISH)" != "" | 
|---|
| 1190 | publish: | 
|---|
| 1191 | !else | 
|---|
| 1192 | publish: publish_target | 
|---|
| 1193 | !endif | 
|---|
| 1194 | !ifdef SUBDIRS_PUBLISH | 
|---|
| 1195 | @$(TOOL_DODIRS) "$(SUBDIRS_PUBLISH)" $(TOOL_MAKE) -f $(BUILD_MAKEFILE) $@ | 
|---|
| 1196 | !else | 
|---|
| 1197 | ! ifdef SUBDIRS | 
|---|
| 1198 | @$(TOOL_DODIRS) "$(SUBDIRS)" $(TOOL_MAKE) -f $(BUILD_MAKEFILE) $@ | 
|---|
| 1199 | ! endif | 
|---|
| 1200 | !endif | 
|---|
| 1201 | !ifdef PREMAKEFILES_PUBLISH | 
|---|
| 1202 | @$(TOOL_DOMAKES) "$(PREMAKEFILES_PUBLISH)" $(TOOL_MAKE) $@ | 
|---|
| 1203 | !else | 
|---|
| 1204 | ! ifdef PREMAKEFILES | 
|---|
| 1205 | @$(TOOL_DOMAKES) "$(PREMAKEFILES)" $(TOOL_MAKE) $@ | 
|---|
| 1206 | ! endif | 
|---|
| 1207 | !endif | 
|---|
| 1208 | !ifdef POSTMAKEFILES_PUBLISH | 
|---|
| 1209 | @$(TOOL_DOMAKES) "$(POSTMAKEFILES_PUBLISH)" $(TOOL_MAKE) $@ | 
|---|
| 1210 | !else | 
|---|
| 1211 | ! ifdef POSTMAKEFILES | 
|---|
| 1212 | @$(TOOL_DOMAKES) "$(POSTMAKEFILES)" $(TOOL_MAKE) $@ | 
|---|
| 1213 | ! endif | 
|---|
| 1214 | !endif | 
|---|
| 1215 |  | 
|---|
| 1216 |  | 
|---|
| 1217 | # | 
|---|
| 1218 | # Publish rule which doesn't go down into subdirs and submakes. | 
|---|
| 1219 | # This one is invoked when a target is 'needed' or early published. | 
|---|
| 1220 | # | 
|---|
| 1221 | publish_target: | 
|---|
| 1222 | !if "$(_TARGET_EARLY_PUBLISH)" != "" || "$(TARGET_MODE:LIB=cute)" == "$(TARGET_MODE)" | 
|---|
| 1223 | ! if "$(TARGET_MODE)" != "EMPTY" && "$(TARGET_MODE)" != "TESTCASE" && "$(TARGET_MODE)" != "DEPEND" | 
|---|
| 1224 | @$(ECHO) Publishing $(CLRFIL)$(TARGET)$(CLRTXT) to directory $(CLRFIL)$(TARGET_PUB_DIR)$(CLRRST) | 
|---|
| 1225 | @if not exist "$(TARGET)"           $(TOOL_ECHO) $(CLRERR)WARNING: $(CLRFIL)$(TARGET)$(CLRERR) doesn't exist. $(CLRRST) | 
|---|
| 1226 | @if not exist "$(TARGET_PUB_DIR)"   $(TOOL_CREATEPATH) $(TARGET_PUB_DIR) | 
|---|
| 1227 | @if exist "$(TARGET)"               $(TOOL_COPY) "$(TARGET)"      "$(TARGET_PUB)" | 
|---|
| 1228 | @if exist "$(TARGET_SYM)"           $(TOOL_COPY) "$(TARGET_SYM)"  "$(TARGET_PUB_DIR)" | 
|---|
| 1229 | !  ifdef PUBLISH_MAP | 
|---|
| 1230 | @if exist "$(TARGET_MAP)"           $(TOOL_COPY) "$(TARGET_MAP)"  "$(TARGET_PUB_DIR)" | 
|---|
| 1231 | !  endif | 
|---|
| 1232 | !  if "$(TARGET_PUB_DEB)" != "" | 
|---|
| 1233 | @$(ECHO) Publishing unstripped $(CLRFIL)$(TARGET)$(CLRTXT) to directory $(CLRFIL)$(TARGET_PUB_DIR_DEB)$(CLRRST) | 
|---|
| 1234 | @if not exist "$(_TARGET_DEB)"      $(TOOL_ECHO) $(CLRERR)WARNING: $(CLRFIL)$(_TARGET)$(CLRERR) doesn't exist. $(CLRRST) | 
|---|
| 1235 | @if not exist "$(TARGET_PUB_DIR_DEB)" $(TOOL_CREATEPATH)  $(TARGET_PUB_DIR_DEB) | 
|---|
| 1236 | @if exist "$(_TARGET_DEB)"          $(TOOL_COPY) "$(_TARGET_DEB)" "$(TARGET_PUB_DEB)" | 
|---|
| 1237 | @if exist "$(TARGET_SYM)"           $(TOOL_COPY) "$(TARGET_SYM)"  "$(TARGET_PUB_DIR_DEB)" | 
|---|
| 1238 | !   ifdef PUBLISH_MAP | 
|---|
| 1239 | @if exist "$(TARGET_MAP)"           $(TOOL_COPY) "$(TARGET_MAP)"  "$(TARGET_PUB_DIR_DEB)" | 
|---|
| 1240 | !   endif | 
|---|
| 1241 | !  endif | 
|---|
| 1242 | ! endif | 
|---|
| 1243 | !endif | 
|---|
| 1244 | !if "$(TARGET_BOOKS)" != "" | 
|---|
| 1245 | @$(ECHO) Publishing Book(s) $(CLRFIL)$(TARGET_BOOKS)$(CLRTXT) to directory $(CLRFIL)$(TARGET_BOOK_PUB_DIR)$(CLRRST) | 
|---|
| 1246 | @if not exist "$(TARGET_BOOK_PUB_DIR)" $(TOOL_CREATEPATH) $(TARGET_BOOK_PUB_DIR) | 
|---|
| 1247 | @$(TOOL_COPY) $(TARGET_BOOKS) $(TARGET_BOOK_PUB_DIR) | 
|---|
| 1248 | !endif | 
|---|
| 1249 | !if "$(TARGET_HELPS)" != "" | 
|---|
| 1250 | @$(ECHO) Publishing Help file(s) $(CLRFIL)$(TARGET_HELPS)$(CLRTXT) to directory $(CLRFIL)$(TARGET_HELP_PUB_DIR)$(CLRRST) | 
|---|
| 1251 | @if not exist "$(TARGET_HELP_PUB_DIR)" $(TOOL_CREATEPATH) $(TARGET_HELP_PUB_DIR) | 
|---|
| 1252 | @$(TOOL_COPY) $(TARGET_HELPS) $(TARGET_HELP_PUB_DIR) | 
|---|
| 1253 | !endif | 
|---|
| 1254 | !if "$(TARGET_DOCS)" != "" | 
|---|
| 1255 | @$(ECHO) Publishing Doc(s) $(CLRFIL)$(TARGET_DOCS)$(CLRTXT) to directory $(CLRFIL)$(TARGET_DOC_PUB_DIR)$(CLRRST) | 
|---|
| 1256 | @if not exist "$(TARGET_DOC_PUB_DIR)" $(TOOL_CREATEPATH) $(TARGET_DOC_PUB_DIR) | 
|---|
| 1257 | @$(TOOL_COPY) $(TARGET_DOCS) $(TARGET_DOC_PUB_DIR) | 
|---|
| 1258 | !endif | 
|---|
| 1259 |  | 
|---|
| 1260 |  | 
|---|
| 1261 |  | 
|---|
| 1262 | # ----------------------------------------------------------------------------- | 
|---|
| 1263 | # Pass x - The testcase rule - Execute testcases when present. | 
|---|
| 1264 | #   Testcases are either a testcase.mak file or a testcase subdirectory. | 
|---|
| 1265 | # ----------------------------------------------------------------------------- | 
|---|
| 1266 | !if "$(TARGET_MODE)" != "TESTCASE" | 
|---|
| 1267 | !ifndef BUILD_OWN_TESTCASE_RULE | 
|---|
| 1268 |  | 
|---|
| 1269 | !ifndef MAKEVER | 
|---|
| 1270 | _TESTCASE_TST1 = [$(TOOL_EXISTS) testcase] == 0 | 
|---|
| 1271 | _TESTCASE_TST2 = [$(TOOL_EXISTS) testcase.mak] == 0 | 
|---|
| 1272 | !else | 
|---|
| 1273 | _TESTCASE_TST1 = exists(testcase) != 0 | 
|---|
| 1274 | _TESTCASE_TST2 = exists(testcase.mak) != 0 | 
|---|
| 1275 | !endif | 
|---|
| 1276 |  | 
|---|
| 1277 | testcase: | 
|---|
| 1278 | @$(ECHO) Executing testcases $(CLRRST) | 
|---|
| 1279 | !if $(_TESTCASE_TST1) | 
|---|
| 1280 | @$(TOOL_DODIRS) "testcase" $(TOOL_MAKE) -f $(BUILD_MAKEFILE) $@ | 
|---|
| 1281 | !endif | 
|---|
| 1282 | !if $(_TESTCASE_TST2) | 
|---|
| 1283 | @$(TOOL_DOMAKES) "testcase.mak" $(TOOL_MAKE) $@ | 
|---|
| 1284 | !endif | 
|---|
| 1285 | !ifdef SUBDIRS_TESTCASE | 
|---|
| 1286 | @$(TOOL_DODIRS) "$(SUBDIRS_TESTCASE)" $(TOOL_MAKE) -f $(BUILD_MAKEFILE) $@ | 
|---|
| 1287 | !else | 
|---|
| 1288 | ! ifdef SUBDIRS | 
|---|
| 1289 | @$(TOOL_DODIRS) "$(SUBDIRS)" $(TOOL_MAKE) -f $(BUILD_MAKEFILE) $@ | 
|---|
| 1290 | ! endif | 
|---|
| 1291 | !endif | 
|---|
| 1292 | !ifdef PREMAKEFILES_TESTCASE | 
|---|
| 1293 | @$(TOOL_DOMAKES) "$(PREMAKEFILES_TESTCASE)" $(TOOL_MAKE) $@ | 
|---|
| 1294 | !else | 
|---|
| 1295 | ! ifdef PREMAKEFILES | 
|---|
| 1296 | @$(TOOL_DOMAKES) "$(PREMAKEFILES)" $(TOOL_MAKE) $@ | 
|---|
| 1297 | ! endif | 
|---|
| 1298 | !endif | 
|---|
| 1299 | !ifdef POSTMAKEFILES_TESTCASE | 
|---|
| 1300 | @$(TOOL_DOMAKES) "$(POSTMAKEFILES_TESTCASE)" $(TOOL_MAKE) $@ | 
|---|
| 1301 | !else | 
|---|
| 1302 | ! ifdef POSTMAKEFILES | 
|---|
| 1303 | @$(TOOL_DOMAKES) "$(POSTMAKEFILES)" $(TOOL_MAKE) $@ | 
|---|
| 1304 | ! endif | 
|---|
| 1305 | !endif | 
|---|
| 1306 |  | 
|---|
| 1307 | !endif # BUILD_OWN_TESTCASE_RULE | 
|---|
| 1308 | !endif #!TESTCASE | 
|---|
| 1309 |  | 
|---|
| 1310 |  | 
|---|
| 1311 | # ----------------------------------------------------------------------------- | 
|---|
| 1312 | # Pass x - The packing rule - traverse subdirs etc. | 
|---|
| 1313 | # ----------------------------------------------------------------------------- | 
|---|
| 1314 | !ifdef SUBDIRS_PACKING | 
|---|
| 1315 | _SUBDIRS_PACKING = _subdir_packing | 
|---|
| 1316 | $(_SUBDIRS_PACKING): | 
|---|
| 1317 | @$(TOOL_DODIRS) "$(SUBDIRS_PACKING)" $(TOOL_MAKE) -f $(BUILD_MAKEFILE) packing | 
|---|
| 1318 | !else | 
|---|
| 1319 | ! ifdef SUBDIRS | 
|---|
| 1320 | _SUBDIRS_PACKING = _subdir_packing | 
|---|
| 1321 | $(_SUBDIRS_PACKING): | 
|---|
| 1322 | @$(TOOL_DODIRS) "$(SUBDIRS)" $(TOOL_MAKE) -f $(BUILD_MAKEFILE) packing | 
|---|
| 1323 | ! endif | 
|---|
| 1324 | !endif | 
|---|
| 1325 |  | 
|---|
| 1326 | !ifdef PREMAKEFILES_PACKING | 
|---|
| 1327 | _PREMAKEFILES_PACKING = _premakefiles_packing | 
|---|
| 1328 | $(PREMAKEFILES_PACKING): | 
|---|
| 1329 | @$(TOOL_DOMAKES) "$(PREMAKEFILES_PACKING)" $(TOOL_MAKE) packing | 
|---|
| 1330 | !else | 
|---|
| 1331 | ! ifdef PREMAKEFILES | 
|---|
| 1332 | _PREMAKEFILES_PACKING = _premakefiles_packing | 
|---|
| 1333 | $(_PREMAKEFILES_PACKING): | 
|---|
| 1334 | @$(TOOL_DOMAKES) "$(PREMAKEFILES)" $(TOOL_MAKE) packing | 
|---|
| 1335 | ! endif | 
|---|
| 1336 | !endif | 
|---|
| 1337 |  | 
|---|
| 1338 | !if "$(RULE_PACKING)" == "packing" | 
|---|
| 1339 | _packing: \ | 
|---|
| 1340 | !else | 
|---|
| 1341 | packing: \ | 
|---|
| 1342 | !endif | 
|---|
| 1343 | $(_SUBDIRS_PACKING) $(_PREMAKEFILES_PACKING) $(RULE_PACKING) | 
|---|
| 1344 | !ifdef POSTMAKEFILES_PACKING | 
|---|
| 1345 | @$(TOOL_DOMAKES) "$(POSTMAKEFILES_PACKING)" $(TOOL_MAKE) $@ | 
|---|
| 1346 | !else | 
|---|
| 1347 | ! ifdef POSTMAKEFILES | 
|---|
| 1348 | @$(TOOL_DOMAKES) "$(POSTMAKEFILES)" $(TOOL_MAKE) $@ | 
|---|
| 1349 | ! endif | 
|---|
| 1350 | !endif | 
|---|
| 1351 | $(ECHO) .$(CLRRST) | 
|---|
| 1352 |  | 
|---|
| 1353 |  | 
|---|
| 1354 |  | 
|---|
| 1355 | # ----------------------------------------------------------------------------- | 
|---|
| 1356 | # The target rule - Build the target. | 
|---|
| 1357 | #   NOTE! NO SUBDIRS OR POST/PREMAKED INVOLVED! | 
|---|
| 1358 | # ----------------------------------------------------------------------------- | 
|---|
| 1359 | target: $(TARGET) $(TARGET_ILIB) $(_TARGET_EARLY_PUBLISH) $(OTHERS) | 
|---|
| 1360 | !if "$(TARGET)$(TARGET_ILIB)" != "" | 
|---|
| 1361 | @$(ECHO) Successfully Built $(CLRFIL)$(TARGET) $(TARGET_ILIB)$(CLRRST) | 
|---|
| 1362 | !else | 
|---|
| 1363 | @$(ECHO) .$(CLRRST) | 
|---|
| 1364 | !endif | 
|---|
| 1365 |  | 
|---|
| 1366 |  | 
|---|
| 1367 |  | 
|---|
| 1368 | # ----------------------------------------------------------------------------- | 
|---|
| 1369 | # Others (experimental) | 
|---|
| 1370 | # ----------------------------------------------------------------------------- | 
|---|
| 1371 | others: $(OTHERS) | 
|---|
| 1372 | !if "$(OTHERS)" != "" | 
|---|
| 1373 | @$(ECHO) Successfully Built $(OTHERS)$(CLRRST) | 
|---|
| 1374 | !else | 
|---|
| 1375 | @$(ECHO) .$(CLRRST) | 
|---|
| 1376 | !endif | 
|---|
| 1377 |  | 
|---|
| 1378 |  | 
|---|
| 1379 |  | 
|---|
| 1380 | # ----------------------------------------------------------------------------- | 
|---|
| 1381 | # The shell rule - Setup the correcte shell environment and start a shell. | 
|---|
| 1382 | # ----------------------------------------------------------------------------- | 
|---|
| 1383 | shell: | 
|---|
| 1384 | @$(ECHO) Creating work shell $(CLRRST) | 
|---|
| 1385 | \ | 
|---|
| 1386 | !ifndef BUILD_VERBOSE | 
|---|
| 1387 | @ \ | 
|---|
| 1388 | !endif | 
|---|
| 1389 | -$(TOOL_BUILDENV) $(BUILD_ENVS_BASE_PRE) $(BUILD_ENVS_PRE) $(ENV_ENVS) \ | 
|---|
| 1390 | $(BUILD_ENVS_BASE_POST) $(BUILD_ENVS_POST) * $(COMSPEC) | 
|---|
| 1391 |  | 
|---|
| 1392 |  | 
|---|
| 1393 |  | 
|---|
| 1394 | # ----------------------------------------------------------------------------- | 
|---|
| 1395 | # The nothing rule - Rule for testing the makefile structure. | 
|---|
| 1396 | # ----------------------------------------------------------------------------- | 
|---|
| 1397 | nothing: | 
|---|
| 1398 | @$(ECHO) Doing nothing in $(MAKEFILE). | 
|---|
| 1399 | !ifdef SUBDIRS | 
|---|
| 1400 | @$(TOOL_DODIRS) "$(SUBDIRS)" $(TOOL_MAKE) -f $(BUILD_MAKEFILE) $@ | 
|---|
| 1401 | !endif | 
|---|
| 1402 | !ifdef PREMAKEFILES | 
|---|
| 1403 | @$(TOOL_DOMAKES) "$(PREMAKEFILES)" $(TOOL_MAKE) $@ | 
|---|
| 1404 | !endif | 
|---|
| 1405 | !ifdef POSTMAKEFILES | 
|---|
| 1406 | @$(TOOL_DOMAKES) "$(POSTMAKEFILES)" $(TOOL_MAKE) $@ | 
|---|
| 1407 | !endif | 
|---|
| 1408 | @$(ECHO) Completed nothing in $(MAKEFILE). | 
|---|
| 1409 |  | 
|---|
| 1410 |  | 
|---|
| 1411 |  | 
|---|
| 1412 | # ----------------------------------------------------------------------------- | 
|---|
| 1413 | # The $(TARGET) rule - For EXE, DLL, SYS and IFS targets | 
|---|
| 1414 | # ----------------------------------------------------------------------------- | 
|---|
| 1415 | !if "$(TARGET_MODE)" == "EXE" || "$(TARGET_MODE)" == "DLL" || "$(TARGET_MODE)" == "SYS" || "$(TARGET_MODE)" == "IFS" || "$(TARGET_MODE)" == "VDD" | 
|---|
| 1416 | $(TARGET): $(TARGET_OBJS) $(TARGET_RES) $(TARGET_DEF) $(TARGET_DEPS) $(TARGET_LIBS) \ | 
|---|
| 1417 | $(MAKEFILE) $(MAKE_INCLUDE_SETUP) $(MAKE_INCLUDE_LD_SETUP) $(MAKE_INCLUDE_LD_OPT) $(PATH_ROOT)\$(BUILD_SETUP_MAK) $(MAKE_INCLUDE_PROCESS) $(PATH_MAKE)\setup.tools.mk | 
|---|
| 1418 | !if "$(TOOL_JOB_WAIT)" != "" | 
|---|
| 1419 | ! ifndef BUILD_QUIET | 
|---|
| 1420 | @$(ECHO) Waiting for jobs to complete $(CLRRST) | 
|---|
| 1421 | ! endif | 
|---|
| 1422 | \ | 
|---|
| 1423 | ! ifndef BUILD_VERBOSE | 
|---|
| 1424 | @ \ | 
|---|
| 1425 | ! endif | 
|---|
| 1426 | $(TOOL_JOB_WAIT) | 
|---|
| 1427 | !endif | 
|---|
| 1428 | !if "$(TARGET_DEF_LINK)" != "$(TARGET_DEF)" | 
|---|
| 1429 | ! ifndef BUILD_QUIET | 
|---|
| 1430 | @$(ECHO) Stamping deffile with build level info.$(CLRRST) | 
|---|
| 1431 | ! endif | 
|---|
| 1432 | \ | 
|---|
| 1433 | ! ifndef BUILD_VERBOSE | 
|---|
| 1434 | @ \ | 
|---|
| 1435 | ! endif | 
|---|
| 1436 | $(TOOL_BLDLEVEL) $(BUILD_BLDLEVEL_FLAGS) $(TARGET_BLDLEVEL_FLAGS) -R$(TARGET_DEF) $(TARGET_DEF) $(TARGET_DEF_LINK) | 
|---|
| 1437 | !endif | 
|---|
| 1438 | !ifndef TOOL_DEFCONV | 
|---|
| 1439 | @$(TOOL_ECHOTXT) Creating Linker Input File $(CLRRST)<<$(TARGET_LNK) | 
|---|
| 1440 | $(LINK_LNK1) | 
|---|
| 1441 | $(LINK_LNK2) | 
|---|
| 1442 | $(LINK_LNK3) | 
|---|
| 1443 | $(LINK_LNK4) | 
|---|
| 1444 | $(LINK_LNK5) | 
|---|
| 1445 | <<KEEP | 
|---|
| 1446 | !else | 
|---|
| 1447 | @$(ECHO) Creating Linker Input File $(CLRRST) $(TARGET_LNK) | 
|---|
| 1448 | @$(TOOL_RM) "$(TARGET_LNK)" | 
|---|
| 1449 | \ | 
|---|
| 1450 | ! ifndef BUILD_VERBOSE | 
|---|
| 1451 | @ \ | 
|---|
| 1452 | ! endif | 
|---|
| 1453 | $(TOOL_DEFCONV) $(TARGET_DEF_LINK) $(TARGET_LNK) <<$(TARGET_LNK)2 | 
|---|
| 1454 | $(LINK_LNK1) | 
|---|
| 1455 | $(LINK_LNK2) | 
|---|
| 1456 | $(LINK_LNK3) | 
|---|
| 1457 | $(LINK_LNK4) | 
|---|
| 1458 | $(LINK_LNK5) | 
|---|
| 1459 | <<keep | 
|---|
| 1460 | !endif | 
|---|
| 1461 | !ifdef BUILD_VERBOSE | 
|---|
| 1462 | @type $(TARGET_LNK) | 
|---|
| 1463 | !endif | 
|---|
| 1464 | @$(ECHO) Linking $(TARGET_MODE) $(CLRFIL)$@ $(CLRRST) | 
|---|
| 1465 | \ | 
|---|
| 1466 | !ifndef BUILD_VERBOSE | 
|---|
| 1467 | @ \ | 
|---|
| 1468 | !endif | 
|---|
| 1469 | !ifdef TARGET_IGNORE_LINKER_WARNINGS | 
|---|
| 1470 | -4 \ | 
|---|
| 1471 | !endif | 
|---|
| 1472 | !if "$(TARGET_MODE)" == "EXE" | 
|---|
| 1473 | $(LINK_CMD_EXE) | 
|---|
| 1474 | !endif | 
|---|
| 1475 | !if "$(TARGET_MODE)" == "DLL" | 
|---|
| 1476 | $(LINK_CMD_DLL) | 
|---|
| 1477 | !endif | 
|---|
| 1478 | !if "$(TARGET_MODE)" == "SYS" | 
|---|
| 1479 | $(LINK_CMD_SYS) | 
|---|
| 1480 | !endif | 
|---|
| 1481 | !if "$(TARGET_MODE)" == "IFS" | 
|---|
| 1482 | $(LINK_CMD_IFS) | 
|---|
| 1483 | !endif | 
|---|
| 1484 | !if "$(TARGET_MODE)" == "VDD" | 
|---|
| 1485 | $(LINK_CMD_VDD) | 
|---|
| 1486 | !endif | 
|---|
| 1487 | !if "$(TARGET_RES)" != "" && "$(RL)" != "" | 
|---|
| 1488 | @$(ECHO) Linking Resources $(CLRRST) | 
|---|
| 1489 | \ | 
|---|
| 1490 | ! ifndef BUILD_VERBOSE | 
|---|
| 1491 | @ \ | 
|---|
| 1492 | ! endif | 
|---|
| 1493 | $(RL) $(RL_FLAGS) $(TARGET_RES) $@ | 
|---|
| 1494 | !endif | 
|---|
| 1495 | !if "$(TARGET_DLLRNAME)" != "" | 
|---|
| 1496 | @$(ECHO) Dll Rename $(TARGET_DLLRNAME) | 
|---|
| 1497 | \ | 
|---|
| 1498 | ! ifndef BUILD_VERBOSE | 
|---|
| 1499 | @ \ | 
|---|
| 1500 | ! endif | 
|---|
| 1501 | $(TOOL_DLLRNAME) $(TARGET) $(TARGET_DLLRNAME) | 
|---|
| 1502 | !endif | 
|---|
| 1503 | !if "$(TOOL_MAPSYM)" != "" && "$(TARGET_SYM)" != "" && "$(TARGET_MAP)" != "" | 
|---|
| 1504 | \ | 
|---|
| 1505 | ! ifndef BUILD_VERBOSE | 
|---|
| 1506 | @ \ | 
|---|
| 1507 | ! endif | 
|---|
| 1508 | $(TOOL_MAPSYM) $(TARGET_MAP) $(TARGET_SYM) | 
|---|
| 1509 | !endif | 
|---|
| 1510 | !if "$(BUILD_MODE)" == "RELEASE" | 
|---|
| 1511 | \ | 
|---|
| 1512 | ! ifndef BUILD_VERBOSE | 
|---|
| 1513 | @ \ | 
|---|
| 1514 | ! endif | 
|---|
| 1515 | $(TOOL_COPY) "$@" "$(_TARGET_DEB)" | 
|---|
| 1516 | ! if "$(TOOL_STRIP)" != "" | 
|---|
| 1517 | \ | 
|---|
| 1518 | !  ifndef BUILD_VERBOSE | 
|---|
| 1519 | @ \ | 
|---|
| 1520 | !  endif | 
|---|
| 1521 | $(TOOL_STRIP) $@ | 
|---|
| 1522 | ! endif | 
|---|
| 1523 | !endif | 
|---|
| 1524 |  | 
|---|
| 1525 | !endif | 
|---|
| 1526 |  | 
|---|
| 1527 |  | 
|---|
| 1528 | # ----------------------------------------------------------------------------- | 
|---|
| 1529 | # The $(TARGET) rule - For LIB, SYSLIB, and IFSLIB targets. | 
|---|
| 1530 | # ----------------------------------------------------------------------------- | 
|---|
| 1531 | !if "$(TARGET_MODE)" == "LIB" || "$(TARGET_MODE)" == "SYSLIB" || "$(TARGET_MODE)" == "IFSLIB" | 
|---|
| 1532 | $(TARGET): $(TARGET_OBJS) $(TARGET_LNK) $(TARGET_DEPS) | 
|---|
| 1533 | !if "$(TOOL_JOB_WAIT)" != "" | 
|---|
| 1534 | ! ifndef BUILD_QUIET | 
|---|
| 1535 | @$(ECHO) Waiting for jobs to complete $(CLRRST) | 
|---|
| 1536 | ! endif | 
|---|
| 1537 | \ | 
|---|
| 1538 | ! ifndef BUILD_VERBOSE | 
|---|
| 1539 | @ \ | 
|---|
| 1540 | ! endif | 
|---|
| 1541 | $(TOOL_JOB_WAIT) | 
|---|
| 1542 | !endif | 
|---|
| 1543 | @$(ECHO) Creating Library $(CLRFIL)$@ $(CLRRST) | 
|---|
| 1544 | !ifndef BUILD_VERBOSE | 
|---|
| 1545 | @$(TOOL_RM) "$@" | 
|---|
| 1546 | @$(AR_CMD) | 
|---|
| 1547 | !else | 
|---|
| 1548 | $(TOOL_RM) "$@" | 
|---|
| 1549 | $(AR_CMD) | 
|---|
| 1550 | !endif | 
|---|
| 1551 |  | 
|---|
| 1552 |  | 
|---|
| 1553 | # | 
|---|
| 1554 | # Lib parameter file. | 
|---|
| 1555 | # | 
|---|
| 1556 | $(TARGET_LNK):  $(MAKEFILE) $(MAKE_INCLUDE_SETUP) $(MAKE_INCLUDE_AR_SETUP) $(PATH_ROOT)\$(BUILD_SETUP_MAK) | 
|---|
| 1557 | @$(TOOL_ECHOTXT) Creating Lib Input File $(CLRRST)<<$@ | 
|---|
| 1558 | $(AR_LNK1) | 
|---|
| 1559 | $(AR_LNK2) | 
|---|
| 1560 | $(AR_LNK3) | 
|---|
| 1561 | $(AR_LNK4) | 
|---|
| 1562 | $(AR_LNK5) | 
|---|
| 1563 | <<KEEP | 
|---|
| 1564 | !ifdef BUILD_VERBOSE | 
|---|
| 1565 | @type $@ | 
|---|
| 1566 | !endif | 
|---|
| 1567 | !endif | 
|---|
| 1568 |  | 
|---|
| 1569 |  | 
|---|
| 1570 | # ----------------------------------------------------------------------------- | 
|---|
| 1571 | # The $(TARGET) rule - For DEPEND targets. | 
|---|
| 1572 | # ----------------------------------------------------------------------------- | 
|---|
| 1573 | !if "$(TARGET_MODE)" == "DEPEND" | 
|---|
| 1574 | $(TARGET): | 
|---|
| 1575 | @$(ECHO) . | 
|---|
| 1576 | !endif | 
|---|
| 1577 |  | 
|---|
| 1578 |  | 
|---|
| 1579 |  | 
|---|
| 1580 | # ----------------------------------------------------------------------------- | 
|---|
| 1581 | # The $(TARGET_ILIB) rule - Make import library. | 
|---|
| 1582 | # ----------------------------------------------------------------------------- | 
|---|
| 1583 | !ifdef TARGET_ILIB | 
|---|
| 1584 | $(TARGET_ILIB): $(TARGET_IDEF) $(MAKEFILE) $(MAKE_INCLUDE_SETUP) $(MAKE_INCLUDE_AR_SETUP) $(PATH_MAKE)\setup.tools.mk | 
|---|
| 1585 | @$(ECHO) Creating Import Library $(CLRFIL)$@ $(CLRRST) | 
|---|
| 1586 | \ | 
|---|
| 1587 | !ifndef BUILD_VERBOSE | 
|---|
| 1588 | @if not exist $(@D) $(ECHO) Target implib path $(CLRFIL)$(@D)$(CLRTXT) does NOT exist. Creating. $(CLRRST) | 
|---|
| 1589 | !endif | 
|---|
| 1590 | @if not exist $(@D) $(TOOL_CREATEPATH) $(@D) | 
|---|
| 1591 | \ | 
|---|
| 1592 | !ifndef BUILD_VERBOSE | 
|---|
| 1593 | @ \ | 
|---|
| 1594 | !endif | 
|---|
| 1595 | $(IMPLIB) $(IMPLIB_FLAGS) $@ $(TARGET_IDEF) | 
|---|
| 1596 |  | 
|---|
| 1597 |  | 
|---|
| 1598 | # | 
|---|
| 1599 | # Conversion rule for converting the .def file before passing along to implib. | 
|---|
| 1600 | # | 
|---|
| 1601 | ! if "$(TARGET_IDEF_ORG)" != "" && "$(TARGET_IDEF_ORG)" != "$(TARGET_IDEF)" | 
|---|
| 1602 | $(TARGET_IDEF): $(TARGET_IDEF_ORG) | 
|---|
| 1603 | @$(ECHO) Making Import Definition File $(CLRFIL)$@ $(CLRRST) | 
|---|
| 1604 | \ | 
|---|
| 1605 | !ifndef BUILD_VERBOSE | 
|---|
| 1606 | @if not exist $(@D) $(ECHO) Target .def path $(CLRFIL)$(@D)$(CLRTXT) does NOT exist. Creating. $(CLRRST) | 
|---|
| 1607 | !endif | 
|---|
| 1608 | @if not exist $(@D) $(TOOL_CREATEPATH) $(@D) | 
|---|
| 1609 | \ | 
|---|
| 1610 | !ifndef BUILD_VERBOSE | 
|---|
| 1611 | @ \ | 
|---|
| 1612 | !endif | 
|---|
| 1613 | $(TOOL_IDEFCONV) $(TOOL_IDEFCONV_FLAGS) $(TARGET_IDEF_ORG) $@ | 
|---|
| 1614 | ! endif | 
|---|
| 1615 |  | 
|---|
| 1616 | !endif | 
|---|
| 1617 |  | 
|---|
| 1618 |  | 
|---|
| 1619 |  | 
|---|
| 1620 | # ----------------------------------------------------------------------------- | 
|---|
| 1621 | # The .force rule - Force a remake of something everytime. | 
|---|
| 1622 | # ----------------------------------------------------------------------------- | 
|---|
| 1623 | .force: | 
|---|
| 1624 | !ifndef BUILD_VERBOSE | 
|---|
| 1625 | @$(ECHO) . | 
|---|
| 1626 | !else | 
|---|
| 1627 | @$(ECHO) . (force) . | 
|---|
| 1628 | !endif | 
|---|
| 1629 |  | 
|---|
| 1630 |  | 
|---|
| 1631 |  | 
|---|
| 1632 | # ----------------------------------------------------------------------------- | 
|---|
| 1633 | # Read Dependencies. | 
|---|
| 1634 | # ----------------------------------------------------------------------------- | 
|---|
| 1635 | !if "$(TARGET_MODE)" != "TESTCASE" && "$(TARGET_MODE)" != "DEPEND" | 
|---|
| 1636 | !if "$(TARGET_MODE)" != "EMPTY" && "$(NODEP)" == "" | 
|---|
| 1637 |  | 
|---|
| 1638 | # | 
|---|
| 1639 | # Read dependency file for current directory | 
|---|
| 1640 | # | 
|---|
| 1641 | !ifndef MAKEVER | 
|---|
| 1642 | ! if [$(TOOL_EXISTS) $(TARGET_DEPEND)] == 0 | 
|---|
| 1643 | !  ifdef BUILD_VERBOSE | 
|---|
| 1644 | !   if [$(ECHO) Including dependency $(CLRFIL)$(TARGET_DEPEND)$(CLRRST)] | 
|---|
| 1645 | !   endif | 
|---|
| 1646 | !  endif | 
|---|
| 1647 | !  include $(TARGET_DEPEND) | 
|---|
| 1648 | ! else | 
|---|
| 1649 | #!  ifndef NODEP | 
|---|
| 1650 | #!   if [$(ECHO) $(CLRERR)WARNING: Please make dependencies first. $(TARGET_DEPEND) is missing.$(CLRRST)] | 
|---|
| 1651 | #!   endif | 
|---|
| 1652 | #!  endif | 
|---|
| 1653 | ! endif | 
|---|
| 1654 | !else | 
|---|
| 1655 | ! if %exists($(TARGET_DEPEND)) != 0 | 
|---|
| 1656 | !  ifdef BUILD_VERBOSE | 
|---|
| 1657 | $(ECHO) Including dependency $(CLRFIL)$(TARGET_DEPEND)$(CLRRST) | 
|---|
| 1658 | !  endif | 
|---|
| 1659 | !  include $(TARGET_DEPEND) | 
|---|
| 1660 | ! else | 
|---|
| 1661 | #!  ifndef NODEP | 
|---|
| 1662 | #$(ECHO) $(CLRERR)WARNING: Please make dependencies first. $(TARGET_DEPEND) is missing.$(CLRRST) | 
|---|
| 1663 | #!  endif | 
|---|
| 1664 | ! endif | 
|---|
| 1665 | !endif | 
|---|
| 1666 |  | 
|---|
| 1667 |  | 
|---|
| 1668 | # | 
|---|
| 1669 | # Read global dependency files. | 
|---|
| 1670 | # | 
|---|
| 1671 | !ifdef BUILD_DEPEND1 | 
|---|
| 1672 | ! ifndef MAKEVER | 
|---|
| 1673 | !  if [$(TOOL_EXISTS) $(BUILD_DEPEND1)] == 0 | 
|---|
| 1674 | !   ifdef BUILD_VERBOSE | 
|---|
| 1675 | !    if [$(ECHO) Including dependency $(CLRFIL)$(BUILD_DEPEND1)$(CLRRST)] | 
|---|
| 1676 | !    endif | 
|---|
| 1677 | !   endif | 
|---|
| 1678 | !   include $(BUILD_DEPEND1) | 
|---|
| 1679 | !  else | 
|---|
| 1680 | !   ifndef NODEP | 
|---|
| 1681 | !    if [$(ECHO) $(CLRERR)WARNING: Please make dependencies first. $(BUILD_DEPEND1) is missing.$(CLRRST)] | 
|---|
| 1682 | !    endif | 
|---|
| 1683 | !   endif | 
|---|
| 1684 | !  endif | 
|---|
| 1685 | ! else | 
|---|
| 1686 | !  if %exists($(BUILD_DEPEND1)) != 0 | 
|---|
| 1687 | !   ifdef BUILD_VERBOSE | 
|---|
| 1688 | $(ECHO) Including dependency $(CLRFIL)$(BUILD_DEPEND1)$(CLRRST) | 
|---|
| 1689 | !   endif | 
|---|
| 1690 | !   include $(BUILD_DEPEND1) | 
|---|
| 1691 | !  else | 
|---|
| 1692 | !   ifndef NODEP | 
|---|
| 1693 | $(ECHO) $(CLRERR)WARNING: Please make dependencies first. $(BUILD_DEPEND1) is missing.$(CLRRST) | 
|---|
| 1694 | !   endif | 
|---|
| 1695 | !  endif | 
|---|
| 1696 | ! endif | 
|---|
| 1697 | !endif | 
|---|
| 1698 |  | 
|---|
| 1699 |  | 
|---|
| 1700 | !ifdef BUILD_DEPEND2 | 
|---|
| 1701 | ! ifndef MAKEVER | 
|---|
| 1702 | !  if [$(TOOL_EXISTS) $(BUILD_DEPEND2)] == 0 | 
|---|
| 1703 | !   ifdef BUILD_VERBOSE | 
|---|
| 1704 | !    if [$(ECHO) Including dependency $(CLRFIL)$(BUILD_DEPEND2)$(CLRRST)] | 
|---|
| 1705 | !    endif | 
|---|
| 1706 | !   endif | 
|---|
| 1707 | !   include $(BUILD_DEPEND2) | 
|---|
| 1708 | !  else | 
|---|
| 1709 | !   ifndef NODEP | 
|---|
| 1710 | !    if [$(ECHO) $(CLRERR)WARNING: Please make dependencies first. $(BUILD_DEPEND2) is missing.$(CLRRST)] | 
|---|
| 1711 | !    endif | 
|---|
| 1712 | !   endif | 
|---|
| 1713 | !  endif | 
|---|
| 1714 | ! else | 
|---|
| 1715 | !  if %exists($(BUILD_DEPEND2)) != 0 | 
|---|
| 1716 | !   ifdef BUILD_VERBOSE | 
|---|
| 1717 | $(ECHO) Including dependency $(CLRFIL)$(BUILD_DEPEND2)$(CLRRST) | 
|---|
| 1718 | !   endif | 
|---|
| 1719 | !   include $(BUILD_DEPEND2) | 
|---|
| 1720 | !  else | 
|---|
| 1721 | !   ifndef NODEP | 
|---|
| 1722 | $(ECHO) $(CLRERR)WARNING: Please make dependencies first. $(BUILD_DEPEND2) is missing.$(CLRRST) | 
|---|
| 1723 | !   endif | 
|---|
| 1724 | !  endif | 
|---|
| 1725 | ! endif | 
|---|
| 1726 | !endif | 
|---|
| 1727 |  | 
|---|
| 1728 |  | 
|---|
| 1729 | !ifdef BUILD_DEPEND3 | 
|---|
| 1730 | ! ifndef MAKEVER | 
|---|
| 1731 | !  if [$(TOOL_EXISTS) $(BUILD_DEPEND3)] == 0 | 
|---|
| 1732 | !   ifdef BUILD_VERBOSE | 
|---|
| 1733 | !    if [$(ECHO) Including dependency $(CLRFIL)$(BUILD_DEPEND3)$(CLRRST)] | 
|---|
| 1734 | !    endif | 
|---|
| 1735 | !   endif | 
|---|
| 1736 | !   include $(BUILD_DEPEND3) | 
|---|
| 1737 | !  else | 
|---|
| 1738 | !   ifndef NODEP | 
|---|
| 1739 | !    if [$(ECHO) $(CLRERR)WARNING: Please make dependencies first. $(BUILD_DEPEND3) is missing.$(CLRRST)] | 
|---|
| 1740 | !    endif | 
|---|
| 1741 | !   endif | 
|---|
| 1742 | !  endif | 
|---|
| 1743 | ! else | 
|---|
| 1744 | !  if %exists($(BUILD_DEPEND3)) != 0 | 
|---|
| 1745 | !   ifdef BUILD_VERBOSE | 
|---|
| 1746 | $(ECHO) Including dependency $(CLRFIL)$(BUILD_DEPEND3)$(CLRRST) | 
|---|
| 1747 | !   endif | 
|---|
| 1748 | !   include $(BUILD_DEPEND3) | 
|---|
| 1749 | !  else | 
|---|
| 1750 | !   ifndef NODEP | 
|---|
| 1751 | $(ECHO) $(CLRERR)WARNING: Please make dependencies first. $(BUILD_DEPEND3) is missing.$(CLRRST) | 
|---|
| 1752 | !   endif | 
|---|
| 1753 | !  endif | 
|---|
| 1754 | ! endif | 
|---|
| 1755 | !endif | 
|---|
| 1756 |  | 
|---|
| 1757 |  | 
|---|
| 1758 | !endif | 
|---|
| 1759 |  | 
|---|
| 1760 |  | 
|---|
| 1761 | # | 
|---|
| 1762 | # If BUILD_MULTIJOBS is nonempty make sure the job daemon is up running. | 
|---|
| 1763 | # | 
|---|
| 1764 | !if "$(BUILD_MULTIJOBS)" != "" | 
|---|
| 1765 | ! if [$(TOOL_JOB_UP)] != 0 | 
|---|
| 1766 | !  if "$(BUILD_QUITE)" == "" | 
|---|
| 1767 | !   ifndef MAKEVER | 
|---|
| 1768 | !    if [$(ECHO) Starting Job Daemon With $(TOOL_JOB_WORKERS) Workers...$(CLRRST)] | 
|---|
| 1769 | !    endif | 
|---|
| 1770 | !   else | 
|---|
| 1771 | $(ECHO) Starting Job Daemon With $(TOOL_JOB_WORKERS) Workers...$(CLRRST) | 
|---|
| 1772 | !   endif | 
|---|
| 1773 | !  endif | 
|---|
| 1774 | !  if [$(TOOL_JOB_INIT) $(TOOL_JOB_WORKERS)] != 0 | 
|---|
| 1775 | !   ifndef MAKEVER | 
|---|
| 1776 | !    if [$(ECHO) $(CLRERR)Fatal error: Failed to start job daemon.$(CLRRST)] | 
|---|
| 1777 | !    endif | 
|---|
| 1778 | !    error | 
|---|
| 1779 | !else | 
|---|
| 1780 | !    error $(CLRERR)Fatal error: Failed to start job daemon.$(CLRRST) | 
|---|
| 1781 | !endif | 
|---|
| 1782 | !  endif | 
|---|
| 1783 | ! endif | 
|---|
| 1784 | !endif | 
|---|
| 1785 |  | 
|---|
| 1786 | !endif #!TESTCASE | 
|---|
| 1787 |  | 
|---|
| 1788 |  | 
|---|
| 1789 | # | 
|---|
| 1790 | # Include system library dependency stubs. | 
|---|
| 1791 | # | 
|---|
| 1792 | !include $(PATH_MAKE)\setup.$(SHT_TRGPLTFRM)libs.mk | 
|---|
| 1793 |  | 
|---|
| 1794 |  | 
|---|
| 1795 | # | 
|---|
| 1796 | # Check if TARGET_ALWAYS needs to be forced built. | 
|---|
| 1797 | # | 
|---|
| 1798 | !if "$(TARGET_ALWAYS)" != "" | 
|---|
| 1799 | ! ifndef BUILD_FORCED_BUILD_TEST | 
|---|
| 1800 | !  if [$(TOOL_MAKE) BUILD_FORCED_BUILD_TEST=1 -f $(MAKEFILE) -q $(TARGET) $(TARGET_ILIB) >nul 2>nul] != 0 | 
|---|
| 1801 | $(TARGET_ALWAYS): .force | 
|---|
| 1802 | !  endif | 
|---|
| 1803 | ! endif | 
|---|
| 1804 | !endif | 
|---|
| 1805 |  | 
|---|