Changeset 353 for trunk/kBuild/header.kmk
- Timestamp:
- Dec 12, 2005, 4:36:07 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kBuild/header.kmk
r329 r353 4 4 # kBuild - File included at top of makefile. 5 5 # 6 # Copyright (c) 2004 knut st. osmundsen <bird-srcspam@anduin.net>6 # Copyright (c) 2004-2005 knut st. osmundsen <bird-srcspam@anduin.net> 7 7 # 8 8 # … … 119 119 120 120 # Fill in defaults if needed. 121 ifndef BUILD_PLATFORM_ARCH 121 ifndef BUILD_PLATFORM_ARCH 122 122 BUILD_PLATFORM_ARCH := x86 123 123 endif … … 234 234 PATH_OUT := $(PATH_OUT_BASE)/$(BUILD_TARGET)/$(BUILD_TARGET_ARCH)/$(BUILD_TYPE) 235 235 endif 236 endif # !x86 236 endif # !x86 237 237 endif # !define PATH_OUT 238 PATH_OBJ := $(PATH_OUT)/obj 239 PATH_TARGET := $(PATH_OBJ)/$(CURSUBDIR) 240 ifndef KBUILD_NEW_STUFF 241 PATH_BIN := $(PATH_OUT)/bin 242 PATH_LIB := $(PATH_OUT)/lib 243 PATH_DOC := $(PATH_ROOT)/out/doc 244 else 245 PATH_INS := $(PATH_OUT) 246 PATH_BIN := $(PATH_INS)/bin 247 PATH_DLL := $(PATH_INS)/bin 248 PATH_LIB := $(PATH_INS)/lib 249 PATH_DOC := $(PATH_INS)/doc 250 endif 238 PATH_OBJ = $(PATH_OUT)/obj 239 PATH_TARGET = $(PATH_OBJ)/$(CURSUBDIR) 240 PATH_INS = $(PATH_OUT) 241 PATH_BIN = $(PATH_INS)/bin 242 PATH_DLL = $(PATH_INS)/bin 243 PATH_SYS = $(PATH_INS)/bin 244 PATH_LIB = $(PATH_INS)/lib 245 PATH_DOC = $(PATH_INS)/doc 251 246 252 247 # Usually kBuild is external to the source tree. … … 348 343 endif 349 344 350 # Standard Unix shell utils .345 # Standard Unix shell utils 351 346 ifdef KMK_BUILTIN 352 347 ECHO := kmk_builtin_echo … … 359 354 RM := $(PATH_TOOLS)/rm$(HOSTSUFF_EXE) 360 355 CP := $(PATH_TOOLS)/cp$(HOSTSUFF_EXE) 356 APPEND := $(PATH_TOOLS)/append$(HOSTSUFF_EXE) 361 357 endif 362 358 CP_EXT := $(PATH_TOOLS)/cp$(HOSTSUFF_EXE) … … 364 360 SED := $(PATH_TOOLS)/sed$(HOSTSUFF_EXE) 365 361 CAT := $(PATH_TOOLS)/cat$(HOSTSUFF_EXE) 362 LN_SYMLINK := $(CP) 363 #LN_SYMLINK := ln -s 366 364 # Bourn shell clone. 367 365 MAKESHELL := $(PATH_TOOLS)/ash$(HOSTSUFF_EXE) … … 369 367 export SHELL MAKESHELL 370 368 369 # kBuild utils. 370 ifeq ($(filter append,$(KMK_BUILTIN)),append) 371 APPEND := kmk_builtin_append 372 else 373 APPEND := $(PATH_TOOLS)/append$(HOSTSUFF_EXE) 374 endif 375 371 376 372 377 # … … 410 415 $(path)))) 411 416 endif 412 417 413 418 ## DIRDEP - make create directory dependencies. 414 419 # 415 420 # @param $1 The paths to the directories which must be created. 416 DIRDEP = $(foreach path,$(1),$(path)/.dir_created) 421 ifeq ($(BUILD_PLATFORM),win32) 422 DIRDEP = $(patsubst %/,%,$(1)) 423 else 424 DIRDEP = $(foreach path,$(patsubst %/,%,$(1)),$(path)/) 425 endif 417 426 418 427 … … 428 437 CYGPATHMIXED = $(1) 429 438 endif 439 440 # 441 # Initialize some of the globals which the Config.kmk and 442 # others can add stuff to if they like for processing in the footer. 443 # 444 445 ## ALL_TARGET 446 # This is the list of all targets. 447 ALL_TARGETS := 448 449 ## TEMPLATE_PATHS 450 # List a paths (separated by space) where templates can be found. 451 TEMPLATE_PATHS := 452 453 ## TOOL_PATHS 454 # List of paths (separated by space) where tools can be found. 455 TOOL_PATHS := 456 457 ## SDK_PATHS 458 # List of paths (separated by space) where SDKs can be found. 459 SDK_PATHS := 460 461 ## Proritized list of the default makefile when walking subdirectories. 462 # The user can overload this list. 463 DEFAULT_MAKEFILE := Makefile.kmk makefile.kmk Makefile makefile 464 465 ## PROPS_SINGLE 466 # The list of non-accumulative target properties. 467 # A Config.kmk file can add it's own properties to this list and kBuild 468 # will do the necessary inheritance from templates to targets. 469 PROPS_SINGLE := TOOL ARTOOL CTOOL CXXTOOL ASTOOL LDTOOL INST NOINST 470 471 ## PROPS_DEFERRED 472 # This list of non-accumulative target properties which are functions, 473 # and thus should not be expanded until the very last moment. 474 PROPS_DEFERRED := INSTFUN INSTALLER 475 476 ## PROPS_ACCUMULATE 477 # The list of accumulative target properties. 478 # A Config.kmk file can add it's own properties to this list and kBuild 479 # will do the necessary inheritance from templates to targets. 480 PROPS_ACCUMULATE := \ 481 SDKS DEFS INCS SOURCES \ 482 COPTS CFLAGS CDEFS CINCS CXXOPTS CXXFLAGS CXXDEFS CXXINCS \ 483 ASOPTS ASFLAGS ASDEFS ASINCS \ 484 LDFLAGS LIBS LIBPATH \ 485 BLD_TYPE BLD_TRG BLD_TRG_ARCH BLD_TRG_CPU \ 486 SYSSUFF EXESUFF DLLSUFF LIBSUFF ARLIBSUFF \ 487 488 489 ## PROPS_TOOLS 490 # This is a subset of the other PROPS 491 PROPS_TOOLS := TOOL CTOOL CXXTOOL ASTOOL ARTOOL LDTOOL 492 493 494 # 495 # Pass configuration. 496 # 497 # The PASS_<passname>_trgs variable is listing the targets. 498 # The PASS_<passname>_vars variable is listing the target variables. 499 # The PASS_<passname>_pass variable is the lowercased passname. 500 # 501 502 ## PASS: bldprogs 503 # This pass builds targets which are required for building the rest. 504 PASS_BLDPROGS := Build Programs 505 PASS_BLDPROGS_trgs := 506 PASS_BLDPROGS_vars := _BLDPROGS 507 PASS_BLDPROGS_pass := bldprogs 508 509 ## PASS: libraries 510 # This pass builds library targets. 511 PASS_LIBRARIES := Libraries 512 PASS_LIBRARIES_trgs := 513 PASS_LIBRARIES_vars := _LIBS _IMPORT_LIBS _OTHER_LIBRARIES 514 PASS_LIBRARIES_pass := libraries 515 516 ## PASS: binaries 517 # This pass builds dll targets. 518 PASS_DLLS := DLLs 519 PASS_DLLS_trgs := 520 PASS_DLLS_vars := _DLLS _OTHER_DLLS 521 PASS_DLLS_pass := dlls 522 523 ## PASS: binaries 524 # This pass builds binary targets, i.e. programs, system modules and stuff. 525 PASS_BINARIES := Programs 526 PASS_BINARIES_trgs := 527 PASS_BINARIES_vars := _PROGRAMS _SYSMODS _OTHER_BINARIES 528 PASS_BINARIES_pass := binaries 529 530 ## PASS: others 531 # This pass builds other targets. 532 PASS_OTHERS := Other Stuff 533 PASS_OTHERS_trgs := 534 PASS_OTHERS_vars := _OTHERS 535 PASS_OTHERS_pass := others 536 537 ## PASS: install 538 # This pass installs the built entities to a sandbox area. 539 PASS_INSTALLS := Install 540 PASS_INSTALLS_trgs := 541 PASS_INSTALLS_vars := _INSTALLS 542 PASS_INSTALLS_pass := installs 543 544 ## PASS: packing 545 # This pass processes custom packing rules. 546 PASS_PACKING := Packing 547 PASS_PACKING_trgs := packing 548 PASS_PACKING_vars := 549 PASS_PACKING_pass := packing 550 551 ## PASS: clean 552 # This pass removes all generated files. 553 PASS_CLEAN := Clean 554 PASS_CLEAN_trgs := do-clean 555 PASS_CLEAN_vars := 556 PASS_CLEAN_pass := clean 557 # alias 558 clean: pass_clean 559 560 ## PASS: nothing 561 # This pass just walks the tree. 562 PASS_NOTHING := Nothing 563 PASS_NOTHING_trgs := do-nothing 564 PASS_NOTHING_vars := 565 PASS_NOTHING_pass := nothing 566 # alias 567 nothing: pass_nothing 568 569 ## DEFAULT_PASSES 570 # The default passes and their order. 571 DEFAULT_PASSES := BLDPROGS LIBRARIES DLLS BINARIES OTHERS INSTALLS 572 573 ## PASSES 574 # The passes that should be defined. This must include 575 # all passes mentioned by DEFAULT_PASSES. 576 PASSES := $(DEFAULT_PASSES) NOTHING CLEAN 577 430 578 431 579 #
Note:
See TracChangeset
for help on using the changeset viewer.