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

Last change on this file since 3607 was 3121, checked in by bird, 8 years ago

(C) year)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 7.7 KB
Line 
1# $Id: VAC308.kmk 3121 2017-10-31 10:58:59Z bird $
2## @file
3# kBuild Tool Config - VisualAge for C++ v3.08.
4#
5
6#
7# Copyright (c) 2004-2017 knut st. osmundsen <bird-kBuild-spam-xviiv@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
36# Determin VAC308 location.
37ifndef PATH_TOOL_VAC308
38 PATH_TOOL_VAC308 := $(wildcard $(KBUILD_DEVTOOLS_HST)/vac/v3.0.8*)
39 ifeq ($(PATH_TOOL_VAC308),)
40 PATH_TOOL_VAC308 := $(wildcard $(KBUILD_DEVTOOLS_HST)/vac/v308*)
41 endif
42 ifeq ($(PATH_TOOL_VAC308),)
43 PATH_TOOL_VAC308 := $(wildcard $(KBUILD_DEVTOOLS_TRG)/vac/v3.0.8*)
44 ifeq ($(PATH_TOOL_VAC308),)
45 PATH_TOOL_VAC308 := $(wildcard $(KBUILD_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.
52else
53 # Resolve any fancy stuff once and for all.
54 PATH_TOOL_VAC308 := $(PATH_TOOL_VAC308)
55endif
56ifneq ($(PATH_TOOL_VAC308),)
57 TOOL_VAC308_PATHLESS :=
58
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
65
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=$1' \
70 -E 'INCLUDE=' \
71 $2 \
72 --
73 TOOL_VAC308_CC ?= $(PATH_TOOL_VAC308_BIN)/icc$(HOSTSUFF_EXE)
74 TOOL_VAC308_CXX ?= $(PATH_TOOL_VAC308_BIN)/icc$(HOSTSUFF_EXE)
75 TOOL_VAC308_AR ?= $(PATH_TOOL_VAC308_BIN)/ilib$(HOSTSUFF_EXE)
76 TOOL_VAC308_LD ?= $(PATH_TOOL_VAC308_BIN)/icc$(HOSTSUFF_EXE)
77 TOOL_VAC308_RC ?= $(PATH_TOOL_VAC308_BIN)/rc$(HOSTSUFF_EXE)
78
79else
80 # Pathless, relies on the environment.
81 TOOL_VAC308_PATHLESS := yes
82 TOOL_VAC308_ENV_SETUP ?= $(REDIRECT) \
83 -E 'LIB=$1' \
84 -E 'INCLUDE=' \
85 $2 \
86 --
87 TOOL_VAC308_CC ?= icc$(HOSTSUFF_EXE)
88 TOOL_VAC308_CXX ?= icc$(HOSTSUFF_EXE)
89 TOOL_VAC308_AR ?= ilib$(HOSTSUFF_EXE)
90 TOOL_VAC308_LD ?= icc$(HOSTSUFF_EXE)
91 TOOL_VAC308_RC ?= rc$(HOSTSUFF_EXE)
92
93endif
94
95# More tool specific properties.
96# Note: implib isn't really a part of VAC308.
97TOOL_VAC308_IMP ?= implib$(HOSTSUFF_EXE)
98TOOL_VAC308_IMPFLAGS ?= /nologo /noignorecase
99
100# General Properties used by kBuild
101TOOL_VAC308_COBJSUFF ?= .obj
102TOOL_VAC308_CFLAGS ?= -Q+
103TOOL_VAC308_CFLAGS.debug ?= -Ti+
104TOOL_VAC308_CFLAGS.release ?= -O
105TOOL_VAC308_CINCS ?= $(PATH_TOOL_VAC308_INC)
106TOOL_VAC308_CDEFS ?=
107
108TOOL_VAC308_CXXOBJSUFF ?= .obj
109TOOL_VAC308_CXXFLAGS ?= -Q+
110TOOL_VAC308_CXXFLAGS.debug ?= -Ti
111TOOL_VAC308_CXXFLAGS.release ?= -O
112TOOL_VAC308_CXXINCS ?= $(PATH_TOOL_VAC308_INC)
113TOOL_VAC308_CXXDEFS ?=
114
115TOOL_VAC308_RCOBJSUFF ?= .res
116TOOL_VAC308_RCFLAGS ?= -n
117TOOL_VAC308_RCINCS ?=
118TOOL_VAC308_RCDEFS ?=
119
120TOOL_VAC308_ARFLAGS ?= /nologo /noignorecase
121TOOL_VAC308_ARLIBSUFF ?= .lib
122
123TOOL_VAC308_LDFLAGS ?= -Q+
124TOOL_VAC308_LDFLAGS.debug ?= -Ti+
125
126
127
128TOOL_VAC308_COMPILE_C_DEPEND =
129TOOL_VAC308_COMPILE_C_DEPORD =
130TOOL_VAC308_COMPILE_C_OUTPUT = $(obj).ii
131define TOOL_VAC308_COMPILE_C_CMDS
132 $(QUIET) $(call TOOL_VAC308_ENV_SETUP) $(TOOL_VAC308_CC) -c\
133 $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
134 -Fo$(obj)\
135 $(abspath $(source))
136 $(QUIET) $(call TOOL_VAC308_ENV_SETUP,,-wo $(obj).ii) $(TOOL_VAC308_CC) -P+ -Pd+ \
137 $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
138 $(abspath $(source))
139 $(QUIET)$(DEP_PRE) -f -s -o $(dep) -t $(obj) $(obj).ii
140endef
141
142TOOL_VAC308_COMPILE_CXX_DEPEND =
143TOOL_VAC308_COMPILE_CXX_DEPORD =
144TOOL_VAC308_COMPILE_CXX_OUTPUT = $(obj).ii
145define TOOL_VAC308_COMPILE_CXX_CMDS
146 $(QUIET) $(call TOOL_VAC308_ENV_SETUP) $(TOOL_VAC308_CXX) -c\
147 $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
148 -Fo$(obj)\
149 $(abspath $(source))
150 $(QUIET) $(call TOOL_VAC308_ENV_SETUP,,-wo $(obj).ii) $(TOOL_VAC308_CXX) -P+ -Pd+ \
151 $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
152 $(abspath $(source))
153 $(QUIET)$(DEP_PRE) -f -s -o $(dep) -t $(obj) $(obj).ii
154endef
155
156TOOL_VAC308_COMPILE_RC_OUTPUT =
157TOOL_VAC308_COMPILE_RC_DEPEND =
158TOOL_VAC308_COMPILE_RC_DEPORD =
159define TOOL_VAC308_COMPILE_RC_CMDS
160 $(QUIET) $(call TOOL_VAC308_ENV_SETUP) $(TOOL_VAC308_RC) -r\
161 $(flags) $(addprefix -i, $(subst /,\\,$(incs))) $(addprefix -D, $(defs))\
162 $(subst /,\\,$(abspath $(source))) \
163 $(obj)
164endef
165
166TOOL_VAC308_LINK_LIBRARY_OUTPUT = ## @todo $(outbase).rsp
167TOOL_VAC308_LINK_LIBRARY_DEPEND = $(othersrc)
168TOOL_VAC308_LINK_LIBRARY_DEPORD =
169define TOOL_VAC308_LINK_LIBRARY_CMDS
170 $(if $(strip $(othersrc)),\
171 $(QUIET)$(call TOOL_VAC308_ENV_SETUP) \
172 $(TOOL_VAC308_IMP) $(TOOL_VAC308_IMPFLAGS) $(subst /,\\,$(out)) $(subst /,\\,$(othersrc)) )
173 $(if $(strip $(objs)),$(QUIET)$(call TOOL_VAC308_ENV_SETUP) \
174 $(TOOL_VAC308_AR) $(flags) $(subst /,\\,$(out)) $(foreach obj,$(subst /,\\,$(objs)),+"$(obj)") ";" )
175endef
176
177TOOL_VAC308_LINK_PROGRAM_OUTPUT = $(outbase).map
178TOOL_VAC308_LINK_PROGRAM_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc)
179TOOL_VAC308_LINK_PROGRAM_DEPORD =
180define TOOL_VAC308_LINK_PROGRAM_CMDS
181 $(QUIET)$(call TOOL_VAC308_ENV_SETUP,$(subst ;$(SP),;,$(foreach one,$(libpath),$(one);))) \
182 $(TOOL_VAC308_LD) $(flags) -Fe$(out) -Fm$(outbase).map $(filter-out %.res,$(objs)) $(libs) $(othersrc)
183 $(if $(filter %.res,$(objs)), $(QUIET)$(call TOOL_VAC308_ENV_SETUP) \
184 $(TOOL_VAC308_RC) $(filter %.res,$(objs)) $(out))
185endef
186
187TOOL_VAC308_LINK_DLL_OUTPUT = $(outbase).map
188TOOL_VAC308_LINK_DLL_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc)
189TOOL_VAC308_LINK_DLL_DEPORD =
190define TOOL_VAC308_LINK_DLL_CMDS
191 $(QUIET)$(call TOOL_VAC308_ENV_SETUP,$(subst ;$(SP),;,$(foreach one,$(libpath),$(one);))) \
192 $(TOOL_VAC308_LD) /B"/DLL" $(flags) -Fe$(out) -Fm$(outbase).map $(filter-out %.res,$(objs)) $(libs) $(othersrc)
193 $(if $(filter %.res,$(objs)), $(QUIET)$(call TOOL_VAC308_ENV_SETUP) \
194 $(TOOL_VAC308_RC) $(filter %.res,$(objs)) $(out))
195endef
196
197TOOL_VAC308_LINK_SYSMOD_OUTPUT = $(outbase).map
198TOOL_VAC308_LINK_SYSMOD_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc)
199TOOL_VAC308_LINK_SYSMOD_DEPORD =
200define TOOL_VAC308_LINK_SYSMOD_CMDS
201 $(QUIET)$(call TOOL_VAC308_ENV_SETUP,$(subst ;$(SP),;,$(foreach one,$(libpath),$(one);))) \
202 $(TOOL_VAC308_LD) $(flags) -Fe$(out) -Fm$(outbase).map $(filter-out %.res,$(objs)) $(libs) $(othersrc)
203 $(if $(filter %.res,$(objs)), $(QUIET)$(call TOOL_VAC308_ENV_SETUP) \
204 $(TOOL_VAC308_RC) $(filter %.res,$(objs)) $(out))
205endef
206
Note: See TracBrowser for help on using the repository browser.