Changeset 129 for trunk/kBuild
- Timestamp:
- Jun 29, 2004, 1:55:07 PM (21 years ago)
- Location:
- trunk/kBuild
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kBuild/header.kmk
r125 r129 144 144 BUILD_TARGET_CPU := i586 145 145 146 #147 # Cygwin kludge.148 #149 ifneq ($(patsubst /cygdrive/%,%,$(CURDIR)),$(CURDIR))150 CYGPATHMIXED = $(foreach path,$(1)\151 ,$(if $(patsubst /cygdrive/%,,$(path)),$(path),$(patsubst $(strip $(firstword $(subst /, ,$(patsubst /cygdrive/%,%,$(path)))))/%,$(strip $(firstword $(subst /, ,$(patsubst /cygdrive/%,%,$(path))))):/%,$(patsubst /cygdrive/%,%,$(path)))))152 else153 CYGPATHMIXED = $(1)154 endif155 146 156 147 # … … 294 285 endif 295 286 287 ## ABSPATH - makes a path absolute. 288 # This implementation is clumsy and doesn't resolve '..' and '.' components. 289 # 290 # @param $1 The paths to make absolute. 291 ABSPATH = $(foreach path,$(1)\ 292 ,$(strip $(if $(subst <,,$(firstword $(subst /, ,<$(path)))),\ 293 $(if $(patsubst %:,,$(firstword $(subst :,: ,$(path)))),$(PATH_CURRENT)/$(path),$(path)),\ 294 $(path)))) 295 296 ## Cygwin kludge. 297 # This converts /cygdrive/x/% to x:%. 298 # 299 # @param $1 The paths to make native. 300 # @remark This macro is pretty much obsolete since we don't use cygwin base make. 301 ifneq ($(patsubst /cygdrive/%,%,$(CURDIR)),$(CURDIR)) 302 CYGPATHMIXED = $(foreach path,$(1)\ 303 ,$(if $(patsubst /cygdrive/%,,$(path)),$(path),$(patsubst $(strip $(firstword $(subst /, ,$(patsubst /cygdrive/%,%,$(path)))))/%,$(strip $(firstword $(subst /, ,$(patsubst /cygdrive/%,%,$(path))))):/%,$(patsubst /cygdrive/%,%,$(path))))) 304 else 305 CYGPATHMIXED = $(1) 306 endif 307 296 308 # 297 309 # This is how we find the closest config.kmk. -
trunk/kBuild/tools/GCC.kmk
r77 r129 80 80 -Wp,-MD,$(dep) -Wp,-MT,$$@ \ 81 81 -o $$@\ 82 $( PATH_CURRENT)/$(source)82 $(call ABSPATH,$(source)) 83 83 84 84 endef … … 99 99 define TOOL_GCC_COMPILE_CXX 100 100 #$ (warning dbg: TOOL_GCC_COMPILE_CXX: target=$(target) source=$(source) obj=$(obj) dep=$(dep) flags=$(flags) defs=$(defs) incs=$(incs) dirdep=$(dirdep) outbase=$(outbase) objsuff=$(objsuff)) 101 $(obj): $(dirdep) $( PATH_CURRENT)/$(source)101 $(obj): $(dirdep) $(source) 102 102 $(call MSG_L2,Compiling $$@ using GCC) 103 103 $(TOOL_GCC_CXX) -c\ … … 105 105 -Wp,-MD,$(dep) -Wp,-MT,$$@ \ 106 106 -o $$@\ 107 $( PATH_CURRENT)/$(source)107 $(call ABSPATH,$(source)) 108 108 109 109 endef -
trunk/kBuild/tools/GCC3.kmk
r126 r129 79 79 -Wp,-MD,$(dep) -Wp,-MT,$$@ \ 80 80 -o $$@\ 81 $( source)81 $(call ABSPATH,$(source)) 82 82 83 83 endef … … 104 104 -Wp,-MD,$(dep) -Wp,-MT,$$@ \ 105 105 -o $$@\ 106 $( source)106 $(call ABSPATH,$(source)) 107 107 108 108 endef -
trunk/kBuild/tools/MINGW32.kmk
r128 r129 28 28 29 29 # find latest installed version 30 ifndef PATH_TOOL_MINGW32 30 ifndef PATH_TOOL_MINGW32 31 31 PATH_TOOL_MINGW32 := $(sort $(wildcard $(PATH_DEV)/$(BUILD_PLATFORM_ARCH).$(BUILD_PLATFORM)/mingw32/v*.*)) 32 32 ifeq ($(PATH_TOOL_MINGW32),) … … 39 39 40 40 # figure out if it's native or needs a win32 launcher 41 _TOOL_MINGW32_PREFIX := 41 _TOOL_MINGW32_PREFIX := 42 42 ifneq ($(PATH_TOOL_MINGW32),) 43 43 _TOOL_MINGW32_PREFIX := $(PATH_TOOL_MINGW32)/bin/ … … 51 51 else 52 52 _TOOL_MINGW32_PREFIX := $(_TOOL_MINGW32_PREFIX)i386-mingw32msvc- 53 _TOOL_MINGW32_SUFF_EXE := 53 _TOOL_MINGW32_SUFF_EXE := 54 54 _TOOL_MINGW32_XCOMPILE := 1 55 55 endif … … 113 113 -Wp,-MD,$(dep) -Wp,-MT,$$@ \ 114 114 -o $$@\ 115 $( source)115 $(call ABSPATH,$(source)) 116 116 117 117 endef … … 138 138 -Wp,-MD,$(dep) -Wp,-MT,$$@ \ 139 139 -o $$@\ 140 $( source)140 $(call ABSPATH,$(source)) 141 141 142 142 endef -
trunk/kBuild/tools/NASM.kmk
r99 r129 56 56 define TOOL_NASM_COMPILE_AS 57 57 #$ (warning dbg: TOOL_NASM_COMPILE_AS: target=$(target) source=$(source) obj=$(obj) dep=$(dep) flags=$(flags) defs=$(defs) incs=$(incs) dirdep=$(dirdep) outbase=$(outbase) objsuff=$(objsuff)) 58 $(obj): $(dirdep) $( PATH_CURRENT)/$(source)58 $(obj): $(dirdep) $(source) 59 59 $(call MSG_L2,Compiling $$@ using NASM) 60 60 $(TOOL_NASM_AS) \ 61 $(flags) $(addsuffix /,$(addprefix -i, $( call CYGPATHMIXED,$(incs)))) $(addprefix -D, $(defs))\62 -l $( call CYGPATHMIXED,$(outbase).lst)\63 -o $( call CYGPATHMIXED,$(obj)) \64 $(call CYGPATHMIXED,$(PATH_CURRENT)/$(source))61 $(flags) $(addsuffix /,$(addprefix -i, $(incs))) $(addprefix -D, $(defs))\ 62 -l $(outbase).lst \ 63 -o $(obj) \ 64 $(call ABSPATH,$(source)) 65 65 _OUT_FILES += $(outbase).lst 66 66 -
trunk/kBuild/tools/VCC70.kmk
r126 r129 75 75 define TOOL_VCC70_COMPILE_C 76 76 #$ (warning dbg: TOOL_VCC70_COMPILE_C: target=$(target) source=$(source) obj=$(obj) dep=$(dep) flags=$(flags) defs=$(defs) incs=$(incs) dirdep=$(dirdep) outbase=$(outbase) objsuff=$(objsuff)) 77 $(obj): $(dirdep) $( PATH_CURRENT)/$(source)77 $(obj): $(dirdep) $(source) 78 78 $(call MSG_L2,Compiling $$@ using VCC70) 79 79 $(TOOL_VCC70_CC) -c\ 80 $(flags) $(addprefix -I, $( call CYGPATHMIXED,$(incs))) $(addprefix -D, $(defs))\81 -Fd$( call CYGPATHMIXED,$(outbase).pdb)\82 -Fo$( call CYGPATHMIXED,$(obj))\83 $(subst /,\\,$(call CYGPATHMIXED,$(DRV_WINEROOT)$(PATH_CURRENT)/$(source)))80 $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\ 81 -Fd$(outbase).pdb \ 82 -Fo$(obj)\ 83 $(subst /,\\,$(call ABSPATH,$(source))) 84 84 _OUT_FILES += $(outbase).pdb 85 85 … … 101 101 define TOOL_VCC70_COMPILE_CXX 102 102 #$ (warning dbg: TOOL_VCC70_COMPILE_CXX: target=$(target) source=$(source) obj=$(obj) dep=$(dep) flags=$(flags) defs=$(defs) incs=$(incs) dirdep=$(dirdep) outbase=$(outbase) objsuff=$(objsuff)) 103 $(obj): $(dirdep) $( PATH_CURRENT)/$(source)103 $(obj): $(dirdep) $(source) 104 104 $(call MSG_L2,Compiling $$@ using VCC70) 105 105 $(TOOL_VCC70_CXX) -c\ 106 $(flags) $(addprefix -I, $( call CYGPATHMIXED,$(incs))) $(addprefix -D, $(defs))\107 -Fd$( call CYGPATHMIXED,$(outbase).pdb)\108 -Fo$( call CYGPATHMIXED,$(obj))\109 $(subst /,\\,$(call CYGPATHMIXED,$(DRV_WINEROOT)$(PATH_CURRENT)/$(source)))106 $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\ 107 -Fd$(outbase).pdb \ 108 -Fo$(obj)\ 109 $(subst /,\\,$(call ABSPATH,$(source))) 110 110 _OUT_FILES += $(outbase).pdb 111 111 … … 128 128 $(call MSG_L1,Creating Library $$@) 129 129 $(RM) -f $$@ 130 $(TOOL_VCC70_AR) $(flags) /OUT:$( call CYGPATHMIXED,$(lib)) $(subst /,\\,$(call CYGPATHMIXED,$(objs))) \131 $(foreach def,$(filter %.def,$(othersrc)), /DEF:$( call CYGPATHMIXED,$(def)))130 $(TOOL_VCC70_AR) $(flags) /OUT:$(lib) $(subst /,\\,$(objs)) \ 131 $(foreach def,$(filter %.def,$(othersrc)), /DEF:$(def)) 132 132 133 133 endef … … 156 156 endif 157 157 $(TOOL_VCC70_LD) $(flags) \ 158 /OUT:$( call CYGPATHMIXED,$(exe)) \158 /OUT:$(exe) \ 159 159 /MAPINFO:EXPORTS /MAPINFO:LINES \ 160 /MAP:$( call CYGPATHMIXED,$(outbase).map)\161 $(subst /,\\,$( call CYGPATHMIXED,$(objs))) \162 $(subst /,\\,$( call CYGPATHMIXED,$(libs)))160 /MAP:$(outbase).map \ 161 $(subst /,\\,$(objs)) \ 162 $(subst /,\\,$(libs)) 163 163 $(MKDIR) -p $(PATH_BIN) 164 164 $(CP) $$@ $(PATH_BIN)/ … … 193 193 endif 194 194 $(TOOL_VCC70_LD) $(flags) \ 195 /OUT:$( call CYGPATHMIXED,$(sys)) \195 /OUT:$(sys) \ 196 196 /MAPINFO:EXPORTS /MAPINFO:LINES \ 197 /MAP:$( call CYGPATHMIXED,$(outbase).map)\198 $(subst /,\\,$( call CYGPATHMIXED,$(objs))) \199 $(subst /,\\,$( call CYGPATHMIXED,$(libs)))197 /MAP:$(outbase).map \ 198 $(subst /,\\,$(objs)) \ 199 $(subst /,\\,$(libs)) 200 200 $(MKDIR) -p $(PATH_BIN) 201 201 $(CP) $$@ $(PATH_BIN)/
Note:
See TracChangeset
for help on using the changeset viewer.