1 | # $Id: VAC308.kmk 1097 2007-09-16 16:55:55Z bird $
|
---|
2 | ## @file
|
---|
3 | #
|
---|
4 | # kBuild Tool Config - VisualAge for C++ v3.08.
|
---|
5 | #
|
---|
6 | # Copyright (c) 2004-2007 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_ARFLAGS ?= /nologo /noignorecase
|
---|
87 | TOOL_VAC308_ARLIBSUFF ?= .lib
|
---|
88 |
|
---|
89 | TOOL_VAC308_LDFLAGS ?= -Q+
|
---|
90 | TOOL_VAC308_LDFLAGS.debug ?= -Ti+
|
---|
91 |
|
---|
92 |
|
---|
93 |
|
---|
94 | ## Compile C source.
|
---|
95 | # @param $(target) Normalized main target name.
|
---|
96 | # @param $(source) Source filename (relative).
|
---|
97 | # @param $(obj) Object file name. This shall be (re)created by the compilation.
|
---|
98 | # @param $(dep) Dependcy file. This shall be (re)created by the compilation.
|
---|
99 | # @param $(flags) Flags.
|
---|
100 | # @param $(defs) Definitions. No -D or something.
|
---|
101 | # @param $(incs) Includes. No -I or something.
|
---|
102 | # @param $(dirdep) Directory creation dependency.
|
---|
103 | # @param $(deps) Other dependencies.
|
---|
104 | #
|
---|
105 | # @param $(outbase) Output basename (full). Use this for list files and such.
|
---|
106 | # @param $(objsuff) Object suffix.
|
---|
107 | TOOL_VAC308_COMPILE_C_DEPEND =
|
---|
108 | TOOL_VAC308_COMPILE_C_DEPORD =
|
---|
109 | TOOL_VAC308_COMPILE_C_OUTPUT =
|
---|
110 | define TOOL_VAC308_COMPILE_C_CMDS
|
---|
111 | $(QUIET) $(TOOL_VAC308_ENV_SETUP) $(TOOL_VAC308_CC) -c\
|
---|
112 | $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
|
---|
113 | -Fo$(obj)\
|
---|
114 | $(abspath $(source))
|
---|
115 | $(QUIET) $(TOOL_VAC308_ENV_SETUP) $(TOOL_VAC308_CC) -P+ -Pd+ \
|
---|
116 | $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
|
---|
117 | $(abspath $(source)) \
|
---|
118 | | $(DEP_PRE) -f -s -o $(dep) -t $(obj) -
|
---|
119 | endef
|
---|
120 |
|
---|
121 |
|
---|
122 | ## Compile C++ source.
|
---|
123 | # @param $(target) Normalized main target name.
|
---|
124 | # @param $(source) Source filename (relative).
|
---|
125 | # @param $(obj) Object file name. This shall be (re)created by the compilation.
|
---|
126 | # @param $(dep) Dependcy file. This shall be (re)created by the compilation.
|
---|
127 | # @param $(flags) Flags.
|
---|
128 | # @param $(defs) Definitions. No -D or something.
|
---|
129 | # @param $(incs) Includes. No -I or something.
|
---|
130 | # @param $(dirdep) Directory creation dependency.
|
---|
131 | # @param $(deps) Other dependencies.
|
---|
132 | #
|
---|
133 | # @param $(outbase) Output basename (full). Use this for list files and such.
|
---|
134 | # @param $(objsuff) Object suffix.
|
---|
135 | TOOL_VAC308_COMPILE_CXX_DEPEND =
|
---|
136 | TOOL_VAC308_COMPILE_CXX_DEPORD =
|
---|
137 | TOOL_VAC308_COMPILE_CXX_OUTPUT =
|
---|
138 | define TOOL_VAC308_COMPILE_CXX_CMDS
|
---|
139 | $(QUIET) $(TOOL_VAC308_ENV_SETUP) $(TOOL_VAC308_CXX) -c\
|
---|
140 | $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
|
---|
141 | -Fo$(obj)\
|
---|
142 | $(abspath $(source))
|
---|
143 | $(QUIET) $(TOOL_VAC308_ENV_SETUP) $(TOOL_VAC308_CXX) -P+ -Pd+ \
|
---|
144 | $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
|
---|
145 | $(abspath $(source)) \
|
---|
146 | | $(DEP_PRE) -f -s -o $(dep) -t $(obj) -
|
---|
147 | endef
|
---|
148 |
|
---|
149 |
|
---|
150 | ## Link library
|
---|
151 | # @param $(target) Normalized main target name.
|
---|
152 | # @param $(out) Library name.
|
---|
153 | # @param $(objs) Object files to put in the library.
|
---|
154 | # @param $(flags) Flags.
|
---|
155 | # @param $(dirdep) Directory creation dependency.
|
---|
156 | # @param $(deps) Other dependencies.
|
---|
157 | # @param $(othersrc) Unhandled sources.
|
---|
158 | #
|
---|
159 | # @param $(outbase) Output basename (full). Use this for list files and such.
|
---|
160 | TOOL_VAC308_LINK_LIBRARY_OUTPUT = $(outbase).rsp
|
---|
161 | TOOL_VAC308_LINK_LIBRARY_DEPEND = $(othersrc)
|
---|
162 | TOOL_VAC308_LINK_LIBRARY_DEPORD =
|
---|
163 | define TOOL_VAC308_LINK_LIBRARY_CMDS
|
---|
164 | $(if $(strip $(othersrc)),\
|
---|
165 | $(QUIET)$(TOOL_VAC308_ENV_SETUP) \
|
---|
166 | $(TOOL_VAC308_IMP) $(TOOL_VAC308_IMPFLAGS) $(subst /,\\,$(out)) $(subst /,\\,$(othersrc)) )
|
---|
167 | $(if $(strip $(objs)),$(QUIET)$(TOOL_VAC308_ENV_SETUP) \
|
---|
168 | $(QUIET)$(TOOL_VAC308_ENV_SETUP) \
|
---|
169 | $(TOOL_VAC308_AR) $(flags) $(subst /,\\,$(out)) $(foreach obj,$(subst /,\\,$(objs)),+"$(obj)") ";" )
|
---|
170 | endef
|
---|
171 |
|
---|
172 |
|
---|
173 | ## Link program
|
---|
174 | # @param $(target) Normalized main target name.
|
---|
175 | # @param $(out) Program name.
|
---|
176 | # @param $(objs) Object files to link together.
|
---|
177 | # @param $(libs) Libraries to search.
|
---|
178 | # @param $(libpath) Library search paths.
|
---|
179 | # @param $(flags) Flags.
|
---|
180 | # @param $(dirdep) Directory creation dependency.
|
---|
181 | # @param $(deps) Other dependencies.
|
---|
182 | # @param $(othersrc) Unhandled sources.
|
---|
183 | # @param $(custom_pre) Custom step invoked before linking.
|
---|
184 | # @param $(custom_post) Custom step invoked after linking.
|
---|
185 | #
|
---|
186 | # @param $(outbase) Output basename (full). Use this for list files and such.
|
---|
187 | TOOL_VAC308_LINK_PROGRAM_OUTPUT = $(outbase).map
|
---|
188 | TOOL_VAC308_LINK_PROGRAM_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc)
|
---|
189 | TOOL_VAC308_LINK_PROGRAM_DEPORD =
|
---|
190 | define TOOL_VAC308_LINK_PROGRAM_CMDS
|
---|
191 | $(QUIET)$(TOOL_VAC308_ENV_SETUP) \
|
---|
192 | $(if $(strip $(libpath)),LIB="$(subst ; ,;,$(foreach lp,$(libpath),$(lp);))$(LIB)") \
|
---|
193 | $(TOOL_VAC308_LD) $(flags) -Fe$(out) -Fm$(outbase).map $(objs) $(libs) $(othersrc)
|
---|
194 | endef
|
---|
195 |
|
---|
196 |
|
---|
197 | ## Link DLL
|
---|
198 | # @param $(target) Normalized main target name.
|
---|
199 | # @param $(out) Program name.
|
---|
200 | # @param $(objs) Object files to link together.
|
---|
201 | # @param $(libs) Libraries to search.
|
---|
202 | # @param $(libpath) Library search paths.
|
---|
203 | # @param $(flags) Flags.
|
---|
204 | # @param $(dirdep) Directory creation dependency.
|
---|
205 | # @param $(deps) Other dependencies.
|
---|
206 | # @param $(othersrc) Unhandled sources.
|
---|
207 | # @param $(custom_pre) Custom step invoked before linking.
|
---|
208 | # @param $(custom_post) Custom step invoked after linking.
|
---|
209 | #
|
---|
210 | # @param $(outbase) Output basename (full). Use this for list files and such.
|
---|
211 | TOOL_VAC308_LINK_DLL_OUTPUT = $(outbase).map
|
---|
212 | TOOL_VAC308_LINK_DLL_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc)
|
---|
213 | TOOL_VAC308_LINK_DLL_DEPORD =
|
---|
214 | define TOOL_VAC308_LINK_DLL_CMDS
|
---|
215 | $(QUIET)$(TOOL_VAC308_ENV_SETUP) \
|
---|
216 | $(if $(strip $(libpath)),LIB="$(subst ; ,;,$(foreach lp,$(libpath),$(lp);))$(LIB)") \
|
---|
217 | $(TOOL_VAC308_LD) /B"/DLL" $(flags) -Fe$(out) -Fm$(outbase).map $(objs) $(libs) $(othersrc)
|
---|
218 | endef
|
---|
219 |
|
---|
220 |
|
---|
221 | ## Link system module (windows aka driver, linux aka kernel module)
|
---|
222 | # @param $(target) Normalized main target name.
|
---|
223 | # @param $(out) System module name.
|
---|
224 | # @param $(objs) Object files to link together.
|
---|
225 | # @param $(libs) Libraries to search.
|
---|
226 | # @param $(libpath) Library search paths.
|
---|
227 | # @param $(flags) Flags.
|
---|
228 | # @param $(dirdep) Directory creation dependency.
|
---|
229 | # @param $(deps) Other dependencies.
|
---|
230 | # @param $(othersrc) Unhandled sources.
|
---|
231 | # @param $(custom_pre) Custom step invoked before linking.
|
---|
232 | # @param $(custom_post) Custom step invoked after linking.
|
---|
233 | #
|
---|
234 | # @param $(outbase) Output basename (full). Use this for list files and such.
|
---|
235 | TOOL_VAC308_LINK_SYSMOD_OUTPUT = $(outbase).map
|
---|
236 | TOOL_VAC308_LINK_SYSMOD_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc)
|
---|
237 | TOOL_VAC308_LINK_SYSMOD_DEPORD =
|
---|
238 | define TOOL_VAC308_LINK_SYSMOD_CMDS
|
---|
239 | $(QUIET)$(TOOL_VAC308_ENV_SETUP) \
|
---|
240 | $(if $(strip $(libpath)),LIB="$(subst ; ,;,$(foreach lp,$(libpath),$(lp);))$(LIB)") \
|
---|
241 | $(TOOL_VAC308_LD) $(flags) -Fe$(out) -Fm$(outbase).map $(objs) $(libs) $(othersrc)
|
---|
242 | endef
|
---|
243 |
|
---|