source: trunk/kBuild/tools/VAC308.kmk@ 2023

Last change on this file since 2023 was 2018, checked in by bird, 17 years ago

kBuild: svn attributes and some minor file header adjustments and corrections (still GPLv2 w/ big fat exception).

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