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