| 1 | # $Id: VAC308.kmk 1547 2008-04-22 02:02:09Z bird $
|
|---|
| 2 | ## @file
|
|---|
| 3 | # kBuild Tool Config - VisualAge for C++ v3.08.
|
|---|
| 4 | #
|
|---|
| 5 |
|
|---|
| 6 | #
|
|---|
| 7 | # Copyright (c) 2004-2008 knut st. osmundsen <bird-kBuild-spam@anduin.net>
|
|---|
| 8 | #
|
|---|
| 9 | #
|
|---|
| 10 | # This file is part of kBuild.
|
|---|
| 11 | #
|
|---|
| 12 | # kBuild is free software; you can redistribute it and/or modify
|
|---|
| 13 | # it under the terms of the GNU General Public License as published by
|
|---|
| 14 | # the Free Software Foundation; either version 2 of the License, or
|
|---|
| 15 | # (at your option) any later version.
|
|---|
| 16 | #
|
|---|
| 17 | # kBuild is distributed in the hope that it will be useful,
|
|---|
| 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|---|
| 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|---|
| 20 | # GNU General Public License for more details.
|
|---|
| 21 | #
|
|---|
| 22 | # You should have received a copy of the GNU General Public License
|
|---|
| 23 | # along with kBuild; if not, write to the Free Software
|
|---|
| 24 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|---|
| 25 | #
|
|---|
| 26 | #
|
|---|
| 27 | # As a special exception you are granted permission to include this file, via
|
|---|
| 28 | # the kmk include directive, as you wish without this in itself causing the
|
|---|
| 29 | # resulting makefile, program or whatever to be covered by the GPL license.
|
|---|
| 30 | # This exception does not however invalidate any other reasons why the makefile,
|
|---|
| 31 | # program, whatever should not be covered the GPL.
|
|---|
| 32 | #
|
|---|
| 33 | #
|
|---|
| 34 |
|
|---|
| 35 | TOOL_VAC308 := VisualAge for C++ v3.08
|
|---|
| 36 |
|
|---|
| 37 | TOOL_VAC308_ENV_SETUP ?=
|
|---|
| 38 |
|
|---|
| 39 | # Determin VAC308 location.
|
|---|
| 40 | ifndef PATH_TOOL_VAC308
|
|---|
| 41 | PATH_TOOL_VAC308 := $(wildcard $(PATH_DEVTOOLS_BLD)/vac/v308*)
|
|---|
| 42 | ifeq ($(PATH_TOOL_VAC308),)
|
|---|
| 43 | PATH_TOOL_VAC308 := $(wildcard $(PATH_DEVTOOLS_TRG)/vac/v308*)
|
|---|
| 44 | endif
|
|---|
| 45 | ifeq ($(PATH_TOOL_VAC308),)
|
|---|
| 46 | PATH_TOOL_VAC308 := $(lastword $(sort $(PATH_TOOL_VAC308)))
|
|---|
| 47 | endif
|
|---|
| 48 | # if not found, we'll enter 'pathless' mode.
|
|---|
| 49 | else
|
|---|
| 50 | # Resolve any fancy stuff once and for all.
|
|---|
| 51 | PATH_TOOL_VAC308 := $(PATH_TOOL_VAC308)
|
|---|
| 52 | endif
|
|---|
| 53 | ifneq ($(PATH_TOOL_VAC308),)
|
|---|
| 54 | PATH_TOOL_VAC308_BIN ?= $(PATH_TOOL_VAC308)/bin
|
|---|
| 55 | PATH_TOOL_VAC308_LIB ?= $(PATH_TOOL_VAC308)/lib
|
|---|
| 56 | PATH_TOOL_VAC308_INC ?= $(PATH_TOOL_VAC308)/include
|
|---|
| 57 |
|
|---|
| 58 | TOOL_VAC308_CC ?= $(PATH_TOOL_VAC308_BIN)/icc$(HOSTSUFF_EXE)
|
|---|
| 59 | TOOL_VAC308_CXX ?= $(PATH_TOOL_VAC308_BIN)/icc$(HOSTSUFF_EXE)
|
|---|
| 60 | TOOL_VAC308_AR ?= $(PATH_TOOL_VAC308_BIN)/ilib$(HOSTSUFF_EXE)
|
|---|
| 61 | TOOL_VAC308_LD ?= $(PATH_TOOL_VAC308_BIN)/icc$(HOSTSUFF_EXE)
|
|---|
| 62 | TOOL_VAC308_RC ?= $(PATH_TOOL_VAC308_BIN)/rc$(HOSTSUFF_EXE)
|
|---|
| 63 |
|
|---|
| 64 | else
|
|---|
| 65 | # Pathless, relies on the environment.
|
|---|
| 66 | TOOL_VAC308_CC ?= icc$(HOSTSUFF_EXE)
|
|---|
| 67 | TOOL_VAC308_CXX ?= icc$(HOSTSUFF_EXE)
|
|---|
| 68 | TOOL_VAC308_AR ?= ilib$(HOSTSUFF_EXE)
|
|---|
| 69 | TOOL_VAC308_LD ?= icc$(HOSTSUFF_EXE)
|
|---|
| 70 | TOOL_VAC308_RC ?= rc$(HOSTSUFF_EXE)
|
|---|
| 71 |
|
|---|
| 72 | endif
|
|---|
| 73 |
|
|---|
| 74 | # More tool specific properties.
|
|---|
| 75 | # Note: implib isn't really a part of VAC308.
|
|---|
| 76 | TOOL_VAC308_IMP ?= implib$(HOSTSUFF_EXE)
|
|---|
| 77 | TOOL_VAC308_IMPFLAGS ?= /nologo /noignorecase
|
|---|
| 78 |
|
|---|
| 79 | # General Properties used by kBuild
|
|---|
| 80 | TOOL_VAC308_COBJSUFF ?= .obj
|
|---|
| 81 | TOOL_VAC308_CFLAGS ?= -Q+
|
|---|
| 82 | TOOL_VAC308_CFLAGS.debug ?= -Ti+
|
|---|
| 83 | TOOL_VAC308_CFLAGS.release ?= -O
|
|---|
| 84 | TOOL_VAC308_CINCS ?=
|
|---|
| 85 | TOOL_VAC308_CDEFS ?=
|
|---|
| 86 |
|
|---|
| 87 | TOOL_VAC308_CXXOBJSUFF ?= .obj
|
|---|
| 88 | TOOL_VAC308_CXXFLAGS ?= -Q+
|
|---|
| 89 | TOOL_VAC308_CXXFLAGS.debug ?= -Ti
|
|---|
| 90 | TOOL_VAC308_CXXFLAGS.release ?= -O
|
|---|
| 91 | TOOL_VAC308_CXXINCS ?=
|
|---|
| 92 | TOOL_VAC308_CXXDEFS ?=
|
|---|
| 93 |
|
|---|
| 94 | TOOL_VAC308_RCOBJSUFF ?= .res
|
|---|
| 95 | TOOL_VAC308_RCFLAGS ?= -n
|
|---|
| 96 | TOOL_VAC308_RCINCS ?=
|
|---|
| 97 | TOOL_VAC308_RCDEFS ?=
|
|---|
| 98 |
|
|---|
| 99 | TOOL_VAC308_ARFLAGS ?= /nologo /noignorecase
|
|---|
| 100 | TOOL_VAC308_ARLIBSUFF ?= .lib
|
|---|
| 101 |
|
|---|
| 102 | TOOL_VAC308_LDFLAGS ?= -Q+
|
|---|
| 103 | TOOL_VAC308_LDFLAGS.debug ?= -Ti+
|
|---|
| 104 |
|
|---|
| 105 |
|
|---|
| 106 |
|
|---|
| 107 | ## Compile C source.
|
|---|
| 108 | # @param $(target) Normalized main target name.
|
|---|
| 109 | # @param $(source) Source filename (relative).
|
|---|
| 110 | # @param $(obj) Object file name. This shall be (re)created by the compilation.
|
|---|
| 111 | # @param $(dep) Dependcy file. This shall be (re)created by the compilation.
|
|---|
| 112 | # @param $(flags) Flags.
|
|---|
| 113 | # @param $(defs) Definitions. No -D or something.
|
|---|
| 114 | # @param $(incs) Includes. No -I or something.
|
|---|
| 115 | # @param $(dirdep) Directory creation dependency.
|
|---|
| 116 | # @param $(deps) Other dependencies.
|
|---|
| 117 | #
|
|---|
| 118 | # @param $(outbase) Output basename (full). Use this for list files and such.
|
|---|
| 119 | # @param $(objsuff) Object suffix.
|
|---|
| 120 | TOOL_VAC308_COMPILE_C_DEPEND =
|
|---|
| 121 | TOOL_VAC308_COMPILE_C_DEPORD =
|
|---|
| 122 | TOOL_VAC308_COMPILE_C_OUTPUT =
|
|---|
| 123 | define TOOL_VAC308_COMPILE_C_CMDS
|
|---|
| 124 | $(QUIET) $(TOOL_VAC308_ENV_SETUP) $(TOOL_VAC308_CC) -c\
|
|---|
| 125 | $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
|
|---|
| 126 | -Fo$(obj)\
|
|---|
| 127 | $(abspath $(source))
|
|---|
| 128 | $(QUIET) $(TOOL_VAC308_ENV_SETUP) $(TOOL_VAC308_CC) -P+ -Pd+ \
|
|---|
| 129 | $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
|
|---|
| 130 | $(abspath $(source)) \
|
|---|
| 131 | | $(DEP_PRE) -f -s -o $(dep) -t $(obj) -
|
|---|
| 132 | endef
|
|---|
| 133 |
|
|---|
| 134 |
|
|---|
| 135 | ## Compile C++ source.
|
|---|
| 136 | # @param $(target) Normalized main target name.
|
|---|
| 137 | # @param $(source) Source filename (relative).
|
|---|
| 138 | # @param $(obj) Object file name. This shall be (re)created by the compilation.
|
|---|
| 139 | # @param $(dep) Dependcy file. This shall be (re)created by the compilation.
|
|---|
| 140 | # @param $(flags) Flags.
|
|---|
| 141 | # @param $(defs) Definitions. No -D or something.
|
|---|
| 142 | # @param $(incs) Includes. No -I or something.
|
|---|
| 143 | # @param $(dirdep) Directory creation dependency.
|
|---|
| 144 | # @param $(deps) Other dependencies.
|
|---|
| 145 | #
|
|---|
| 146 | # @param $(outbase) Output basename (full). Use this for list files and such.
|
|---|
| 147 | # @param $(objsuff) Object suffix.
|
|---|
| 148 | TOOL_VAC308_COMPILE_CXX_DEPEND =
|
|---|
| 149 | TOOL_VAC308_COMPILE_CXX_DEPORD =
|
|---|
| 150 | TOOL_VAC308_COMPILE_CXX_OUTPUT =
|
|---|
| 151 | define TOOL_VAC308_COMPILE_CXX_CMDS
|
|---|
| 152 | $(QUIET) $(TOOL_VAC308_ENV_SETUP) $(TOOL_VAC308_CXX) -c\
|
|---|
| 153 | $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
|
|---|
| 154 | -Fo$(obj)\
|
|---|
| 155 | $(abspath $(source))
|
|---|
| 156 | $(QUIET) $(TOOL_VAC308_ENV_SETUP) $(TOOL_VAC308_CXX) -P+ -Pd+ \
|
|---|
| 157 | $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
|
|---|
| 158 | $(abspath $(source)) \
|
|---|
| 159 | | $(DEP_PRE) -f -s -o $(dep) -t $(obj) -
|
|---|
| 160 | endef
|
|---|
| 161 |
|
|---|
| 162 |
|
|---|
| 163 | ## Compile resource source.
|
|---|
| 164 | # @param $(target) Normalized main target name.
|
|---|
| 165 | # @param $(source) Source filename (relative).
|
|---|
| 166 | # @param $(obj) Object file name. This shall be (re)created by the compilation.
|
|---|
| 167 | # @param $(dep) Dependcy file. This shall be (re)created by the compilation.
|
|---|
| 168 | # @param $(flags) Flags.
|
|---|
| 169 | # @param $(defs) Definitions. No -D or something.
|
|---|
| 170 | # @param $(incs) Includes. No -I or something.
|
|---|
| 171 | # @param $(dirdep) Directory creation dependency.
|
|---|
| 172 | # @param $(deps) Other dependencies.
|
|---|
| 173 | #
|
|---|
| 174 | # @param $(outbase) Output basename (full). Use this for list files and such.
|
|---|
| 175 | # @param $(objsuff) Object suffix.
|
|---|
| 176 | TOOL_VAC308_COMPILE_RC_OUTPUT =
|
|---|
| 177 | TOOL_VAC308_COMPILE_RC_DEPEND =
|
|---|
| 178 | TOOL_VAC308_COMPILE_RC_DEPORD =
|
|---|
| 179 | define TOOL_VAC308_COMPILE_RC_CMDS
|
|---|
| 180 | $(QUIET) $(TOOL_VAC308_ENV_SETUP) $(TOOL_VAC308_RC) -r\
|
|---|
| 181 | $(flags) $(addprefix -i, $(subst /,\\,$(incs))) $(addprefix -D, $(defs))\
|
|---|
| 182 | $(subst /,\\,$(abspath $(source))) \
|
|---|
| 183 | $(obj)
|
|---|
| 184 | endef
|
|---|
| 185 |
|
|---|
| 186 |
|
|---|
| 187 | ## Link library
|
|---|
| 188 | # @param $(target) Normalized main target name.
|
|---|
| 189 | # @param $(out) Library name.
|
|---|
| 190 | # @param $(objs) Object files to put in the library.
|
|---|
| 191 | # @param $(flags) Flags.
|
|---|
| 192 | # @param $(dirdep) Directory creation dependency.
|
|---|
| 193 | # @param $(deps) Other dependencies.
|
|---|
| 194 | # @param $(othersrc) Unhandled sources.
|
|---|
| 195 | #
|
|---|
| 196 | # @param $(outbase) Output basename (full). Use this for list files and such.
|
|---|
| 197 | TOOL_VAC308_LINK_LIBRARY_OUTPUT = $(outbase).rsp
|
|---|
| 198 | TOOL_VAC308_LINK_LIBRARY_DEPEND = $(othersrc)
|
|---|
| 199 | TOOL_VAC308_LINK_LIBRARY_DEPORD =
|
|---|
| 200 | define TOOL_VAC308_LINK_LIBRARY_CMDS
|
|---|
| 201 | $(if $(strip $(othersrc)),\
|
|---|
| 202 | $(QUIET)$(TOOL_VAC308_ENV_SETUP) \
|
|---|
| 203 | $(TOOL_VAC308_IMP) $(TOOL_VAC308_IMPFLAGS) $(subst /,\\,$(out)) $(subst /,\\,$(othersrc)) )
|
|---|
| 204 | $(if $(strip $(objs)),$(QUIET)$(TOOL_VAC308_ENV_SETUP) \
|
|---|
| 205 | $(QUIET)$(TOOL_VAC308_ENV_SETUP) \
|
|---|
| 206 | $(TOOL_VAC308_AR) $(flags) $(subst /,\\,$(out)) $(foreach obj,$(subst /,\\,$(objs)),+"$(obj)") ";" )
|
|---|
| 207 | endef
|
|---|
| 208 |
|
|---|
| 209 |
|
|---|
| 210 | ## Link program
|
|---|
| 211 | # @param $(target) Normalized main target name.
|
|---|
| 212 | # @param $(out) Program name.
|
|---|
| 213 | # @param $(objs) Object files to link together.
|
|---|
| 214 | # @param $(libs) Libraries to search.
|
|---|
| 215 | # @param $(libpath) Library search paths.
|
|---|
| 216 | # @param $(flags) Flags.
|
|---|
| 217 | # @param $(dirdep) Directory creation dependency.
|
|---|
| 218 | # @param $(deps) Other dependencies.
|
|---|
| 219 | # @param $(othersrc) Unhandled sources.
|
|---|
| 220 | # @param $(custom_pre) Custom step invoked before linking.
|
|---|
| 221 | # @param $(custom_post) Custom step invoked after linking.
|
|---|
| 222 | #
|
|---|
| 223 | # @param $(outbase) Output basename (full). Use this for list files and such.
|
|---|
| 224 | TOOL_VAC308_LINK_PROGRAM_OUTPUT = $(outbase).map
|
|---|
| 225 | TOOL_VAC308_LINK_PROGRAM_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc)
|
|---|
| 226 | TOOL_VAC308_LINK_PROGRAM_DEPORD =
|
|---|
| 227 | define TOOL_VAC308_LINK_PROGRAM_CMDS
|
|---|
| 228 | $(QUIET)$(TOOL_VAC308_ENV_SETUP) \
|
|---|
| 229 | $(if $(strip $(libpath)),LIB="$(subst ; ,;,$(foreach lp,$(libpath),$(lp);))$(LIB)") \
|
|---|
| 230 | $(TOOL_VAC308_LD) $(flags) -Fe$(out) -Fm$(outbase).map $(filter-out %.res,$(objs)) $(libs) $(othersrc)
|
|---|
| 231 | $(if $(filter %.res,$(objs)), $(QUIET)$(TOOL_VAC308_ENV_SETUP) \
|
|---|
| 232 | $(TOOL_VAC308_RC) $(filter %.res,$(objs)) $(out))
|
|---|
| 233 | endef
|
|---|
| 234 |
|
|---|
| 235 |
|
|---|
| 236 | ## Link DLL
|
|---|
| 237 | # @param $(target) Normalized main target name.
|
|---|
| 238 | # @param $(out) Program name.
|
|---|
| 239 | # @param $(objs) Object files to link together.
|
|---|
| 240 | # @param $(libs) Libraries to search.
|
|---|
| 241 | # @param $(libpath) Library search paths.
|
|---|
| 242 | # @param $(flags) Flags.
|
|---|
| 243 | # @param $(dirdep) Directory creation dependency.
|
|---|
| 244 | # @param $(deps) Other dependencies.
|
|---|
| 245 | # @param $(othersrc) Unhandled sources.
|
|---|
| 246 | # @param $(custom_pre) Custom step invoked before linking.
|
|---|
| 247 | # @param $(custom_post) Custom step invoked after linking.
|
|---|
| 248 | #
|
|---|
| 249 | # @param $(outbase) Output basename (full). Use this for list files and such.
|
|---|
| 250 | TOOL_VAC308_LINK_DLL_OUTPUT = $(outbase).map
|
|---|
| 251 | TOOL_VAC308_LINK_DLL_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc)
|
|---|
| 252 | TOOL_VAC308_LINK_DLL_DEPORD =
|
|---|
| 253 | define TOOL_VAC308_LINK_DLL_CMDS
|
|---|
| 254 | $(QUIET)$(TOOL_VAC308_ENV_SETUP) \
|
|---|
| 255 | $(if $(strip $(libpath)),LIB="$(subst ; ,;,$(foreach lp,$(libpath),$(lp);))$(LIB)") \
|
|---|
| 256 | $(TOOL_VAC308_LD) /B"/DLL" $(flags) -Fe$(out) -Fm$(outbase).map $(filter-out %.res,$(objs)) $(libs) $(othersrc)
|
|---|
| 257 | $(if $(filter %.res,$(objs)), $(QUIET)$(TOOL_VAC308_ENV_SETUP) \
|
|---|
| 258 | $(TOOL_VAC308_RC) $(filter %.res,$(objs)) $(out))
|
|---|
| 259 | endef
|
|---|
| 260 |
|
|---|
| 261 |
|
|---|
| 262 | ## Link system module (windows aka driver, linux aka kernel module)
|
|---|
| 263 | # @param $(target) Normalized main target name.
|
|---|
| 264 | # @param $(out) System module name.
|
|---|
| 265 | # @param $(objs) Object files to link together.
|
|---|
| 266 | # @param $(libs) Libraries to search.
|
|---|
| 267 | # @param $(libpath) Library search paths.
|
|---|
| 268 | # @param $(flags) Flags.
|
|---|
| 269 | # @param $(dirdep) Directory creation dependency.
|
|---|
| 270 | # @param $(deps) Other dependencies.
|
|---|
| 271 | # @param $(othersrc) Unhandled sources.
|
|---|
| 272 | # @param $(custom_pre) Custom step invoked before linking.
|
|---|
| 273 | # @param $(custom_post) Custom step invoked after linking.
|
|---|
| 274 | #
|
|---|
| 275 | # @param $(outbase) Output basename (full). Use this for list files and such.
|
|---|
| 276 | TOOL_VAC308_LINK_SYSMOD_OUTPUT = $(outbase).map
|
|---|
| 277 | TOOL_VAC308_LINK_SYSMOD_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc)
|
|---|
| 278 | TOOL_VAC308_LINK_SYSMOD_DEPORD =
|
|---|
| 279 | define TOOL_VAC308_LINK_SYSMOD_CMDS
|
|---|
| 280 | $(QUIET)$(TOOL_VAC308_ENV_SETUP) \
|
|---|
| 281 | $(if $(strip $(libpath)),LIB="$(subst ; ,;,$(foreach lp,$(libpath),$(lp);))$(LIB)") \
|
|---|
| 282 | $(TOOL_VAC308_LD) $(flags) -Fe$(out) -Fm$(outbase).map $(filter-out %.res,$(objs)) $(libs) $(othersrc)
|
|---|
| 283 | $(if $(filter %.res,$(objs)), $(QUIET)$(TOOL_VAC308_ENV_SETUP) \
|
|---|
| 284 | $(TOOL_VAC308_RC) $(filter %.res,$(objs)) $(out))
|
|---|
| 285 | endef
|
|---|
| 286 |
|
|---|