VirtualBox

Changeset 72 in kBuild


Ignore:
Timestamp:
May 30, 2004 6:16:41 AM (21 years ago)
Author:
bird
Message:

...

Location:
trunk/kBuild
Files:
9 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/kBuild/Examples/Outline/Makefile.kmk

    r68 r72  
    1515LIBRARIES = helloworld
    1616
    17 #include $(DEPTH)/kBuild/footer.kMk
     17include $(DEPTH)/kBuild/footer.kMk
    1818       
    1919ok:
  • trunk/kBuild/cfg/x86.win32.vc2003.kmk

    r66 r72  
    3131X86_WIN32_VC2003_CC_RELEASE         := -Ogitb2 -Oy-
    3232X86_WIN32_VC2003_CC_DEBUG           := -DDEBUG=1 -Od
    33 X86_WIN32_VC2003_CC_WARN            := -W4
     33X86_WIN32_VC2003_CC_WARN            := -W3
    3434X86_WIN32_VC2003_CC_WARN_LOW        := -W2
    3535X86_WIN32_VC2003_CC_WARN_ALL        := -Wall
     
    4040X86_WIN32_VC2003_CXX_RELEASE        := -Ogitb2 -Oy-
    4141X86_WIN32_VC2003_CXX_DEBUG          := -DDEBUG=1 -Od
    42 X86_WIN32_VC2003_CXX_WARN           := -W4
     42X86_WIN32_VC2003_CXX_WARN           := -W3
    4343X86_WIN32_VC2003_CXX_WARN_LOW       := -W2
    4444X86_WIN32_VC2003_CXX_WARN_ALL       := -Wall
     
    5959LIB_X86_WIN32_VC2003_MSCOREE        := $(PATH_X86_WIN32_VC2003_LIB)/lib/mscoree.lib
    6060LIB_X86_WIN32_VC2003_OLDNAMES       := $(PATH_X86_WIN32_VC2003_LIB)/lib/oldnames.lib
    61                          
     61                       
    6262
    6363# @todo implement options
    6464
    6565
    66 # C++ sources: $1 == target root dir, $2 == source, $3 == normalized main target
     66# C++ sources: $1 == output base name, $2 == source, $3 == normalized main target,
    6767define def_x86_win32_vc2003_compile_cxx
    6868$1/$(basename $2)$(SUFF_OBJ): $2 $(dir $1/$(basename $2))
  • trunk/kBuild/header.kmk

    r70 r72  
    3939SUFFIXES :=
    4040
    41 #
    42 # Environment unifications
     41
     42#
     43# Assert build type.
    4344#
    4445ifndef BUILD_TYPE
    4546ifndef BUILD_MODE
    46 $(error "define BUILD_TYPE you moron!")
     47$(error kBuild: You must define BUILD_TYPE!)
    4748endif
    4849BUILD_TYPE          := $(BUILD_MODE)
    4950endif
    50 
    51 
    52 #
    53 # .
    54 #
    55 PATH_ROOT := $(CURDIR)
    56 define def_root_dir
    57 PATH_ROOT := $(dir $(PATH_ROOT))
    58 endef
    59 PATH_ROOT
     51ifeq ($(BUILD_TYPE),DEBUG)
     52BUILD_TYPE          := debug
     53endif
     54ifeq ($(BUILD_TYPE),RELEASE)
     55BUILD_TYPE          := release
     56endif
     57ifeq ($(BUILD_TYPE),PROFILE)
     58BUILD_TYPE          := profile
     59endif
     60
     61
     62#
     63# Assert build platform.
     64#
     65_BUILD_PLATFORM_OK  := 0
     66# OS/2
     67ifeq ($(BUILD_PLATFORM),OS2)
     68BUILD_PLATFORM      := os2
     69endif
     70ifeq ($(BUILD_PLATFORM),os2)
     71_BUILD_PLATFORM_OK  := 1
     72endif
     73
     74# Linux
     75ifeq ($(BUILD_PLATFORM),LINUX)
     76BUILD_PLATFORM      := linux
     77endif
     78ifeq ($(BUILD_PLATFORM),linux)
     79_BUILD_PLATFORM_OK  := 1
     80endif
     81
     82# Win32
     83ifeq ($(BUILD_PLATFORM),WIN32)
     84BUILD_PLATFORM      := win32
     85endif
     86ifeq ($(BUILD_PLATFORM),WIN32)
     87_BUILD_PLATFORM_OK  := 1
     88endif
     89
     90ifeq ($(_BUILD_PLATFORM_OK),0)
     91$(error kBuild: BUILD_PLATFORM value '$(BUILD_PLATFORM)' was not recongized!)
     92endif
     93
     94
     95#
     96# Assert target platform.
     97#
     98ifndef BUILD_TARGET
     99# not defined, set to the same as build platform
     100BUILD_TARGET        := $(BUILD_PLATFORM)
     101else
     102_BUILD_TARGET_OK    := 0
     103# OS/2
     104ifeq ($(BUILD_TARGET),OS2)
     105BUILD_TARGET        := os2
     106endif
     107ifeq ($(BUILD_TARGET),os2)
     108_BUILD_TARGET_OK    := 1
     109endif
     110
     111# Linux
     112ifeq ($(BUILD_TARGET),LINUX)
     113BUILD_TARGET        := linux
     114endif
     115ifeq ($(BUILD_TARGET),linux)
     116_BUILD_TARGET_OK    := 1
     117endif
     118
     119# Win32
     120ifeq ($(BUILD_TARGET),WIN32)
     121BUILD_TARGET        := win32
     122endif
     123ifeq ($(BUILD_TARGET),WIN32)
     124_BUILD_TARGET_OK    := 1
     125endif
     126
     127ifeq ($(_BUILD_TARGET_OK),0)
     128$(error kBuild: BUILD_TARGET value '$(BUILD_TARGET)' was not recongized!)
     129endif
     130endif
     131
    60132
    61133#
     
    69141endif
    70142# Subdirectory relative to the root.
    71 DIR_DEPTH           := $(patsubst $(PATH_ROOT)/%,%,$(CURDIR))
     143CURSUBDIR           := $(patsubst $(PATH_ROOT)/%,%,$(CURDIR))
    72144# Output directories.
    73145PATH_OUT            := $(PATH_ROOT)/out/$(BUILD_TARGET)/$(BUILD_TYPE)
     
    76148PATH_LIB            := $(PATH_OUT)/lib
    77149PATH_DOC            := $(PATH_ROOT)/out/doc
    78 PATH_TARGET          = $(PATH_OUT)/$(DIR_DEPTH)
     150PATH_TARGET         := $(PATH_OBJ)/$(CURSUBDIR)
    79151
    80152# Usually kBuild is external to the source tree.
     
    91163FILE_KBUILD_FOOTER  := $(PATH_KBUILD)/footer.kmk
    92164
     165SUFF_DEP            := .dep
     166
    93167
    94168#
     
    99173
    100174#
    101 # PLATFORMS (host)
    102 #
    103 _BUILD_PLATFORM_OK  := 0
     175# Build platform setup.
     176#
    104177# OS/2
    105 ifeq ($(BUILD_PLATFORM),OS2)
    106 _BUILD_PLATFORM_OK  := 1
    107 ifndef BUILD_TARGET
    108 BUILD_TARGET        := OS2
    109 endif
     178ifeq ($(BUILD_PLATFORM),os2)
    110179PATH_TOOLS          := $(PATH_TOOLS_OS2)
    111180EXEC_X86_WIN32      := $(PATH_TOOLS)/bin/innopec.exe
     
    114183
    115184# Linux
    116 ifeq ($(BUILD_PLATFORM),LINUX)
    117 _BUILD_PLATFORM_OK  := 1
    118 ifndef BUILD_TARGET
    119 BUILD_TARGET        := LINUX
    120 endif
     185ifeq ($(BUILD_PLATFORM),linux)
    121186PATH_TOOLS          := $(PATH_TOOLS_LNX)
    122187EXEC_X86_WIN32      := wine
     
    125190
    126191# Win32
    127 ifeq ($(BUILD_PLATFORM),WIN32)
    128 ifndef BUILD_TARGET
    129 BUILD_TARGET        := WIN32
    130 endif
    131 _BUILD_PLATFORM_OK  := 1
     192ifeq ($(BUILD_PLATFORM),win32)
    132193PATH_TOOLS          := $(PATH_TOOLS_W32)
    133194EXEC_X86_WIN32      :=
    134195HOSTSUFF_EXE        := .exe
    135 endif
    136 
    137 # assert build platform
    138 ifeq ($(_BUILD_PLATFORM_OK),0)
    139 $(error "BUILD_PLATFORM value '$(BUILD_PLATFORM)' was not recongized")
    140196endif
    141197
     
    180236
    181237# end-of-file-content
    182 __header_kmk__  := 1
     238__header_kmk__ := 1
    183239endif # __header_kmk__
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette