*: Updated copyright to 2009 and normalized name & email.
[kbuild-mirror.git] / kBuild / tools / VAC308.kmk
blobe0ee9ac19201d8b5873ef9de2a456e087df17528
1 # $Id$
2 ## @file
3 # kBuild Tool Config - VisualAge for C++ v3.08.
7 # Copyright (c) 2004-2009 knut st. osmundsen <bird-kBuild-spamix@anduin.net>
9 # This file is part of kBuild.
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.
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.
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
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.
34 TOOL_VAC308 := VisualAge for C++ v3.08
36 # Determin VAC308 location.
37 ifndef PATH_TOOL_VAC308
38 PATH_TOOL_VAC308 := $(wildcard $(PATH_DEVTOOLS_BLD)/vac/v3.0.8*)
39 ifeq ($(PATH_TOOL_VAC308),)
40 PATH_TOOL_VAC308 := $(wildcard $(PATH_DEVTOOLS_BLD)/vac/v308*)
41 endif
42 ifeq ($(PATH_TOOL_VAC308),)
43 PATH_TOOL_VAC308 := $(wildcard $(PATH_DEVTOOLS_TRG)/vac/v3.0.8*)
44 ifeq ($(PATH_TOOL_VAC308),)
45 PATH_TOOL_VAC308 := $(wildcard $(PATH_DEVTOOLS_TRG)/vac/v308*)
46 endif
47 endif
48 ifeq ($(PATH_TOOL_VAC308),)
49 PATH_TOOL_VAC308 := $(firstword $(rsort $(PATH_TOOL_VAC308)))
50 endif
51 # if not found, we'll enter 'pathless' mode.
52 else
53 # Resolve any fancy stuff once and for all.
54 PATH_TOOL_VAC308 := $(PATH_TOOL_VAC308)
55 endif
56 ifneq ($(PATH_TOOL_VAC308),)
57 TOOL_VAC308_PATHLESS :=
59 PATH_TOOL_VAC308_BIN ?= $(PATH_TOOL_VAC308)/bin
60 PATH_TOOL_VAC308_LIB ?= $(PATH_TOOL_VAC308)/lib
61 PATH_TOOL_VAC308_INC ?= $(PATH_TOOL_VAC308)/include
62 PATH_TOOL_VAC308_DLL ?= $(PATH_TOOL_VAC308)/dll
63 PATH_TOOL_VAC308_HELP ?= $(PATH_TOOL_VAC308)/help
64 PATH_TOOL_VAC308_LOCALE ?= $(PATH_TOOL_VAC308)/locale
66 TOOL_VAC308_ENV_SETUP ?= $(REDIRECT) \
67 -E 'BEGINLIBPATH=$(PATH_TOOL_VAC308_DLL);$(BEGINLIBPATH)' \
68 -E 'DPATH=$(PATH_TOOL_VAC308_LOCALE);$(PATH_TOOL_VAC308_HELP);$(DPATH)' \
69 -E 'LIB=' \
70 -E 'INCLUDE=' \
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)
78 else
79 # Pathless, relies on the environment.
80 TOOL_VAC308_PATHLESS := yes
81 TOOL_VAC308_ENV_SETUP ?= $(REDIRECT) \
82 -E 'LIB=' \
83 -E 'INCLUDE=' \
85 TOOL_VAC308_CC ?= icc$(HOSTSUFF_EXE)
86 TOOL_VAC308_CXX ?= icc$(HOSTSUFF_EXE)
87 TOOL_VAC308_AR ?= ilib$(HOSTSUFF_EXE)
88 TOOL_VAC308_LD ?= icc$(HOSTSUFF_EXE)
89 TOOL_VAC308_RC ?= rc$(HOSTSUFF_EXE)
91 endif
93 # More tool specific properties.
94 # Note: implib isn't really a part of VAC308.
95 TOOL_VAC308_IMP ?= implib$(HOSTSUFF_EXE)
96 TOOL_VAC308_IMPFLAGS ?= /nologo /noignorecase
98 # General Properties used by kBuild
99 TOOL_VAC308_COBJSUFF ?= .obj
100 TOOL_VAC308_CFLAGS ?= -Q+
101 TOOL_VAC308_CFLAGS.debug ?= -Ti+
102 TOOL_VAC308_CFLAGS.release ?= -O
103 TOOL_VAC308_CINCS ?= $(PATH_TOOL_VAC308_INC)
104 TOOL_VAC308_CDEFS ?=
106 TOOL_VAC308_CXXOBJSUFF ?= .obj
107 TOOL_VAC308_CXXFLAGS ?= -Q+
108 TOOL_VAC308_CXXFLAGS.debug ?= -Ti
109 TOOL_VAC308_CXXFLAGS.release ?= -O
110 TOOL_VAC308_CXXINCS ?= $(PATH_TOOL_VAC308_INC)
111 TOOL_VAC308_CXXDEFS ?=
113 TOOL_VAC308_RCOBJSUFF ?= .res
114 TOOL_VAC308_RCFLAGS ?= -n
115 TOOL_VAC308_RCINCS ?=
116 TOOL_VAC308_RCDEFS ?=
118 TOOL_VAC308_ARFLAGS ?= /nologo /noignorecase
119 TOOL_VAC308_ARLIBSUFF ?= .lib
121 TOOL_VAC308_LDFLAGS ?= -Q+
122 TOOL_VAC308_LDFLAGS.debug ?= -Ti+
126 TOOL_VAC308_COMPILE_C_DEPEND =
127 TOOL_VAC308_COMPILE_C_DEPORD =
128 TOOL_VAC308_COMPILE_C_OUTPUT =
129 define TOOL_VAC308_COMPILE_C_CMDS
130 $(QUIET) $(call TOOL_VAC308_ENV_SETUP) $(TOOL_VAC308_CC) -c\
131 $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
132 -Fo$(obj)\
133 $(abspath $(source))
134 $(QUIET) $(call TOOL_VAC308_ENV_SETUP) $(TOOL_VAC308_CC) -P+ -Pd+ \
135 $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
136 $(abspath $(source)) \
137 | $(DEP_PRE) -f -s -o $(dep) -t $(obj) -
138 endef
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) $(call TOOL_VAC308_ENV_SETUP) $(TOOL_VAC308_CXX) -c\
145 $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
146 -Fo$(obj)\
147 $(abspath $(source))
148 $(QUIET) $(call 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
154 TOOL_VAC308_COMPILE_RC_OUTPUT =
155 TOOL_VAC308_COMPILE_RC_DEPEND =
156 TOOL_VAC308_COMPILE_RC_DEPORD =
157 define TOOL_VAC308_COMPILE_RC_CMDS
158 $(QUIET) $(call TOOL_VAC308_ENV_SETUP) $(TOOL_VAC308_RC) -r\
159 $(flags) $(addprefix -i, $(subst /,\\,$(incs))) $(addprefix -D, $(defs))\
160 $(subst /,\\,$(abspath $(source))) \
161 $(obj)
162 endef
164 TOOL_VAC308_LINK_LIBRARY_OUTPUT = ## @todo $(outbase).rsp
165 TOOL_VAC308_LINK_LIBRARY_DEPEND = $(othersrc)
166 TOOL_VAC308_LINK_LIBRARY_DEPORD =
167 define TOOL_VAC308_LINK_LIBRARY_CMDS
168 $(if $(strip $(othersrc)),\
169 $(QUIET)$(call TOOL_VAC308_ENV_SETUP) \
170 $(TOOL_VAC308_IMP) $(TOOL_VAC308_IMPFLAGS) $(subst /,\\,$(out)) $(subst /,\\,$(othersrc)) )
171 $(if $(strip $(objs)),$(QUIET)$(call TOOL_VAC308_ENV_SETUP) \
172 $(TOOL_VAC308_AR) $(flags) $(subst /,\\,$(out)) $(foreach obj,$(subst /,\\,$(objs)),+"$(obj)") ";" )
173 endef
175 TOOL_VAC308_LINK_PROGRAM_OUTPUT = $(outbase).map
176 TOOL_VAC308_LINK_PROGRAM_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc)
177 TOOL_VAC308_LINK_PROGRAM_DEPORD =
178 define TOOL_VAC308_LINK_PROGRAM_CMDS
179 $(QUIET)$(call TOOL_VAC308_ENV_SETUP,$(subst $(SP),;,$(libpath))) \
180 $(TOOL_VAC308_LD) $(flags) -Fe$(out) -Fm$(outbase).map $(filter-out %.res,$(objs)) $(libs) $(othersrc)
181 $(if $(filter %.res,$(objs)), $(QUIET)$(call TOOL_VAC308_ENV_SETUP) \
182 $(TOOL_VAC308_RC) $(filter %.res,$(objs)) $(out))
183 endef
185 TOOL_VAC308_LINK_DLL_OUTPUT = $(outbase).map
186 TOOL_VAC308_LINK_DLL_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc)
187 TOOL_VAC308_LINK_DLL_DEPORD =
188 define TOOL_VAC308_LINK_DLL_CMDS
189 $(QUIET)$(call TOOL_VAC308_ENV_SETUP,$(subst $(SP),;,$(libpath))) \
190 $(TOOL_VAC308_LD) /B"/DLL" $(flags) -Fe$(out) -Fm$(outbase).map $(filter-out %.res,$(objs)) $(libs) $(othersrc)
191 $(if $(filter %.res,$(objs)), $(QUIET)$(call TOOL_VAC308_ENV_SETUP) \
192 $(TOOL_VAC308_RC) $(filter %.res,$(objs)) $(out))
193 endef
195 TOOL_VAC308_LINK_SYSMOD_OUTPUT = $(outbase).map
196 TOOL_VAC308_LINK_SYSMOD_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc)
197 TOOL_VAC308_LINK_SYSMOD_DEPORD =
198 define TOOL_VAC308_LINK_SYSMOD_CMDS
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) \
202 $(TOOL_VAC308_RC) $(filter %.res,$(objs)) $(out))
203 endef