Changeset 380 for trunk/kBuild/tools/VCC70.kmk
- Timestamp:
- Dec 18, 2005, 2:52:47 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kBuild/tools/VCC70.kmk
r353 r380 82 82 # @param $(outbase) Output basename (full). Use this for list files and such. 83 83 # @param $(objsuff) Object suffix. 84 define TOOL_VCC70_COMPILE_C 85 #$ (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)) 86 $(obj) $(call TOOL_VCC70_PDB, $(outbase)-obj): $(deps) $(source) | $(dirdep) 87 $(call MSG_L2,Compiling $$@ using VCC70) 84 TOOL_VCC70_COMPILE_C_OUTPUT = $(call TOOL_VCC70_PDB, $(outbase)-obj) 85 TOOL_VCC70_COMPILE_C_DEPEND = 86 TOOL_VCC70_COMPILE_C_DEPORD = 87 define TOOL_VCC70_COMPILE_C_CMDS 88 88 $(TOOL_VCC70_CC) -c\ 89 89 $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\ … … 95 95 $(subst /,\\,$(call ABSPATH,$(source)))\ 96 96 | $(DEP_PRE) -f -s -o $(dep) -t $(obj) - 97 _OUT_FILES += $(call TOOL_VCC70_PDB, $(outbase)-obj)98 99 97 endef 100 98 … … 113 111 # @param $(outbase) Output basename (full). Use this for list files and such. 114 112 # @param $(objsuff) Object suffix. 115 define TOOL_VCC70_COMPILE_CXX 116 #$ (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)) 117 $(obj) $(call TOOL_VCC70_PDB, $(outbase)-obj): $(deps) $(source) | $(dirdep) 118 $(call MSG_L2,Compiling $$@ using VCC70) 113 TOOL_VCC70_COMPILE_CXX_OUTPUT = $(call TOOL_VCC70_PDB, $(outbase)-obj) 114 TOOL_VCC70_COMPILE_CXX_DEPEND = 115 TOOL_VCC70_COMPILE_CXX_DEPORD = 116 define TOOL_VCC70_COMPILE_CXX_CMDS 119 117 $(TOOL_VCC70_CXX) -c\ 120 118 $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\ … … 126 124 $(subst /,\\,$(call ABSPATH,$(source)))\ 127 125 | $(DEP_PRE) -f -s -o $(dep) -t $(obj) - 128 _OUT_FILES += $(call TOOL_VCC70_PDB, $(outbase)-obj)129 130 126 endef 131 127 … … 133 129 ## Link library 134 130 # @param $(target) Normalized main target name. 135 # @param $( lib)Library name.131 # @param $(out) Library name. 136 132 # @param $(objs) Object files to put in the library. 137 133 # @param $(flags) Flags. 138 134 # @param $(dirdep) Directory creation dependency. 139 # @param $(deps) 135 # @param $(deps) Other dependencies. 140 136 # @param $(othersrc) Unhandled sources. 141 # 142 # @param $(outbase) Output basename (full). Use this for list files and such. 143 define TOOL_VCC70_LINK_LIBRARY 144 #$ (warning dbg: TOOL_VCC70_LINK_LIBRARY: target=$(target) lib=$(lib) objs=$(objs) deps=$(deps) flags=$(flags) dirdep=$(dirdep) outbase=$(outbase)) 145 $(lib) $(outbase).lst $(outbase).exp $(call TOOL_VCC70_PDB, $(outbase)): $(deps) $(objs) $(othersrc) | $(dirdep) 146 $(call MSG_L1,Creating Library $$@) 147 $(RM) -f $$@ 148 $(TOOL_VCC70_AR) $(flags) /OUT:$(lib) $(subst /,\\,$(objs) $(filter %.a %.lib,$(othersrc))) \ 137 # @param $(outbase) Output basename (full). Use this for list files and such. 138 # 139 TOOL_VCC70_LINK_LIBRARY_OUTPUT = $(outbase).lst $(outbase).exp $(call TOOL_VCC70_PDB, $(outbase)) 140 TOOL_VCC70_LINK_LIBRARY_DEPEND = $(othersrc) 141 TOOL_VCC70_LINK_LIBRARY_DEPORD = 142 define TOOL_VCC70_LINK_LIBRARY_CMDS 143 $(TOOL_VCC70_AR) $(flags) /OUT:$(out) $(subst /,\\,$(objs) $(filter %.a %.lib,$(othersrc))) \ 149 144 $(foreach def,$(filter %.def,$(othersrc)), /DEF:$(def)) 150 _OUT_FILES += $(outbase).lst $(outbase).exp $(call TOOL_VCC70_PDB, $(outbase))151 152 145 endef 153 146 … … 165 158 # @param $(custom_pre) Custom step invoked before linking. 166 159 # @param $(custom_post) Custom step invoked after linking. 167 # 168 # @param $(outbase) Output basename (full). Use this for list files and such. 169 define TOOL_VCC70_LINK_PROGRAM 170 #$ (warning dbg: TOOL_VCC70_LINK_PROGRAM: target=$(target) out=$(out) objs=$(objs) libs=$(libs) deps=$(deps) flags=$(flags) dirdep=$(dirdep) othersrc=$(othersrc) outbase=$(outbase)) 171 $(out) $(outbase).map $(outbase).lib $(outbase).exp $(call TOOL_VCC70_PDB, $(outbase)) $(outbase).ilk: \ 172 $(deps) $(objs) $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc) | $(dirdep) 173 $(call MSG_L1,Creating Program $$@) 174 ifneq ($(custom_pre),) 175 $(eval $(custom_pre)) 176 endif 160 # @param $(outbase) Output basename (full). Use this for list files and such. 161 # 162 TOOL_VCC70_LINK_PROGRAM_OUTPUT = $(outbase).map $(outbase).lib $(outbase).exp $(call TOOL_VCC70_PDB, $(outbase)) $(outbase).ilk 163 TOOL_VCC70_LINK_PROGRAM_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc) 164 TOOL_VCC70_LINK_PROGRAM_DEPORD = 165 define TOOL_VCC70_LINK_PROGRAM_CMDS 177 166 $(TOOL_VCC70_LD) $(flags) \ 178 167 /OUT:$(out) \ … … 184 173 $(subst /,\\,$(objs)) \ 185 174 $(subst /,\\,$(libs)) 186 ifneq ($(custom_post),)187 $(eval $(custom_post))188 endif189 _OUT_FILES += $(outbase).map $(outbase).lib $(outbase).exp $(call TOOL_VCC70_PDB, $(outbase)) $(outbase).ilk190 191 endef192 193 194 ## Link system module (windows aka driver, linux aka kernel module)195 # @param $(target) Normalized main target name.196 # @param $(out) System module name.197 # @param $(objs) Object files to link together.198 # @param $(libs) Libraries to search.199 # @param $(libpath) Library search paths.200 # @param $(flags) Flags.201 # @param $(dirdep) Directory creation dependency.202 # @param $(deps) Other dependencies.203 # @param $(othersrc) Unhandled sources.204 # @param $(custom_pre) Custom step invoked before linking.205 # @param $(custom_post) Custom step invoked after linking.206 #207 # @param $(outbase) Output basename (full). Use this for list files and such.208 define TOOL_VCC70_LINK_SYSMOD209 #$ (warning dbg: TOOL_VCC70_LINK_SYSMOD: target=$(target) out=$(out) objs=$(objs) libs=$(libs) deps=$(deps) flags=$(flags) dirdep=$(dirdep) othersrc=$(othersrc) outbase=$(outbase))210 $(out) $(outbase).map $(outbase).lib $(outbase).exp $(call TOOL_VCC70_PDB, $(outbase)) $(outbase).ilk: \211 $(deps) $(objs) $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc) | $(dirdep)212 $(call MSG_L1,Creating Program $$@)213 ifneq ($(custom_pre),)214 $(eval $(custom_pre))215 endif216 $(TOOL_VCC70_LD) $(flags) \217 /OUT:$(out) \218 /MAPINFO:EXPORTS /MAPINFO:LINES \219 /MAP:$(outbase).map \220 $(foreach def,$(filter %.def,$(othersrc)), /DEF:$(def)) \221 $(subst /,\\,$(filter %.exp %.res,$(othersrc))) \222 $(foreach p,$(libpath), /LIBPATH:$(p)) \223 $(subst /,\\,$(objs)) \224 $(subst /,\\,$(libs))225 ifneq ($(custom_post),)226 $(eval $(custom_post))227 endif228 _OUT_FILES += $(outbase).map $(outbase).lib $(outbase).exp $(call TOOL_VCC70_PDB, $(outbase)) $(outbase).ilk229 230 175 endef 231 176 … … 245 190 # 246 191 # @param $(outbase) Output basename (full). Use this for list files and such. 247 define TOOL_VCC70_LINK_DLL 248 #$ (warning dbg: TOOL_VCC70_LINK_DLL: target=$(target) out=$(out) objs=$(objs) libs=$(libs) deps=$(deps) flags=$(flags) dirdep=$(dirdep) othersrc=$(othersrc) outbase=$(outbase)) 249 $(out) $(outbase).map $(outbase).lib $(outbase).exp $(call TOOL_VCC70_PDB, $(outbase)) $(outbase).ilk: \ 250 $(deps) $(call DIRDEP,$(PATH_LIB)) $(objs) $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc) | $(dirdep) 251 $(call MSG_L1,Creating Program $$@) 252 ifneq ($(custom_pre),) 253 $(eval $(custom_pre)) 254 endif 192 TOOL_VCC70_LINK_DLL_OUTPUT = $(outbase).map $(outbase).lib $(outbase).exp $(call TOOL_VCC70_PDB, $(outbase)) $(outbase).ilk 193 TOOL_VCC70_LINK_DLL_DEPEND = $(objs) $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc) 194 TOOL_VCC70_LINK_DLL_DEPORD = $(call DIRDEP,$(PATH_LIB)) 195 define TOOL_VCC70_LINK_DLL_CMDS 255 196 $(TOOL_VCC70_LD) $(flags) \ 256 197 /OUT:$(out) \ … … 268 209 if test -f $(outbase).lib; then $(CP_EXT) $(outbase).lib $(PATH_LIB)/; fi 269 210 endif 270 ifneq ($(custom_post),) 271 $(eval $(custom_post)) 272 endif 273 _OUT_FILES += $(outbase).map $(outbase).lib $(outbase).exp $(call TOOL_VCC70_PDB, $(outbase)) $(outbase).ilk 274 _DIRS += $(PATH_LIB) 275 276 endef 277 211 $(eval _DIRS += $(PATH_LIB)) 212 endef 213 214 215 ## Link system module (windows aka driver, linux aka kernel module) 216 # @param $(target) Normalized main target name. 217 # @param $(out) System module name. 218 # @param $(objs) Object files to link together. 219 # @param $(libs) Libraries to search. 220 # @param $(libpath) Library search paths. 221 # @param $(flags) Flags. 222 # @param $(dirdep) Directory creation dependency. 223 # @param $(deps) Other dependencies. 224 # @param $(othersrc) Unhandled sources. 225 # @param $(custom_pre) Custom step invoked before linking. 226 # @param $(custom_post) Custom step invoked after linking. 227 # 228 # @param $(outbase) Output basename (full). Use this for list files and such. 229 TOOL_VCC70_LINK_SYSMOD_OUTPUT = $(outbase).map $(outbase).lib $(outbase).exp $(call TOOL_VCC70_PDB, $(outbase)) $(outbase).ilk 230 TOOL_VCC70_LINK_SYSMOD_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc) 231 TOOL_VCC70_LINK_SYSMOD_DEPORD = 232 define TOOL_VCC70_LINK_SYSMOD_CMDS 233 $(TOOL_VCC70_LD) $(flags) \ 234 /OUT:$(out) \ 235 /MAPINFO:EXPORTS /MAPINFO:LINES \ 236 /MAP:$(outbase).map \ 237 $(foreach def,$(filter %.def,$(othersrc)), /DEF:$(def)) \ 238 $(subst /,\\,$(filter %.exp %.res,$(othersrc))) \ 239 $(foreach p,$(libpath), /LIBPATH:$(p)) \ 240 $(subst /,\\,$(objs)) \ 241 $(subst /,\\,$(libs)) 242 endef 243
Note:
See TracChangeset
for help on using the changeset viewer.