| 1 | # $Id: OPENWATCOM.kmk 3121 2017-10-31 10:58:59Z bird $
|
|---|
| 2 | ## @file
|
|---|
| 3 | # kBuild Tool Config - Open Watcom v1.4 and later.
|
|---|
| 4 | #
|
|---|
| 5 |
|
|---|
| 6 | #
|
|---|
| 7 | # Copyright (c) 2008-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 |
|
|---|
| 34 | TOOL_OPENWATCOM = Open Watcom v1.4 and later (generic)
|
|---|
| 35 |
|
|---|
| 36 | ifeq ($(PATH_TOOL_OPENWATCOM),)
|
|---|
| 37 | ifeq ($(PATH_TOOL_OPENWATCOM),)
|
|---|
| 38 | PATH_TOOL_OPENWATCOM := $(wildcard $(KBUILD_DEVTOOLS_HST)/openwatcom/v*)
|
|---|
| 39 | endif
|
|---|
| 40 | ifeq ($(PATH_TOOL_OPENWATCOM),)
|
|---|
| 41 | PATH_TOOL_OPENWATCOM := $(wildcard $(KBUILD_DEVTOOLS_TRG)/openwatcom/v*)
|
|---|
| 42 | endif
|
|---|
| 43 | ifeq ($(PATH_TOOL_OPENWATCOM),)
|
|---|
| 44 | PATH_TOOL_OPENWATCOM := $(wildcard $(KBUILD_DEVTOOLS)/common/openwatcom/v*)
|
|---|
| 45 | endif
|
|---|
| 46 | ifeq ($(PATH_TOOL_OPENWATCOM)$(KBUILD_HOST),os2)
|
|---|
| 47 | if1of ($(USER) $(USERNAME) $(LOGNAME), bird)
|
|---|
| 48 | PATH_TOOL_OPENWATCOM := $(wildcard d:/dev/Watcom/v1.*)
|
|---|
| 49 | endif
|
|---|
| 50 | endif
|
|---|
| 51 | PATH_TOOL_OPENWATCOM := $(firstword $(sort $(PATH_TOOL_OPENWATCOM)))
|
|---|
| 52 | # if not found, we'll enter 'pathless' mode.
|
|---|
| 53 | else
|
|---|
| 54 | # Resolve any fancy stuff once and for all.
|
|---|
| 55 | PATH_TOOL_OPENWATCOM := $(PATH_TOOL_OPENWATCOM)
|
|---|
| 56 | endif
|
|---|
| 57 |
|
|---|
| 58 | # Clear the feature indicator if not available on the current host.
|
|---|
| 59 | ifdef TOOL_OPENWATCOM_USE_KSUBMIT
|
|---|
| 60 | ifneq ($(KBUILD_HOST),win)
|
|---|
| 61 | override TOOL_OPENWATCOM_USE_KSUBMIT :=
|
|---|
| 62 | endif
|
|---|
| 63 | endif
|
|---|
| 64 |
|
|---|
| 65 | ifneq ($(PATH_TOOL_OPENWATCOM),)
|
|---|
| 66 | TOOL_OPENWATCOM_PATHLESS := no
|
|---|
| 67 |
|
|---|
| 68 | ifeq ($(KBUILD_HOST),darwin)
|
|---|
| 69 | PATH_TOOL_OPENWATCOM_BIN = $(PATH_TOOL_OPENWATCOM)/binosx
|
|---|
| 70 | TOOL_OPENWATCOM_ENV_SETUP ?= $(REDIRECT) \
|
|---|
| 71 | -E 'PATH=$(PATH_TOOL_OPENWATCOM_BIN):$(PATH_TOOL_OPENWATCOM)/binl:$(PATH_TOOL_OPENWATCOM)/binw:$(PATH)' \
|
|---|
| 72 | -E 'WATCOM=$(PATH_TOOL_OPENWATCOM)' \
|
|---|
| 73 | -E 'EDPATH=$(PATH_TOOL_OPENWATCOM)/EDDAT' \
|
|---|
| 74 | -E 'LIB=$1' \
|
|---|
| 75 | -E 'INCLUDE=' \
|
|---|
| 76 | $2 --
|
|---|
| 77 | else ifeq ($(KBUILD_HOST),freebsd)
|
|---|
| 78 | PATH_TOOL_OPENWATCOM_BIN = $(PATH_TOOL_OPENWATCOM)/binfbsd
|
|---|
| 79 | TOOL_OPENWATCOM_ENV_SETUP ?= $(REDIRECT) \
|
|---|
| 80 | -E 'PATH=$(PATH_TOOL_OPENWATCOM_BIN):$(PATH_TOOL_OPENWATCOM)/binl:$(PATH_TOOL_OPENWATCOM)/binw:$(PATH)' \
|
|---|
| 81 | -E 'WATCOM=$(PATH_TOOL_OPENWATCOM)' \
|
|---|
| 82 | -E 'EDPATH=$(PATH_TOOL_OPENWATCOM)/EDDAT' \
|
|---|
| 83 | -E 'LIB=$1' \
|
|---|
| 84 | -E 'INCLUDE=' \
|
|---|
| 85 | $2 --
|
|---|
| 86 | else ifeq ($(KBUILD_HOST),linux)
|
|---|
| 87 | PATH_TOOL_OPENWATCOM_BIN = $(PATH_TOOL_OPENWATCOM)/binl
|
|---|
| 88 | TOOL_OPENWATCOM_ENV_SETUP ?= $(REDIRECT) \
|
|---|
| 89 | -E 'PATH=$(PATH_TOOL_OPENWATCOM_BIN):$(PATH_TOOL_OPENWATCOM)/binw:$(PATH)' \
|
|---|
| 90 | -E 'WATCOM=$(PATH_TOOL_OPENWATCOM)' \
|
|---|
| 91 | -E 'EDPATH=$(PATH_TOOL_OPENWATCOM)/EDDAT' \
|
|---|
| 92 | -E 'LIB=$1' \
|
|---|
| 93 | -E 'INCLUDE=' \
|
|---|
| 94 | $2 --
|
|---|
| 95 | else ifeq ($(KBUILD_HOST),os2)
|
|---|
| 96 | PATH_TOOL_OPENWATCOM_BIN = $(PATH_TOOL_OPENWATCOM)/binp
|
|---|
| 97 | TOOL_OPENWATCOM_ENV_SETUP ?= $(REDIRECT) \
|
|---|
| 98 | -E 'BEGINLIBPATH=$(PATH_TOOL_OPENWATCOM)/binp/dll;$(BEGINLIBPATH)' \
|
|---|
| 99 | -E 'LIBPATHSTRICT=T' \
|
|---|
| 100 | -E 'PATH=$(PATH_TOOL_OPENWATCOM_BIN);$(PATH_TOOL_OPENWATCOM)/binw;$(PATH)' \
|
|---|
| 101 | -E 'WATCOM=$(PATH_TOOL_OPENWATCOM)' \
|
|---|
| 102 | -E 'EDPATH=$(PATH_TOOL_OPENWATCOM)/EDDAT' \
|
|---|
| 103 | -E 'LIB=$1' \
|
|---|
| 104 | -E 'INCLUDE=' \
|
|---|
| 105 | $2 --
|
|---|
| 106 | else ifeq ($(KBUILD_HOST),solaris)
|
|---|
| 107 | PATH_TOOL_OPENWATCOM_BIN = $(PATH_TOOL_OPENWATCOM)/binsol
|
|---|
| 108 | TOOL_OPENWATCOM_ENV_SETUP ?= $(REDIRECT) \
|
|---|
| 109 | -E 'PATH=$(PATH_TOOL_OPENWATCOM_BIN):$(PATH_TOOL_OPENWATCOM)/binl:$(PATH_TOOL_OPENWATCOM)/binw:$(PATH)' \
|
|---|
| 110 | -E 'WATCOM=$(PATH_TOOL_OPENWATCOM)' \
|
|---|
| 111 | -E 'EDPATH=$(PATH_TOOL_OPENWATCOM)/EDDAT' \
|
|---|
| 112 | -E 'LIB=$1' \
|
|---|
| 113 | -E 'INCLUDE=' \
|
|---|
| 114 | $2 --
|
|---|
| 115 | else
|
|---|
| 116 | PATH_TOOL_OPENWATCOM_BIN = $(PATH_TOOL_OPENWATCOM)/binnt
|
|---|
| 117 | TOOL_OPENWATCOM_ENV_SETUP ?= $(if-expr defined(TOOL_OPENWATCOM_USE_KSUBMIT),kmk_builtin_kSubmit --32-bit,$(REDIRECT)) \
|
|---|
| 118 | -E 'PATH=$(PATH_TOOL_OPENWATCOM_BIN);$(PATH_TOOL_OPENWATCOM)/binw;$(PATH)' \
|
|---|
| 119 | -E 'WATCOM=$(PATH_TOOL_OPENWATCOM)' \
|
|---|
| 120 | -E 'EDPATH=$(PATH_TOOL_OPENWATCOM)/EDDAT' \
|
|---|
| 121 | -E 'LIB=$1' \
|
|---|
| 122 | -E 'INCLUDE=' \
|
|---|
| 123 | $2 --
|
|---|
| 124 | endif
|
|---|
| 125 |
|
|---|
| 126 | TOOL_OPENWATCOM_CC ?= $(PATH_TOOL_OPENWATCOM_BIN)/wcc386$(HOSTSUFF_EXE)
|
|---|
| 127 | TOOL_OPENWATCOM_CC16 ?= $(PATH_TOOL_OPENWATCOM_BIN)/wcc$(HOSTSUFF_EXE)
|
|---|
| 128 | TOOL_OPENWATCOM_CXX ?= $(PATH_TOOL_OPENWATCOM_BIN)/wpp386$(HOSTSUFF_EXE)
|
|---|
| 129 | TOOL_OPENWATCOM_CXX16 ?= $(PATH_TOOL_OPENWATCOM_BIN)/wpp$(HOSTSUFF_EXE)
|
|---|
| 130 | TOOL_OPENWATCOM_AS ?= $(PATH_TOOL_OPENWATCOM_BIN)/wasm$(HOSTSUFF_EXE)
|
|---|
| 131 | TOOL_OPENWATCOM_AR ?= $(PATH_TOOL_OPENWATCOM_BIN)/wlib$(HOSTSUFF_EXE)
|
|---|
| 132 | TOOL_OPENWATCOM_RC ?= $(PATH_TOOL_OPENWATCOM_BIN)/wrc$(HOSTSUFF_EXE)
|
|---|
| 133 | TOOL_OPENWATCOM_LD ?= $(PATH_TOOL_OPENWATCOM_BIN)/wcl386$(HOSTSUFF_EXE)
|
|---|
| 134 | TOOL_OPENWATCOM_LD16 ?= $(PATH_TOOL_OPENWATCOM_BIN)/wcl$(HOSTSUFF_EXE)
|
|---|
| 135 | TOOL_OPENWATCOM_WLINK ?= $(PATH_TOOL_OPENWATCOM_BIN)/wlink$(HOSTSUFF_EXE)
|
|---|
| 136 |
|
|---|
| 137 | else
|
|---|
| 138 | # Pathless, relies on the environment.
|
|---|
| 139 | TOOL_OPENWATCOM_PATHLESS :=
|
|---|
| 140 | TOOL_OPENWATCOM_ENV_SETUP ?= $(REDIRECT) \
|
|---|
| 141 | -E 'LIB=$1' \
|
|---|
| 142 | -E 'INCLUDE=' \
|
|---|
| 143 | $2 --
|
|---|
| 144 | TOOL_OPENWATCOM_CC ?= wcc386$(HOSTSUFF_EXE)
|
|---|
| 145 | TOOL_OPENWATCOM_CC16 ?= wcc$(HOSTSUFF_EXE)
|
|---|
| 146 | TOOL_OPENWATCOM_CXX ?= wpp386$(HOSTSUFF_EXE)
|
|---|
| 147 | TOOL_OPENWATCOM_CXX16 ?= wpp$(HOSTSUFF_EXE)
|
|---|
| 148 | TOOL_OPENWATCOM_AS ?= wasm$(HOSTSUFF_EXE)
|
|---|
| 149 | TOOL_OPENWATCOM_AR ?= wlib$(HOSTSUFF_EXE)
|
|---|
| 150 | TOOL_OPENWATCOM_RC ?= wrc$(HOSTSUFF_EXE)
|
|---|
| 151 | TOOL_OPENWATCOM_LD ?= wcl386$(HOSTSUFF_EXE)
|
|---|
| 152 | TOOL_OPENWATCOM_LD16 ?= wcl$(HOSTSUFF_EXE)
|
|---|
| 153 | TOOL_OPENWATCOM_WLINK ?= wlink$(HOSTSUFF_EXE)
|
|---|
| 154 |
|
|---|
| 155 | endif
|
|---|
| 156 |
|
|---|
| 157 | if $(KBUILD_KMK_REVISION) >= 2747
|
|---|
| 158 | TOOL_OPENWATCOM_ENV_SETUP_BD ?= $(call TOOL_OPENWATCOM_ENV_SETUP,$1, --wcc-brain-damage $2)
|
|---|
| 159 | else
|
|---|
| 160 | TOOL_OPENWATCOM_ENV_SETUP_BD ?= $(call TOOL_OPENWATCOM_ENV_SETUP,$1,$2)
|
|---|
| 161 | endif
|
|---|
| 162 |
|
|---|
| 163 |
|
|---|
| 164 | # Functions for changing slashes (SQ = single quoted).
|
|---|
| 165 | if1of ($(KBUILD_HOST), os2 win)
|
|---|
| 166 | TOOL_OPENWATCOM_FIX_SLASHES = $(subst /,\\,$1)
|
|---|
| 167 | TOOL_OPENWATCOM_FIX_SLASHES_SQ = $(subst /,\,$1)
|
|---|
| 168 | else
|
|---|
| 169 | TOOL_OPENWATCOM_FIX_SLASHES = $1
|
|---|
| 170 | TOOL_OPENWATCOM_FIX_SLASHES_SQ = $1
|
|---|
| 171 | endif
|
|---|
| 172 |
|
|---|
| 173 | # General Properties used by kBuild
|
|---|
| 174 | TOOL_OPENWATCOM_ASOBJSUFF ?= .obj
|
|---|
| 175 | TOOL_OPENWATCOM_ASFLAGS ?= -zq
|
|---|
| 176 | TOOL_OPENWATCOM_ASFLAGS.dos ?= -bt=dos
|
|---|
| 177 | TOOL_OPENWATCOM_ASFLAGS.os2 ?= -bt=os2
|
|---|
| 178 | TOOL_OPENWATCOM_ASFLAGS.win ?= -bt=nt
|
|---|
| 179 |
|
|---|
| 180 | TOOL_OPENWATCOM_COBJSUFF ?= .obj
|
|---|
| 181 | TOOL_OPENWATCOM_CFLAGS ?= -zq
|
|---|
| 182 | TOOL_OPENWATCOM_CFLAGS.dos ?= -bt=dos
|
|---|
| 183 | TOOL_OPENWATCOM_CFLAGS.os2 ?= -bt=os2
|
|---|
| 184 | TOOL_OPENWATCOM_CFLAGS.win ?= -bt=nt
|
|---|
| 185 | ifdef PATH_TOOL_OPENWATCOM
|
|---|
| 186 | TOOL_OPENWATCOM_CINCS ?= $(PATH_TOOL_OPENWATCOM)/h
|
|---|
| 187 | endif
|
|---|
| 188 |
|
|---|
| 189 | TOOL_OPENWATCOM_CXXOBJSUFF ?= .obj
|
|---|
| 190 | TOOL_OPENWATCOM_CXXFLAGS ?= -zq
|
|---|
| 191 | TOOL_OPENWATCOM_CXXFLAGS.dos ?= -bt=dos
|
|---|
| 192 | TOOL_OPENWATCOM_CXXFLAGS.os2 ?= -bt=os2
|
|---|
| 193 | TOOL_OPENWATCOM_CXXFLAGS.win ?= -bt=nt
|
|---|
| 194 | ifdef PATH_TOOL_OPENWATCOM
|
|---|
| 195 | TOOL_OPENWATCOM_CXXINCS ?= $(PATH_TOOL_OPENWATCOM)/h
|
|---|
| 196 | endif
|
|---|
| 197 |
|
|---|
| 198 | TOOL_OPENWATCOM_RCOBJSUFF ?= .res
|
|---|
| 199 | TOOL_OPENWATCOM_RCFLAGS ?= -r
|
|---|
| 200 | TOOL_OPENWATCOM_RCFLAGS.os2 ?= -bt=os2
|
|---|
| 201 | TOOL_OPENWATCOM_RCFLAGS.win ?= -bt=nt
|
|---|
| 202 | ifdef PATH_TOOL_OPENWATCOM
|
|---|
| 203 | TOOL_OPENWATCOM_RCINCS ?= $(PATH_TOOL_OPENWATCOM)/h
|
|---|
| 204 | endif
|
|---|
| 205 |
|
|---|
| 206 | TOOL_OPENWATCOM_ARFLAGS ?= -q
|
|---|
| 207 | TOOL_OPENWATCOM_ARLIBSUFF ?= .lib
|
|---|
| 208 |
|
|---|
| 209 | TOOL_OPENWATCOM_LDFLAGS ?= -zq -y
|
|---|
| 210 | TOOL_OPENWATCOM_LDFLAGS.dos ?= -bt=dos
|
|---|
| 211 | TOOL_OPENWATCOM_LDFLAGS.os2 ?= -bt=os2
|
|---|
| 212 | TOOL_OPENWATCOM_LDFLAGS.win ?= -bt=nt
|
|---|
| 213 |
|
|---|
| 214 |
|
|---|
| 215 | TOOL_OPENWATCOM_COMPILE_AS_DEPEND =
|
|---|
| 216 | TOOL_OPENWATCOM_COMPILE_AS_DEPORD =
|
|---|
| 217 | TOOL_OPENWATCOM_COMPILE_AS_OUTPUT =
|
|---|
| 218 | TOOL_OPENWATCOM_COMPILE_AS_OUTPUT_MAYBE = $(obj).err
|
|---|
| 219 | ifdef TOOL_OPENWATCOM_USE_KSUBMIT
|
|---|
| 220 | define TOOL_OPENWATCOM_COMPILE_AS_CMDS
|
|---|
| 221 | $(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP_BD,, -P $(DEP_OBJ_INT) -s -f -q -o "$(dep)" -t "$(obj)" "$(obj)") \
|
|---|
| 222 | $(TOOL_OPENWATCOM_AS) \
|
|---|
| 223 | $(flags) \
|
|---|
| 224 | $(addsuffix , $(addprefix -i=, $(call TOOL_OPENWATCOM_FIX_SLASHES,$(incs)))) \
|
|---|
| 225 | $(addprefix -d, $(defs)) \
|
|---|
| 226 | -fo=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)) \
|
|---|
| 227 | -fr=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)).err \
|
|---|
| 228 | $(call TOOL_OPENWATCOM_FIX_SLASHES,$(abspath $(source)))
|
|---|
| 229 | endef
|
|---|
| 230 | else
|
|---|
| 231 | define TOOL_OPENWATCOM_COMPILE_AS_CMDS
|
|---|
| 232 | $(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP_BD) $(TOOL_OPENWATCOM_AS) \
|
|---|
| 233 | $(flags) \
|
|---|
| 234 | $(addsuffix , $(addprefix -i=, $(call TOOL_OPENWATCOM_FIX_SLASHES,$(incs)))) \
|
|---|
| 235 | $(addprefix -d, $(defs)) \
|
|---|
| 236 | -fo=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)) \
|
|---|
| 237 | -fr=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)).err \
|
|---|
| 238 | $(call TOOL_OPENWATCOM_FIX_SLASHES,$(abspath $(source)))
|
|---|
| 239 | $(QUIET)$(DEP_OBJ) -s -f -q -o "$(dep)" -t "$(obj)" "$(obj)"
|
|---|
| 240 | endef
|
|---|
| 241 | endif
|
|---|
| 242 |
|
|---|
| 243 |
|
|---|
| 244 | TOOL_OPENWATCOM_COMPILE_C_DEPEND =
|
|---|
| 245 | TOOL_OPENWATCOM_COMPILE_C_DEPORD =
|
|---|
| 246 | TOOL_OPENWATCOM_COMPILE_C_OUTPUT =
|
|---|
| 247 | TOOL_OPENWATCOM_COMPILE_C_OUTPUT_MAYBE = $(obj).err
|
|---|
| 248 | ifdef TOOL_OPENWATCOM_USE_KSUBMIT
|
|---|
| 249 | define TOOL_OPENWATCOM_COMPILE_C_CMDS
|
|---|
| 250 | $(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP_BD,, -P $(DEP_OBJ_INT) -s -f -q -o "$(dep)" -t "$(obj)" "$(obj)") \
|
|---|
| 251 | $(TOOL_OPENWATCOM_CC) \
|
|---|
| 252 | $(flags) \
|
|---|
| 253 | $(addsuffix , $(addprefix -i=, $(call TOOL_OPENWATCOM_FIX_SLASHES,$(incs)))) \
|
|---|
| 254 | $(addprefix -d, $(defs)) \
|
|---|
| 255 | -fo=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)) \
|
|---|
| 256 | -fr=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)).err \
|
|---|
| 257 | $(call TOOL_OPENWATCOM_FIX_SLASHES,$(abspath $(source)))
|
|---|
| 258 | endef
|
|---|
| 259 | else
|
|---|
| 260 | define TOOL_OPENWATCOM_COMPILE_C_CMDS
|
|---|
| 261 | $(QUIET) $(call TOOL_OPENWATCOM_ENV_SETUP_BD) $(TOOL_OPENWATCOM_CC) \
|
|---|
| 262 | $(flags) \
|
|---|
| 263 | $(addsuffix , $(addprefix -i=, $(call TOOL_OPENWATCOM_FIX_SLASHES,$(incs)))) \
|
|---|
| 264 | $(addprefix -d, $(defs)) \
|
|---|
| 265 | -fo=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)) \
|
|---|
| 266 | -fr=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)).err \
|
|---|
| 267 | $(call TOOL_OPENWATCOM_FIX_SLASHES,$(abspath $(source)))
|
|---|
| 268 | $(QUIET)$(DEP_OBJ) -s -f -q -o "$(dep)" -t "$(obj)" "$(obj)"
|
|---|
| 269 | endef
|
|---|
| 270 | endif
|
|---|
| 271 |
|
|---|
| 272 | TOOL_OPENWATCOM_COMPILE_CXX_DEPEND =
|
|---|
| 273 | TOOL_OPENWATCOM_COMPILE_CXX_DEPORD =
|
|---|
| 274 | TOOL_OPENWATCOM_COMPILE_CXX_OUTPUT =
|
|---|
| 275 | TOOL_OPENWATCOM_COMPILE_CXX_OUTPUT_MAYBE = $(obj).err
|
|---|
| 276 | ifdef TOOL_OPENWATCOM_USE_KSUBMIT
|
|---|
| 277 | define TOOL_OPENWATCOM_COMPILE_CXX_CMDS
|
|---|
| 278 | $(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP_BD,, -P $(DEP_OBJ_INT) -s -f -q -o "$(dep)" -t "$(obj)" "$(obj)") \
|
|---|
| 279 | $(TOOL_OPENWATCOM_CXX) \
|
|---|
| 280 | $(flags) \
|
|---|
| 281 | $(addsuffix , $(addprefix -i=, $(call TOOL_OPENWATCOM_FIX_SLASHES,$(incs)))) \
|
|---|
| 282 | $(addprefix -d, $(defs)) \
|
|---|
| 283 | -fo=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)) \
|
|---|
| 284 | -fr=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)).err \
|
|---|
| 285 | $(call TOOL_OPENWATCOM_FIX_SLASHES,$(abspath $(source)))
|
|---|
| 286 | endef
|
|---|
| 287 | else
|
|---|
| 288 | define TOOL_OPENWATCOM_COMPILE_CXX_CMDS
|
|---|
| 289 | $(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP_BD) $(TOOL_OPENWATCOM_CXX) \
|
|---|
| 290 | $(flags) \
|
|---|
| 291 | $(addsuffix , $(addprefix -i=, $(call TOOL_OPENWATCOM_FIX_SLASHES,$(incs)))) \
|
|---|
| 292 | $(addprefix -d, $(defs)) \
|
|---|
| 293 | -fo=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)) \
|
|---|
| 294 | -fr=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)).err \
|
|---|
| 295 | $(call TOOL_OPENWATCOM_FIX_SLASHES,$(abspath $(source)))
|
|---|
| 296 | $(QUIET)$(DEP_OBJ) -s -f -q -o "$(dep)" -t "$(obj)" "$(obj)"
|
|---|
| 297 | endef
|
|---|
| 298 | endif
|
|---|
| 299 |
|
|---|
| 300 | TOOL_OPENWATCOM_COMPILE_RC_OUTPUT =
|
|---|
| 301 | TOOL_OPENWATCOM_COMPILE_RC_DEPEND =
|
|---|
| 302 | TOOL_OPENWATCOM_COMPILE_RC_DEPORD =
|
|---|
| 303 | define TOOL_OPENWATCOM_COMPILE_RC_CMDS
|
|---|
| 304 | $(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP) \
|
|---|
| 305 | $(TOOL_OPENWATCOM_RC) -r\
|
|---|
| 306 | $(flags) \
|
|---|
| 307 | $(addprefix -i=, $(call TOOL_OPENWATCOM_FIX_SLASHES,$(incs))) \
|
|---|
| 308 | $(addprefix -d, $(defs))\
|
|---|
| 309 | -fo=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)) \
|
|---|
| 310 | $(call TOOL_OPENWATCOM_FIX_SLASHES,$(abspath $(source)))
|
|---|
| 311 | endef
|
|---|
| 312 |
|
|---|
| 313 | TOOL_OPENWATCOM_LINK_LIBRARY_OUTPUT = ## @todo $(outbase).rsp
|
|---|
| 314 | TOOL_OPENWATCOM_LINK_LIBRARY_DEPEND = $(othersrc)
|
|---|
| 315 | TOOL_OPENWATCOM_LINK_LIBRARY_DEPORD =
|
|---|
| 316 | define TOOL_OPENWATCOM_LINK_LIBRARY_CMDS
|
|---|
| 317 | $(QUIET)$(APPEND) -tn $(outbase).rsp $(foreach obj,$(call TOOL_OPENWATCOM_FIX_SLASHES,$(objs) $(filter-out %.imp,$(othersrc))),'+"$(obj)"')
|
|---|
| 318 | $(if $(filter %.imp,$(othersrc)),$(SED) \
|
|---|
| 319 | -e 's/;.*$(DOLLAR)$(DOLLAR)//g' \
|
|---|
| 320 | -e 's/^[[:space:]][[:space:]]*//g' \
|
|---|
| 321 | -e 's/[[:space:]][[:space:]]*$(DOLLAR)$(DOLLAR)//g' \
|
|---|
| 322 | -e '/^[[:space:]]*$(DOLLAR)$(DOLLAR)/d' \
|
|---|
| 323 | -e 's/[[:space:]][[:space:]]*/ /g' \
|
|---|
| 324 | -e 's/\([^ ][^ ]*\) \([^ ][^ ]*\) \([^ ][^ ]*\) \([^ ][^ ]*\).*/++\1.\2.\3/' \
|
|---|
| 325 | $(filter %.imp,$(othersrc)) \
|
|---|
| 326 | --append $(outbase).rsp \
|
|---|
| 327 | )
|
|---|
| 328 | $(QUIET)$(TOOL_OPENWATCOM_ENV_SETUP_BD) $(TOOL_OPENWATCOM_AR) $(flags) $(call TOOL_OPENWATCOM_FIX_SLASHES,$(out)) @$(outbase).rsp
|
|---|
| 329 | endef
|
|---|
| 330 |
|
|---|
| 331 | TOOL_OPENWATCOM_LINK_PROGRAM_OUTPUT = $(outbase).map
|
|---|
| 332 | TOOL_OPENWATCOM_LINK_PROGRAM_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc)
|
|---|
| 333 | TOOL_OPENWATCOM_LINK_PROGRAM_DEPORD =
|
|---|
| 334 | define TOOL_OPENWATCOM_LINK_PROGRAM_CMDS
|
|---|
| 335 | $(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP_BD,$(subst $(SP),,$(addsuffix ;,$(libpath))),-C $(dir $(out))) \
|
|---|
| 336 | $(TOOL_OPENWATCOM_LD) \
|
|---|
| 337 | $(flags) \
|
|---|
| 338 | -fe=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(out)) \
|
|---|
| 339 | -fm=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(outbase).map) \
|
|---|
| 340 | $(call TOOL_OPENWATCOM_FIX_SLASHES,$(filter-out %.res,$(objs))) \
|
|---|
| 341 | $(call TOOL_OPENWATCOM_FIX_SLASHES,$(libs)) \
|
|---|
| 342 | $(call TOOL_OPENWATCOM_FIX_SLASHES,$(othersrc))
|
|---|
| 343 | $(if $(filter %.res,$(objs)), $(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP) \
|
|---|
| 344 | $(TOOL_OPENWATCOM_RC) \
|
|---|
| 345 | $(filter -bt=%,$(flags)) \
|
|---|
| 346 | /fe=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(out)) \
|
|---|
| 347 | $(call TOOL_OPENWATCOM_FIX_SLASHES,$(filter %.res,$(objs))))
|
|---|
| 348 | endef
|
|---|
| 349 |
|
|---|
| 350 | TOOL_OPENWATCOM_LINK_DLL_OUTPUT = $(outbase).map
|
|---|
| 351 | TOOL_OPENWATCOM_LINK_DLL_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc)
|
|---|
| 352 | TOOL_OPENWATCOM_LINK_DLL_DEPORD =
|
|---|
| 353 | define TOOL_OPENWATCOM_LINK_DLL_CMDS
|
|---|
| 354 | $(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP_BD,$(subst $(SP),,$(addsuffix ;,$(libpath))),-C $(dir $(out))) \
|
|---|
| 355 | $(TOOL_OPENWATCOM_LD) \
|
|---|
| 356 | $(flags) \
|
|---|
| 357 | -fe=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(out)) \
|
|---|
| 358 | -fm=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(outbase).map) \
|
|---|
| 359 | $(call TOOL_OPENWATCOM_FIX_SLASHES,$(filter-out %.res,$(objs))) \
|
|---|
| 360 | $(call TOOL_OPENWATCOM_FIX_SLASHES,$(libs)) \
|
|---|
| 361 | $(call TOOL_OPENWATCOM_FIX_SLASHES,$(othersrc))
|
|---|
| 362 | $(if $(filter %.res,$(objs)), $(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP) \
|
|---|
| 363 | $(TOOL_OPENWATCOM_RC) \
|
|---|
| 364 | $(filter -bt=%,$(flags)) \
|
|---|
| 365 | /fe=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(out)) \
|
|---|
| 366 | $(call TOOL_OPENWATCOM_FIX_SLASHES,$(filter %.res,$(objs))))
|
|---|
| 367 | endef
|
|---|
| 368 |
|
|---|
| 369 | TOOL_OPENWATCOM_LINK_SYSMOD_OUTPUT = $(outbase).map
|
|---|
| 370 | TOOL_OPENWATCOM_LINK_SYSMOD_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc)
|
|---|
| 371 | TOOL_OPENWATCOM_LINK_SYSMOD_DEPORD =
|
|---|
| 372 | define TOOL_OPENWATCOM_LINK_SYSMOD_CMDS
|
|---|
| 373 | $(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP_BD,$(subst $(SP),,$(addsuffix ;,$(libpath))),-C $(dir $(out))) \
|
|---|
| 374 | $(TOOL_OPENWATCOM_LD) \
|
|---|
| 375 | $(flags) \
|
|---|
| 376 | -fe=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(out)) \
|
|---|
| 377 | -fm=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(outbase).map) \
|
|---|
| 378 | $(call TOOL_OPENWATCOM_FIX_SLASHES,$(filter-out %.res,$(objs))) \
|
|---|
| 379 | $(call TOOL_OPENWATCOM_FIX_SLASHES,$(libs)) \
|
|---|
| 380 | $(call TOOL_OPENWATCOM_FIX_SLASHES,$(othersrc))
|
|---|
| 381 | $(if $(filter %.res,$(objs)), $(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP) \
|
|---|
| 382 | $(TOOL_OPENWATCOM_RC) \
|
|---|
| 383 | $(filter -bt=%,$(flags)) \
|
|---|
| 384 | /fe=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(out)) \
|
|---|
| 385 | $(call TOOL_OPENWATCOM_FIX_SLASHES,$(filter %.res,$(objs))))
|
|---|
| 386 | endef
|
|---|
| 387 |
|
|---|