Changeset 72 in kBuild
- Timestamp:
- May 30, 2004 6:16:41 AM (21 years ago)
- Location:
- trunk/kBuild
- Files:
-
- 9 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kBuild/Examples/Outline/Makefile.kmk
r68 r72 15 15 LIBRARIES = helloworld 16 16 17 #include $(DEPTH)/kBuild/footer.kMk17 include $(DEPTH)/kBuild/footer.kMk 18 18 19 19 ok: -
trunk/kBuild/cfg/x86.win32.vc2003.kmk
r66 r72 31 31 X86_WIN32_VC2003_CC_RELEASE := -Ogitb2 -Oy- 32 32 X86_WIN32_VC2003_CC_DEBUG := -DDEBUG=1 -Od 33 X86_WIN32_VC2003_CC_WARN := -W 433 X86_WIN32_VC2003_CC_WARN := -W3 34 34 X86_WIN32_VC2003_CC_WARN_LOW := -W2 35 35 X86_WIN32_VC2003_CC_WARN_ALL := -Wall … … 40 40 X86_WIN32_VC2003_CXX_RELEASE := -Ogitb2 -Oy- 41 41 X86_WIN32_VC2003_CXX_DEBUG := -DDEBUG=1 -Od 42 X86_WIN32_VC2003_CXX_WARN := -W 442 X86_WIN32_VC2003_CXX_WARN := -W3 43 43 X86_WIN32_VC2003_CXX_WARN_LOW := -W2 44 44 X86_WIN32_VC2003_CXX_WARN_ALL := -Wall … … 59 59 LIB_X86_WIN32_VC2003_MSCOREE := $(PATH_X86_WIN32_VC2003_LIB)/lib/mscoree.lib 60 60 LIB_X86_WIN32_VC2003_OLDNAMES := $(PATH_X86_WIN32_VC2003_LIB)/lib/oldnames.lib 61 61 62 62 63 63 # @todo implement options 64 64 65 65 66 # C++ sources: $1 == target root dir, $2 == source, $3 == normalized main target66 # C++ sources: $1 == output base name, $2 == source, $3 == normalized main target, 67 67 define def_x86_win32_vc2003_compile_cxx 68 68 $1/$(basename $2)$(SUFF_OBJ): $2 $(dir $1/$(basename $2)) -
trunk/kBuild/header.kmk
r70 r72 39 39 SUFFIXES := 40 40 41 # 42 # Environment unifications 41 42 # 43 # Assert build type. 43 44 # 44 45 ifndef BUILD_TYPE 45 46 ifndef BUILD_MODE 46 $(error "define BUILD_TYPE you moron!")47 $(error kBuild: You must define BUILD_TYPE!) 47 48 endif 48 49 BUILD_TYPE := $(BUILD_MODE) 49 50 endif 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 51 ifeq ($(BUILD_TYPE),DEBUG) 52 BUILD_TYPE := debug 53 endif 54 ifeq ($(BUILD_TYPE),RELEASE) 55 BUILD_TYPE := release 56 endif 57 ifeq ($(BUILD_TYPE),PROFILE) 58 BUILD_TYPE := profile 59 endif 60 61 62 # 63 # Assert build platform. 64 # 65 _BUILD_PLATFORM_OK := 0 66 # OS/2 67 ifeq ($(BUILD_PLATFORM),OS2) 68 BUILD_PLATFORM := os2 69 endif 70 ifeq ($(BUILD_PLATFORM),os2) 71 _BUILD_PLATFORM_OK := 1 72 endif 73 74 # Linux 75 ifeq ($(BUILD_PLATFORM),LINUX) 76 BUILD_PLATFORM := linux 77 endif 78 ifeq ($(BUILD_PLATFORM),linux) 79 _BUILD_PLATFORM_OK := 1 80 endif 81 82 # Win32 83 ifeq ($(BUILD_PLATFORM),WIN32) 84 BUILD_PLATFORM := win32 85 endif 86 ifeq ($(BUILD_PLATFORM),WIN32) 87 _BUILD_PLATFORM_OK := 1 88 endif 89 90 ifeq ($(_BUILD_PLATFORM_OK),0) 91 $(error kBuild: BUILD_PLATFORM value '$(BUILD_PLATFORM)' was not recongized!) 92 endif 93 94 95 # 96 # Assert target platform. 97 # 98 ifndef BUILD_TARGET 99 # not defined, set to the same as build platform 100 BUILD_TARGET := $(BUILD_PLATFORM) 101 else 102 _BUILD_TARGET_OK := 0 103 # OS/2 104 ifeq ($(BUILD_TARGET),OS2) 105 BUILD_TARGET := os2 106 endif 107 ifeq ($(BUILD_TARGET),os2) 108 _BUILD_TARGET_OK := 1 109 endif 110 111 # Linux 112 ifeq ($(BUILD_TARGET),LINUX) 113 BUILD_TARGET := linux 114 endif 115 ifeq ($(BUILD_TARGET),linux) 116 _BUILD_TARGET_OK := 1 117 endif 118 119 # Win32 120 ifeq ($(BUILD_TARGET),WIN32) 121 BUILD_TARGET := win32 122 endif 123 ifeq ($(BUILD_TARGET),WIN32) 124 _BUILD_TARGET_OK := 1 125 endif 126 127 ifeq ($(_BUILD_TARGET_OK),0) 128 $(error kBuild: BUILD_TARGET value '$(BUILD_TARGET)' was not recongized!) 129 endif 130 endif 131 60 132 61 133 # … … 69 141 endif 70 142 # Subdirectory relative to the root. 71 DIR_DEPTH:= $(patsubst $(PATH_ROOT)/%,%,$(CURDIR))143 CURSUBDIR := $(patsubst $(PATH_ROOT)/%,%,$(CURDIR)) 72 144 # Output directories. 73 145 PATH_OUT := $(PATH_ROOT)/out/$(BUILD_TARGET)/$(BUILD_TYPE) … … 76 148 PATH_LIB := $(PATH_OUT)/lib 77 149 PATH_DOC := $(PATH_ROOT)/out/doc 78 PATH_TARGET = $(PATH_OUT)/$(DIR_DEPTH)150 PATH_TARGET := $(PATH_OBJ)/$(CURSUBDIR) 79 151 80 152 # Usually kBuild is external to the source tree. … … 91 163 FILE_KBUILD_FOOTER := $(PATH_KBUILD)/footer.kmk 92 164 165 SUFF_DEP := .dep 166 93 167 94 168 # … … 99 173 100 174 # 101 # PLATFORMS (host) 102 # 103 _BUILD_PLATFORM_OK := 0 175 # Build platform setup. 176 # 104 177 # OS/2 105 ifeq ($(BUILD_PLATFORM),OS2) 106 _BUILD_PLATFORM_OK := 1 107 ifndef BUILD_TARGET 108 BUILD_TARGET := OS2 109 endif 178 ifeq ($(BUILD_PLATFORM),os2) 110 179 PATH_TOOLS := $(PATH_TOOLS_OS2) 111 180 EXEC_X86_WIN32 := $(PATH_TOOLS)/bin/innopec.exe … … 114 183 115 184 # Linux 116 ifeq ($(BUILD_PLATFORM),LINUX) 117 _BUILD_PLATFORM_OK := 1 118 ifndef BUILD_TARGET 119 BUILD_TARGET := LINUX 120 endif 185 ifeq ($(BUILD_PLATFORM),linux) 121 186 PATH_TOOLS := $(PATH_TOOLS_LNX) 122 187 EXEC_X86_WIN32 := wine … … 125 190 126 191 # Win32 127 ifeq ($(BUILD_PLATFORM),WIN32) 128 ifndef BUILD_TARGET 129 BUILD_TARGET := WIN32 130 endif 131 _BUILD_PLATFORM_OK := 1 192 ifeq ($(BUILD_PLATFORM),win32) 132 193 PATH_TOOLS := $(PATH_TOOLS_W32) 133 194 EXEC_X86_WIN32 := 134 195 HOSTSUFF_EXE := .exe 135 endif136 137 # assert build platform138 ifeq ($(_BUILD_PLATFORM_OK),0)139 $(error "BUILD_PLATFORM value '$(BUILD_PLATFORM)' was not recongized")140 196 endif 141 197 … … 180 236 181 237 # end-of-file-content 182 __header_kmk__ 238 __header_kmk__ := 1 183 239 endif # __header_kmk__
Note:
See TracChangeset
for help on using the changeset viewer.