Changeset 2065 for trunk/kBuild/tools
- Timestamp:
- Nov 17, 2008, 1:47:59 AM (17 years ago)
- Location:
- trunk/kBuild/tools
- Files:
-
- 4 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kBuild/tools/VAC308.kmk
r2064 r2065 33 33 34 34 TOOL_VAC308 := VisualAge for C++ v3.08 35 36 TOOL_VAC308_ENV_SETUP ?=37 35 38 36 # Determin VAC308 location. … … 57 55 endif 58 56 ifneq ($(PATH_TOOL_VAC308),) 59 TOOL_VAC308_PATHLESS := yes60 57 TOOL_VAC308_PATHLESS := 58 61 59 PATH_TOOL_VAC308_BIN ?= $(PATH_TOOL_VAC308)/bin 62 60 PATH_TOOL_VAC308_LIB ?= $(PATH_TOOL_VAC308)/lib … … 65 63 PATH_TOOL_VAC308_HELP ?= $(PATH_TOOL_VAC308)/help 66 64 PATH_TOOL_VAC308_LOCALE ?= $(PATH_TOOL_VAC308)/locale 67 68 TOOL_VAC308_ REDIRECT?= $(REDIRECT) \65 66 TOOL_VAC308_ENV_SETUP ?= $(REDIRECT) \ 69 67 -E 'BEGINLIBPATH=$(PATH_TOOL_VAC308_DLL);$(BEGINLIBPATH)' \ 70 68 -E 'DPATH=$(PATH_TOOL_VAC308_LOCALE);$(PATH_TOOL_VAC308_HELP);$(DPATH)' \ … … 72 70 -E 'INCLUDE=' \ 73 71 -- 74 TOOL_VAC308_CC ?= $( TOOL_VAC308_REDIRECT) $(PATH_TOOL_VAC308_BIN)/icc$(HOSTSUFF_EXE)75 TOOL_VAC308_CXX ?= $( TOOL_VAC308_REDIRECT) $(PATH_TOOL_VAC308_BIN)/icc$(HOSTSUFF_EXE)76 TOOL_VAC308_AR ?= $( TOOL_VAC308_REDIRECT) $(PATH_TOOL_VAC308_BIN)/ilib$(HOSTSUFF_EXE)77 TOOL_VAC308_LD ?= $( TOOL_VAC308_REDIRECT) $(PATH_TOOL_VAC308_BIN)/icc$(HOSTSUFF_EXE)78 TOOL_VAC308_RC ?= $( TOOL_VAC308_REDIRECT) $(PATH_TOOL_VAC308_BIN)/rc$(HOSTSUFF_EXE)72 TOOL_VAC308_CC ?= $(PATH_TOOL_VAC308_BIN)/icc$(HOSTSUFF_EXE) 73 TOOL_VAC308_CXX ?= $(PATH_TOOL_VAC308_BIN)/icc$(HOSTSUFF_EXE) 74 TOOL_VAC308_AR ?= $(PATH_TOOL_VAC308_BIN)/ilib$(HOSTSUFF_EXE) 75 TOOL_VAC308_LD ?= $(PATH_TOOL_VAC308_BIN)/icc$(HOSTSUFF_EXE) 76 TOOL_VAC308_RC ?= $(PATH_TOOL_VAC308_BIN)/rc$(HOSTSUFF_EXE) 79 77 80 78 else 81 79 # Pathless, relies on the environment. 82 TOOL_VAC308_PATHLESS := 80 TOOL_VAC308_PATHLESS := yes 81 TOOL_VAC308_ENV_SETUP ?= $(REDIRECT) \ 82 -E 'LIB=' \ 83 -E 'INCLUDE=' \ 84 -- 83 85 TOOL_VAC308_CC ?= icc$(HOSTSUFF_EXE) 84 86 TOOL_VAC308_CXX ?= icc$(HOSTSUFF_EXE) … … 122 124 123 125 124 ## Compile C source.125 # @param $(target) Normalized main target name.126 # @param $(source) Source filename (relative).127 # @param $(obj) Object file name. This shall be (re)created by the compilation.128 # @param $(dep) Dependcy file. This shall be (re)created by the compilation.129 # @param $(flags) Flags.130 # @param $(defs) Definitions. No -D or something.131 # @param $(incs) Includes. No -I or something.132 # @param $(dirdep) Directory creation dependency.133 # @param $(deps) Other dependencies.134 #135 # @param $(outbase) Output basename (full). Use this for list files and such.136 # @param $(objsuff) Object suffix.137 126 TOOL_VAC308_COMPILE_C_DEPEND = 138 127 TOOL_VAC308_COMPILE_C_DEPORD = 139 128 TOOL_VAC308_COMPILE_C_OUTPUT = 140 129 define TOOL_VAC308_COMPILE_C_CMDS 141 $(QUIET) $( TOOL_VAC308_ENV_SETUP) $(TOOL_VAC308_CC) -c\130 $(QUIET) $(call TOOL_VAC308_ENV_SETUP) $(TOOL_VAC308_CC) -c\ 142 131 $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\ 143 132 -Fo$(obj)\ 144 133 $(abspath $(source)) 145 $(QUIET) $( TOOL_VAC308_ENV_SETUP) $(TOOL_VAC308_CC) -P+ -Pd+ \134 $(QUIET) $(call TOOL_VAC308_ENV_SETUP) $(TOOL_VAC308_CC) -P+ -Pd+ \ 146 135 $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\ 147 136 $(abspath $(source)) \ … … 149 138 endef 150 139 151 152 ## Compile C++ source.153 # @param $(target) Normalized main target name.154 # @param $(source) Source filename (relative).155 # @param $(obj) Object file name. This shall be (re)created by the compilation.156 # @param $(dep) Dependcy file. This shall be (re)created by the compilation.157 # @param $(flags) Flags.158 # @param $(defs) Definitions. No -D or something.159 # @param $(incs) Includes. No -I or something.160 # @param $(dirdep) Directory creation dependency.161 # @param $(deps) Other dependencies.162 #163 # @param $(outbase) Output basename (full). Use this for list files and such.164 # @param $(objsuff) Object suffix.165 140 TOOL_VAC308_COMPILE_CXX_DEPEND = 166 141 TOOL_VAC308_COMPILE_CXX_DEPORD = 167 142 TOOL_VAC308_COMPILE_CXX_OUTPUT = 168 143 define TOOL_VAC308_COMPILE_CXX_CMDS 169 $(QUIET) $( TOOL_VAC308_ENV_SETUP) $(TOOL_VAC308_CXX) -c\144 $(QUIET) $(call TOOL_VAC308_ENV_SETUP) $(TOOL_VAC308_CXX) -c\ 170 145 $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\ 171 146 -Fo$(obj)\ 172 147 $(abspath $(source)) 173 $(QUIET) $( TOOL_VAC308_ENV_SETUP) $(TOOL_VAC308_CXX) -P+ -Pd+ \148 $(QUIET) $(call TOOL_VAC308_ENV_SETUP) $(TOOL_VAC308_CXX) -P+ -Pd+ \ 174 149 $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\ 175 150 $(abspath $(source)) \ … … 177 152 endef 178 153 179 180 ## Compile resource source.181 # @param $(target) Normalized main target name.182 # @param $(source) Source filename (relative).183 # @param $(obj) Object file name. This shall be (re)created by the compilation.184 # @param $(dep) Dependcy file. This shall be (re)created by the compilation.185 # @param $(flags) Flags.186 # @param $(defs) Definitions. No -D or something.187 # @param $(incs) Includes. No -I or something.188 # @param $(dirdep) Directory creation dependency.189 # @param $(deps) Other dependencies.190 #191 # @param $(outbase) Output basename (full). Use this for list files and such.192 # @param $(objsuff) Object suffix.193 154 TOOL_VAC308_COMPILE_RC_OUTPUT = 194 155 TOOL_VAC308_COMPILE_RC_DEPEND = 195 156 TOOL_VAC308_COMPILE_RC_DEPORD = 196 157 define TOOL_VAC308_COMPILE_RC_CMDS 197 $(QUIET) $( TOOL_VAC308_ENV_SETUP) $(TOOL_VAC308_RC) -r\158 $(QUIET) $(call TOOL_VAC308_ENV_SETUP) $(TOOL_VAC308_RC) -r\ 198 159 $(flags) $(addprefix -i, $(subst /,\\,$(incs))) $(addprefix -D, $(defs))\ 199 160 $(subst /,\\,$(abspath $(source))) \ … … 201 162 endef 202 163 203 204 ## Link library 205 # @param $(target) Normalized main target name. 206 # @param $(out) Library name. 207 # @param $(objs) Object files to put in the library. 208 # @param $(flags) Flags. 209 # @param $(dirdep) Directory creation dependency. 210 # @param $(deps) Other dependencies. 211 # @param $(othersrc) Unhandled sources. 212 # 213 # @param $(outbase) Output basename (full). Use this for list files and such. 214 TOOL_VAC308_LINK_LIBRARY_OUTPUT = ## @todo $(outbase).rsp 164 TOOL_VAC308_LINK_LIBRARY_OUTPUT = ## @todo $(outbase).rsp 215 165 TOOL_VAC308_LINK_LIBRARY_DEPEND = $(othersrc) 216 166 TOOL_VAC308_LINK_LIBRARY_DEPORD = 217 167 define TOOL_VAC308_LINK_LIBRARY_CMDS 218 168 $(if $(strip $(othersrc)),\ 219 $(QUIET)$( TOOL_VAC308_ENV_SETUP) \169 $(QUIET)$(call TOOL_VAC308_ENV_SETUP) \ 220 170 $(TOOL_VAC308_IMP) $(TOOL_VAC308_IMPFLAGS) $(subst /,\\,$(out)) $(subst /,\\,$(othersrc)) ) 221 $(if $(strip $(objs)),$(QUIET)$(TOOL_VAC308_ENV_SETUP) \ 222 $(QUIET)$(TOOL_VAC308_ENV_SETUP) \ 171 $(if $(strip $(objs)),$(QUIET)$(call TOOL_VAC308_ENV_SETUP) \ 223 172 $(TOOL_VAC308_AR) $(flags) $(subst /,\\,$(out)) $(foreach obj,$(subst /,\\,$(objs)),+"$(obj)") ";" ) 224 173 endef 225 174 226 227 ## Link program228 # @param $(target) Normalized main target name.229 # @param $(out) Program name.230 # @param $(objs) Object files to link together.231 # @param $(libs) Libraries to search.232 # @param $(libpath) Library search paths.233 # @param $(flags) Flags.234 # @param $(dirdep) Directory creation dependency.235 # @param $(deps) Other dependencies.236 # @param $(othersrc) Unhandled sources.237 # @param $(custom_pre) Custom step invoked before linking.238 # @param $(custom_post) Custom step invoked after linking.239 #240 # @param $(outbase) Output basename (full). Use this for list files and such.241 175 TOOL_VAC308_LINK_PROGRAM_OUTPUT = $(outbase).map 242 176 TOOL_VAC308_LINK_PROGRAM_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc) 243 177 TOOL_VAC308_LINK_PROGRAM_DEPORD = 244 178 define TOOL_VAC308_LINK_PROGRAM_CMDS 245 $(QUIET)$(TOOL_VAC308_ENV_SETUP) \ 246 $(if $(strip $(libpath)),LIB="$(subst ; ,;,$(foreach lp,$(libpath),$(lp);))$(LIB)") \ 179 $(QUIET)$(call TOOL_VAC308_ENV_SETUP,$(subst $(SP),;,$(libpath))) \ 247 180 $(TOOL_VAC308_LD) $(flags) -Fe$(out) -Fm$(outbase).map $(filter-out %.res,$(objs)) $(libs) $(othersrc) 248 $(if $(filter %.res,$(objs)), $(QUIET)$( TOOL_VAC308_ENV_SETUP) \181 $(if $(filter %.res,$(objs)), $(QUIET)$(call TOOL_VAC308_ENV_SETUP) \ 249 182 $(TOOL_VAC308_RC) $(filter %.res,$(objs)) $(out)) 250 183 endef 251 184 252 253 ## Link DLL254 # @param $(target) Normalized main target name.255 # @param $(out) Program name.256 # @param $(objs) Object files to link together.257 # @param $(libs) Libraries to search.258 # @param $(libpath) Library search paths.259 # @param $(flags) Flags.260 # @param $(dirdep) Directory creation dependency.261 # @param $(deps) Other dependencies.262 # @param $(othersrc) Unhandled sources.263 # @param $(custom_pre) Custom step invoked before linking.264 # @param $(custom_post) Custom step invoked after linking.265 #266 # @param $(outbase) Output basename (full). Use this for list files and such.267 185 TOOL_VAC308_LINK_DLL_OUTPUT = $(outbase).map 268 186 TOOL_VAC308_LINK_DLL_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc) 269 187 TOOL_VAC308_LINK_DLL_DEPORD = 270 188 define TOOL_VAC308_LINK_DLL_CMDS 271 $(QUIET)$(TOOL_VAC308_ENV_SETUP) \ 272 $(if $(strip $(libpath)),LIB="$(subst ; ,;,$(foreach lp,$(libpath),$(lp);))$(LIB)") \ 189 $(QUIET)$(call TOOL_VAC308_ENV_SETUP,$(subst $(SP),;,$(libpath))) \ 273 190 $(TOOL_VAC308_LD) /B"/DLL" $(flags) -Fe$(out) -Fm$(outbase).map $(filter-out %.res,$(objs)) $(libs) $(othersrc) 274 $(if $(filter %.res,$(objs)), $(QUIET)$( TOOL_VAC308_ENV_SETUP) \191 $(if $(filter %.res,$(objs)), $(QUIET)$(call TOOL_VAC308_ENV_SETUP) \ 275 192 $(TOOL_VAC308_RC) $(filter %.res,$(objs)) $(out)) 276 193 endef 277 194 278 279 ## Link system module (windows aka driver, linux aka kernel module)280 # @param $(target) Normalized main target name.281 # @param $(out) System module name.282 # @param $(objs) Object files to link together.283 # @param $(libs) Libraries to search.284 # @param $(libpath) Library search paths.285 # @param $(flags) Flags.286 # @param $(dirdep) Directory creation dependency.287 # @param $(deps) Other dependencies.288 # @param $(othersrc) Unhandled sources.289 # @param $(custom_pre) Custom step invoked before linking.290 # @param $(custom_post) Custom step invoked after linking.291 #292 # @param $(outbase) Output basename (full). Use this for list files and such.293 195 TOOL_VAC308_LINK_SYSMOD_OUTPUT = $(outbase).map 294 196 TOOL_VAC308_LINK_SYSMOD_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc) 295 197 TOOL_VAC308_LINK_SYSMOD_DEPORD = 296 198 define TOOL_VAC308_LINK_SYSMOD_CMDS 297 $(QUIET)$(TOOL_VAC308_ENV_SETUP) \ 298 $(if $(strip $(libpath)),LIB="$(subst ; ,;,$(foreach lp,$(libpath),$(lp);))$(LIB)") \ 299 $(TOOL_VAC308_LD) $(flags) -Fe$(out) -Fm$(outbase).map $(filter-out %.res,$(objs)) $(libs) $(othersrc) 300 $(if $(filter %.res,$(objs)), $(QUIET)$(TOOL_VAC308_ENV_SETUP) \ 199 $(QUIET)$(call TOOL_VAC308_ENV_SETUP,$(subst $(SP),;,$(libpath))) \ 200 $(TOOL_VAC308_LD) $(flags) -Fe$(out) -Fm$(outbase).map $(filter-out %.res,$(objs)) $(libs) $(othersrc) 201 $(if $(filter %.res,$(objs)), $(QUIET)$(call TOOL_VAC308_ENV_SETUP) \ 301 202 $(TOOL_VAC308_RC) $(filter %.res,$(objs)) $(out)) 302 203 endef
Note:
See TracChangeset
for help on using the changeset viewer.