[182] | 1 | # $Id: VAC308.kmk 3121 2017-10-31 10:58:59Z bird $
|
---|
| 2 | ## @file
|
---|
[1097] | 3 | # kBuild Tool Config - VisualAge for C++ v3.08.
|
---|
[182] | 4 | #
|
---|
[1547] | 5 |
|
---|
| 6 | #
|
---|
[3121] | 7 | # Copyright (c) 2004-2017 knut st. osmundsen <bird-kBuild-spam-xviiv@anduin.net>
|
---|
[182] | 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 | #
|
---|
[1547] | 26 | # As a special exception you are granted permission to include this file, via
|
---|
[2018] | 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.
|
---|
[1547] | 29 | # This exception does not however invalidate any other reasons why the makefile,
|
---|
| 30 | # program, whatever should not be covered the GPL.
|
---|
| 31 | #
|
---|
| 32 | #
|
---|
[182] | 33 |
|
---|
[1097] | 34 | TOOL_VAC308 := VisualAge for C++ v3.08
|
---|
[182] | 35 |
|
---|
[1097] | 36 | # Determin VAC308 location.
|
---|
| 37 | ifndef PATH_TOOL_VAC308
|
---|
[2750] | 38 | PATH_TOOL_VAC308 := $(wildcard $(KBUILD_DEVTOOLS_HST)/vac/v3.0.8*)
|
---|
[1097] | 39 | ifeq ($(PATH_TOOL_VAC308),)
|
---|
[2750] | 40 | PATH_TOOL_VAC308 := $(wildcard $(KBUILD_DEVTOOLS_HST)/vac/v308*)
|
---|
[1097] | 41 | endif
|
---|
| 42 | ifeq ($(PATH_TOOL_VAC308),)
|
---|
[2726] | 43 | PATH_TOOL_VAC308 := $(wildcard $(KBUILD_DEVTOOLS_TRG)/vac/v3.0.8*)
|
---|
[2064] | 44 | ifeq ($(PATH_TOOL_VAC308),)
|
---|
[2726] | 45 | PATH_TOOL_VAC308 := $(wildcard $(KBUILD_DEVTOOLS_TRG)/vac/v308*)
|
---|
[2064] | 46 | endif
|
---|
[1097] | 47 | endif
|
---|
[2064] | 48 | ifeq ($(PATH_TOOL_VAC308),)
|
---|
| 49 | PATH_TOOL_VAC308 := $(firstword $(rsort $(PATH_TOOL_VAC308)))
|
---|
| 50 | endif
|
---|
[1097] | 51 | # if not found, we'll enter 'pathless' mode.
|
---|
[182] | 52 | else
|
---|
[1097] | 53 | # Resolve any fancy stuff once and for all.
|
---|
| 54 | PATH_TOOL_VAC308 := $(PATH_TOOL_VAC308)
|
---|
[182] | 55 | endif
|
---|
[1097] | 56 | ifneq ($(PATH_TOOL_VAC308),)
|
---|
[2065] | 57 | TOOL_VAC308_PATHLESS :=
|
---|
| 58 |
|
---|
[2064] | 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
|
---|
[2065] | 65 |
|
---|
| 66 | TOOL_VAC308_ENV_SETUP ?= $(REDIRECT) \
|
---|
[2064] | 67 | -E 'BEGINLIBPATH=$(PATH_TOOL_VAC308_DLL);$(BEGINLIBPATH)' \
|
---|
| 68 | -E 'DPATH=$(PATH_TOOL_VAC308_LOCALE);$(PATH_TOOL_VAC308_HELP);$(DPATH)' \
|
---|
[3023] | 69 | -E 'LIB=$1' \
|
---|
[2064] | 70 | -E 'INCLUDE=' \
|
---|
[3055] | 71 | $2 \
|
---|
[2064] | 72 | --
|
---|
[2065] | 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)
|
---|
[182] | 78 |
|
---|
[1097] | 79 | else
|
---|
| 80 | # Pathless, relies on the environment.
|
---|
[2065] | 81 | TOOL_VAC308_PATHLESS := yes
|
---|
| 82 | TOOL_VAC308_ENV_SETUP ?= $(REDIRECT) \
|
---|
[3023] | 83 | -E 'LIB=$1' \
|
---|
[2065] | 84 | -E 'INCLUDE=' \
|
---|
[3055] | 85 | $2 \
|
---|
[2065] | 86 | --
|
---|
[1097] | 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 |
|
---|
[182] | 93 | endif
|
---|
| 94 |
|
---|
[1097] | 95 | # More tool specific properties.
|
---|
| 96 | # Note: implib isn't really a part of VAC308.
|
---|
| 97 | TOOL_VAC308_IMP ?= implib$(HOSTSUFF_EXE)
|
---|
| 98 | TOOL_VAC308_IMPFLAGS ?= /nologo /noignorecase
|
---|
| 99 |
|
---|
[667] | 100 | # General Properties used by kBuild
|
---|
[1097] | 101 | TOOL_VAC308_COBJSUFF ?= .obj
|
---|
| 102 | TOOL_VAC308_CFLAGS ?= -Q+
|
---|
| 103 | TOOL_VAC308_CFLAGS.debug ?= -Ti+
|
---|
| 104 | TOOL_VAC308_CFLAGS.release ?= -O
|
---|
[2064] | 105 | TOOL_VAC308_CINCS ?= $(PATH_TOOL_VAC308_INC)
|
---|
[1097] | 106 | TOOL_VAC308_CDEFS ?=
|
---|
[182] | 107 |
|
---|
[1097] | 108 | TOOL_VAC308_CXXOBJSUFF ?= .obj
|
---|
| 109 | TOOL_VAC308_CXXFLAGS ?= -Q+
|
---|
| 110 | TOOL_VAC308_CXXFLAGS.debug ?= -Ti
|
---|
| 111 | TOOL_VAC308_CXXFLAGS.release ?= -O
|
---|
[2064] | 112 | TOOL_VAC308_CXXINCS ?= $(PATH_TOOL_VAC308_INC)
|
---|
[1097] | 113 | TOOL_VAC308_CXXDEFS ?=
|
---|
[667] | 114 |
|
---|
[1147] | 115 | TOOL_VAC308_RCOBJSUFF ?= .res
|
---|
| 116 | TOOL_VAC308_RCFLAGS ?= -n
|
---|
| 117 | TOOL_VAC308_RCINCS ?=
|
---|
| 118 | TOOL_VAC308_RCDEFS ?=
|
---|
| 119 |
|
---|
[1097] | 120 | TOOL_VAC308_ARFLAGS ?= /nologo /noignorecase
|
---|
| 121 | TOOL_VAC308_ARLIBSUFF ?= .lib
|
---|
[667] | 122 |
|
---|
[1097] | 123 | TOOL_VAC308_LDFLAGS ?= -Q+
|
---|
| 124 | TOOL_VAC308_LDFLAGS.debug ?= -Ti+
|
---|
[667] | 125 |
|
---|
| 126 |
|
---|
| 127 |
|
---|
[1097] | 128 | TOOL_VAC308_COMPILE_C_DEPEND =
|
---|
| 129 | TOOL_VAC308_COMPILE_C_DEPORD =
|
---|
[3055] | 130 | TOOL_VAC308_COMPILE_C_OUTPUT = $(obj).ii
|
---|
[1097] | 131 | define TOOL_VAC308_COMPILE_C_CMDS
|
---|
[2065] | 132 | $(QUIET) $(call TOOL_VAC308_ENV_SETUP) $(TOOL_VAC308_CC) -c\
|
---|
[1015] | 133 | $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
|
---|
[1097] | 134 | -Fo$(obj)\
|
---|
| 135 | $(abspath $(source))
|
---|
[3055] | 136 | $(QUIET) $(call TOOL_VAC308_ENV_SETUP,,-wo $(obj).ii) $(TOOL_VAC308_CC) -P+ -Pd+ \
|
---|
[182] | 137 | $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
|
---|
[3055] | 138 | $(abspath $(source))
|
---|
| 139 | $(QUIET)$(DEP_PRE) -f -s -o $(dep) -t $(obj) $(obj).ii
|
---|
[182] | 140 | endef
|
---|
| 141 |
|
---|
[1097] | 142 | TOOL_VAC308_COMPILE_CXX_DEPEND =
|
---|
| 143 | TOOL_VAC308_COMPILE_CXX_DEPORD =
|
---|
[3055] | 144 | TOOL_VAC308_COMPILE_CXX_OUTPUT = $(obj).ii
|
---|
[1097] | 145 | define TOOL_VAC308_COMPILE_CXX_CMDS
|
---|
[2065] | 146 | $(QUIET) $(call TOOL_VAC308_ENV_SETUP) $(TOOL_VAC308_CXX) -c\
|
---|
[1015] | 147 | $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
|
---|
[1097] | 148 | -Fo$(obj)\
|
---|
[697] | 149 | $(abspath $(source))
|
---|
[3055] | 150 | $(QUIET) $(call TOOL_VAC308_ENV_SETUP,,-wo $(obj).ii) $(TOOL_VAC308_CXX) -P+ -Pd+ \
|
---|
[465] | 151 | $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
|
---|
[3055] | 152 | $(abspath $(source))
|
---|
| 153 | $(QUIET)$(DEP_PRE) -f -s -o $(dep) -t $(obj) $(obj).ii
|
---|
[465] | 154 | endef
|
---|
| 155 |
|
---|
[1147] | 156 | TOOL_VAC308_COMPILE_RC_OUTPUT =
|
---|
| 157 | TOOL_VAC308_COMPILE_RC_DEPEND =
|
---|
| 158 | TOOL_VAC308_COMPILE_RC_DEPORD =
|
---|
| 159 | define TOOL_VAC308_COMPILE_RC_CMDS
|
---|
[2065] | 160 | $(QUIET) $(call TOOL_VAC308_ENV_SETUP) $(TOOL_VAC308_RC) -r\
|
---|
[1147] | 161 | $(flags) $(addprefix -i, $(subst /,\\,$(incs))) $(addprefix -D, $(defs))\
|
---|
| 162 | $(subst /,\\,$(abspath $(source))) \
|
---|
| 163 | $(obj)
|
---|
| 164 | endef
|
---|
| 165 |
|
---|
[2065] | 166 | TOOL_VAC308_LINK_LIBRARY_OUTPUT = ## @todo $(outbase).rsp
|
---|
[1097] | 167 | TOOL_VAC308_LINK_LIBRARY_DEPEND = $(othersrc)
|
---|
| 168 | TOOL_VAC308_LINK_LIBRARY_DEPORD =
|
---|
| 169 | define TOOL_VAC308_LINK_LIBRARY_CMDS
|
---|
| 170 | $(if $(strip $(othersrc)),\
|
---|
[2065] | 171 | $(QUIET)$(call TOOL_VAC308_ENV_SETUP) \
|
---|
[1097] | 172 | $(TOOL_VAC308_IMP) $(TOOL_VAC308_IMPFLAGS) $(subst /,\\,$(out)) $(subst /,\\,$(othersrc)) )
|
---|
[2065] | 173 | $(if $(strip $(objs)),$(QUIET)$(call TOOL_VAC308_ENV_SETUP) \
|
---|
[1097] | 174 | $(TOOL_VAC308_AR) $(flags) $(subst /,\\,$(out)) $(foreach obj,$(subst /,\\,$(objs)),+"$(obj)") ";" )
|
---|
[182] | 175 | endef
|
---|
| 176 |
|
---|
[1097] | 177 | TOOL_VAC308_LINK_PROGRAM_OUTPUT = $(outbase).map
|
---|
| 178 | TOOL_VAC308_LINK_PROGRAM_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc)
|
---|
| 179 | TOOL_VAC308_LINK_PROGRAM_DEPORD =
|
---|
| 180 | define TOOL_VAC308_LINK_PROGRAM_CMDS
|
---|
[3023] | 181 | $(QUIET)$(call TOOL_VAC308_ENV_SETUP,$(subst ;$(SP),;,$(foreach one,$(libpath),$(one);))) \
|
---|
[1145] | 182 | $(TOOL_VAC308_LD) $(flags) -Fe$(out) -Fm$(outbase).map $(filter-out %.res,$(objs)) $(libs) $(othersrc)
|
---|
[2065] | 183 | $(if $(filter %.res,$(objs)), $(QUIET)$(call TOOL_VAC308_ENV_SETUP) \
|
---|
[1146] | 184 | $(TOOL_VAC308_RC) $(filter %.res,$(objs)) $(out))
|
---|
[182] | 185 | endef
|
---|
| 186 |
|
---|
[1097] | 187 | TOOL_VAC308_LINK_DLL_OUTPUT = $(outbase).map
|
---|
| 188 | TOOL_VAC308_LINK_DLL_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc)
|
---|
| 189 | TOOL_VAC308_LINK_DLL_DEPORD =
|
---|
| 190 | define TOOL_VAC308_LINK_DLL_CMDS
|
---|
[3023] | 191 | $(QUIET)$(call TOOL_VAC308_ENV_SETUP,$(subst ;$(SP),;,$(foreach one,$(libpath),$(one);))) \
|
---|
[1145] | 192 | $(TOOL_VAC308_LD) /B"/DLL" $(flags) -Fe$(out) -Fm$(outbase).map $(filter-out %.res,$(objs)) $(libs) $(othersrc)
|
---|
[2065] | 193 | $(if $(filter %.res,$(objs)), $(QUIET)$(call TOOL_VAC308_ENV_SETUP) \
|
---|
[1146] | 194 | $(TOOL_VAC308_RC) $(filter %.res,$(objs)) $(out))
|
---|
[182] | 195 | endef
|
---|
| 196 |
|
---|
[1097] | 197 | TOOL_VAC308_LINK_SYSMOD_OUTPUT = $(outbase).map
|
---|
| 198 | TOOL_VAC308_LINK_SYSMOD_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc)
|
---|
| 199 | TOOL_VAC308_LINK_SYSMOD_DEPORD =
|
---|
| 200 | define TOOL_VAC308_LINK_SYSMOD_CMDS
|
---|
[3023] | 201 | $(QUIET)$(call TOOL_VAC308_ENV_SETUP,$(subst ;$(SP),;,$(foreach one,$(libpath),$(one);))) \
|
---|
[2065] | 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) \
|
---|
[1146] | 204 | $(TOOL_VAC308_RC) $(filter %.res,$(objs)) $(out))
|
---|
[182] | 205 | endef
|
---|
[184] | 206 |
|
---|