[2065] | 1 | # $Id: OPENWATCOM-16.kmk 3578 2023-01-05 00:42:25Z bird $
|
---|
| 2 | ## @file
|
---|
[2068] | 3 | # kBuild Tool Config - Open Watcom v1.4 and later, 16-bit targets.
|
---|
[2065] | 4 | #
|
---|
| 5 | # @remarks wrc is untested, so are DLLs, and programs.
|
---|
| 6 |
|
---|
| 7 | #
|
---|
[3121] | 8 | # Copyright (c) 2008-2017 knut st. osmundsen <bird-kBuild-spam-xviiv@anduin.net>
|
---|
[2065] | 9 | #
|
---|
| 10 | # This file is part of kBuild.
|
---|
| 11 | #
|
---|
| 12 | # kBuild is free software; you can redistribute it and/or modify
|
---|
| 13 | # it under the terms of the GNU General Public License as published by
|
---|
| 14 | # the Free Software Foundation; either version 2 of the License, or
|
---|
| 15 | # (at your option) any later version.
|
---|
| 16 | #
|
---|
| 17 | # kBuild is distributed in the hope that it will be useful,
|
---|
| 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
| 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
| 20 | # GNU General Public License for more details.
|
---|
| 21 | #
|
---|
| 22 | # You should have received a copy of the GNU General Public License
|
---|
| 23 | # along with kBuild; if not, write to the Free Software
|
---|
| 24 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
---|
| 25 | #
|
---|
| 26 | #
|
---|
| 27 | # As a special exception you are granted permission to include this file, via
|
---|
| 28 | # the kmk include directive, as you wish without this in itself causing the
|
---|
| 29 | # resulting makefile, program or whatever to be covered by the GPL license.
|
---|
| 30 | # This exception does not however invalidate any other reasons why the makefile,
|
---|
| 31 | # program, whatever should not be covered the GPL.
|
---|
| 32 | #
|
---|
| 33 | #
|
---|
| 34 |
|
---|
[2068] | 35 | TOOL_OPENWATCOM-16 = Open Watcom v1.4 and later - 16-bit targets.
|
---|
| 36 | TOOL_OPENWATCOM-16_EXTENDS = OPENWATCOM
|
---|
| 37 | TOOL_OPENWATCOM-16_ASFLAGS.win ?= -bt=windows
|
---|
| 38 | TOOL_OPENWATCOM-16_CFLAGS.win ?= -bt=windows
|
---|
| 39 | TOOL_OPENWATCOM-16_CXXFLAGS.win ?= -bt=windows
|
---|
| 40 | TOOL_OPENWATCOM-16_RCFLAGS.win ?= -bt=windows
|
---|
| 41 | TOOL_OPENWATCOM-16_LDFLAGS.win ?= -bt=windows
|
---|
| 42 |
|
---|
[2069] | 43 |
|
---|
| 44 | TOOL_OPENWATCOM-16_COMPILE_AS_DEPEND =
|
---|
| 45 | TOOL_OPENWATCOM-16_COMPILE_AS_DEPORD =
|
---|
[2897] | 46 | TOOL_OPENWATCOM-16_COMPILE_AS_OUTPUT =
|
---|
[2895] | 47 | TOOL_OPENWATCOM-16_COMPILE_AS_OUTPUT_MAYBE = $(obj).err
|
---|
| 48 | ifdef TOOL_OPENWATCOM_USE_KSUBMIT
|
---|
[2069] | 49 | define TOOL_OPENWATCOM-16_COMPILE_AS_CMDS
|
---|
[2895] | 50 | $(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP_BD,, -P $(DEP_OBJ_INT) -s -f -q -o "$(dep)" -t "$(obj)" "$(obj)") \
|
---|
| 51 | $(TOOL_OPENWATCOM_AS) \
|
---|
| 52 | $(flags) \
|
---|
| 53 | $(addsuffix , $(addprefix -i=, $(call TOOL_OPENWATCOM_FIX_SLASHES,$(incs)))) \
|
---|
[3578] | 54 | $(qaddprefix sh,-d, $(defs)) \
|
---|
[2895] | 55 | -fo=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)) \
|
---|
| 56 | -fr=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)).err \
|
---|
| 57 | $(call TOOL_OPENWATCOM_FIX_SLASHES,$(abspath $(source)))
|
---|
| 58 | endef
|
---|
| 59 | else
|
---|
| 60 | define TOOL_OPENWATCOM-16_COMPILE_AS_CMDS
|
---|
[2749] | 61 | $(QUIET) $(call TOOL_OPENWATCOM_ENV_SETUP_BD) $(TOOL_OPENWATCOM_AS) \
|
---|
[2069] | 62 | $(flags) \
|
---|
[2572] | 63 | $(addsuffix , $(addprefix -i=, $(call TOOL_OPENWATCOM_FIX_SLASHES,$(incs)))) \
|
---|
[3578] | 64 | $(qaddprefix sh,-d, $(defs)) \
|
---|
[2572] | 65 | -fo=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)) \
|
---|
| 66 | -fr=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)).err \
|
---|
| 67 | $(call TOOL_OPENWATCOM_FIX_SLASHES,$(abspath $(source)))
|
---|
[2895] | 68 | $(QUIET)$(DEP_OBJ) -s -f -q -o "$(dep)" -t "$(obj)" "$(obj)"
|
---|
[2069] | 69 | endef
|
---|
[2895] | 70 | endif
|
---|
[2069] | 71 |
|
---|
[2068] | 72 | TOOL_OPENWATCOM-16_COMPILE_C_DEPEND =
|
---|
| 73 | TOOL_OPENWATCOM-16_COMPILE_C_DEPORD =
|
---|
[2897] | 74 | TOOL_OPENWATCOM-16_COMPILE_C_OUTPUT =
|
---|
[2895] | 75 | TOOL_OPENWATCOM-16_COMPILE_C_OUTPUT_MAYBE = $(obj).err
|
---|
| 76 | ifdef TOOL_OPENWATCOM_USE_KSUBMIT
|
---|
[2068] | 77 | define TOOL_OPENWATCOM-16_COMPILE_C_CMDS
|
---|
[2895] | 78 | $(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP_BD,, -P $(DEP_OBJ_INT) -s -f -q -o "$(dep)" -t "$(obj)" "$(obj)") \
|
---|
| 79 | $(TOOL_OPENWATCOM_CC16) \
|
---|
[2065] | 80 | $(flags) \
|
---|
[2572] | 81 | $(addsuffix , $(addprefix -i=, $(call TOOL_OPENWATCOM_FIX_SLASHES,$(incs)))) \
|
---|
[3578] | 82 | $(qaddprefix sh,-d, $(defs)) \
|
---|
[2572] | 83 | -fo=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)) \
|
---|
| 84 | -fr=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)).err \
|
---|
| 85 | $(call TOOL_OPENWATCOM_FIX_SLASHES,$(abspath $(source)))
|
---|
[2065] | 86 | endef
|
---|
[2895] | 87 | else
|
---|
| 88 | define TOOL_OPENWATCOM-16_COMPILE_C_CMDS
|
---|
| 89 | $(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP_BD) $(TOOL_OPENWATCOM_CC16) \
|
---|
| 90 | $(flags) \
|
---|
| 91 | $(addsuffix , $(addprefix -i=, $(call TOOL_OPENWATCOM_FIX_SLASHES,$(incs)))) \
|
---|
[3578] | 92 | $(qaddprefix sh,-d, $(defs)) \
|
---|
[2895] | 93 | -fo=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)) \
|
---|
| 94 | -fr=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)).err \
|
---|
| 95 | $(call TOOL_OPENWATCOM_FIX_SLASHES,$(abspath $(source)))
|
---|
| 96 | $(QUIET)$(DEP_OBJ) -s -f -q -o "$(dep)" -t "$(obj)" "$(obj)"
|
---|
| 97 | endef
|
---|
| 98 | endif
|
---|
[2065] | 99 |
|
---|
[2068] | 100 | TOOL_OPENWATCOM-16_COMPILE_CXX_DEPEND =
|
---|
| 101 | TOOL_OPENWATCOM-16_COMPILE_CXX_DEPORD =
|
---|
[2897] | 102 | TOOL_OPENWATCOM-16_COMPILE_CXX_OUTPUT =
|
---|
[2895] | 103 | TOOL_OPENWATCOM-16_COMPILE_CXX_OUTPUT_MAYBE = $(obj).err
|
---|
| 104 | ifdef TOOL_OPENWATCOM_USE_KSUBMIT
|
---|
[2068] | 105 | define TOOL_OPENWATCOM-16_COMPILE_CXX_CMDS
|
---|
[2895] | 106 | $(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP_BD,, -P $(DEP_OBJ_INT) -s -f -q -o "$(dep)" -t "$(obj)" "$(obj)") \
|
---|
| 107 | $(TOOL_OPENWATCOM_CXX16) \
|
---|
[2065] | 108 | $(flags) \
|
---|
[2572] | 109 | $(addsuffix , $(addprefix -i=, $(call TOOL_OPENWATCOM_FIX_SLASHES,$(incs)))) \
|
---|
[3578] | 110 | $(qaddprefix sh,-d, $(defs)) \
|
---|
[2572] | 111 | -fo=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)) \
|
---|
| 112 | -fr=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)).err \
|
---|
| 113 | $(call TOOL_OPENWATCOM_FIX_SLASHES,$(abspath $(source)))
|
---|
[2065] | 114 | endef
|
---|
[2895] | 115 | else
|
---|
| 116 | define TOOL_OPENWATCOM-16_COMPILE_CXX_CMDS
|
---|
| 117 | $(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP_BD) $(TOOL_OPENWATCOM_CXX16) \
|
---|
| 118 | $(flags) \
|
---|
| 119 | $(addsuffix , $(addprefix -i=, $(call TOOL_OPENWATCOM_FIX_SLASHES,$(incs)))) \
|
---|
[3578] | 120 | $(qaddprefix sh,-d, $(defs)) \
|
---|
[2895] | 121 | -fo=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)) \
|
---|
| 122 | -fr=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)).err \
|
---|
| 123 | $(call TOOL_OPENWATCOM_FIX_SLASHES,$(abspath $(source)))
|
---|
| 124 | $(QUIET)$(DEP_OBJ) -s -f -q -o "$(dep)" -t "$(obj)" "$(obj)"
|
---|
| 125 | endef
|
---|
| 126 | endif
|
---|
[2065] | 127 |
|
---|
[2068] | 128 | TOOL_OPENWATCOM-16_COMPILE_RC_OUTPUT =
|
---|
| 129 | TOOL_OPENWATCOM-16_COMPILE_RC_DEPEND =
|
---|
| 130 | TOOL_OPENWATCOM-16_COMPILE_RC_DEPORD =
|
---|
| 131 | define TOOL_OPENWATCOM-16_COMPILE_RC_CMDS
|
---|
[2895] | 132 | $(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP) \
|
---|
[2068] | 133 | $(TOOL_OPENWATCOM_RC) -r\
|
---|
[2065] | 134 | $(flags) \
|
---|
[2572] | 135 | $(addprefix -i=, $(call TOOL_OPENWATCOM_FIX_SLASHES,$(incs))) \
|
---|
[3578] | 136 | $(qaddprefix sh,-d, $(defs))\
|
---|
[2572] | 137 | -fo=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)) \
|
---|
| 138 | $(call TOOL_OPENWATCOM_FIX_SLASHES,$(abspath $(source)))
|
---|
[2065] | 139 | endef
|
---|
| 140 |
|
---|
[3303] | 141 | TOOL_OPENWATCOM-16_LINK_LIBRARY_OUTPUT_MAYBE_PRECIOUS = $(outbase).rsp
|
---|
[2068] | 142 | TOOL_OPENWATCOM-16_LINK_LIBRARY_DEPEND = $(othersrc)
|
---|
| 143 | TOOL_OPENWATCOM-16_LINK_LIBRARY_DEPORD =
|
---|
| 144 | define TOOL_OPENWATCOM-16_LINK_LIBRARY_CMDS
|
---|
[2572] | 145 | $(QUIET)$(APPEND) -tn $(outbase).rsp $(foreach obj,$(call TOOL_OPENWATCOM_FIX_SLASHES,$(objs) $(othersrc)),'+"$(obj)"')
|
---|
[2749] | 146 | $(QUIET)$(TOOL_OPENWATCOM_ENV_SETUP_BD) $(TOOL_OPENWATCOM_AR) $(flags) $(call TOOL_OPENWATCOM_FIX_SLASHES,$(out)) @$(outbase).rsp
|
---|
[2065] | 147 | endef
|
---|
| 148 |
|
---|
[3303] | 149 | TOOL_OPENWATCOM-16_LINK_PROGRAM_OUTPUT_MAYBE_PRECIOUS = $(outbase).map
|
---|
[2572] | 150 | TOOL_OPENWATCOM-16_LINK_PROGRAM_OUTPUT_MAYBE = $(outbase).sym
|
---|
[2068] | 151 | TOOL_OPENWATCOM-16_LINK_PROGRAM_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc)
|
---|
| 152 | TOOL_OPENWATCOM-16_LINK_PROGRAM_DEPORD =
|
---|
| 153 | define TOOL_OPENWATCOM-16_LINK_PROGRAM_CMDS
|
---|
[2749] | 154 | $(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP_BD,$(subst $(SP),,$(addsuffix ;,$(libpath))),-C $(dir $(out))) \
|
---|
[2068] | 155 | $(TOOL_OPENWATCOM_LD16) \
|
---|
[2065] | 156 | $(flags) \
|
---|
[2572] | 157 | -fe=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(out)) \
|
---|
| 158 | -fm=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(outbase).map) \
|
---|
| 159 | $(call TOOL_OPENWATCOM_FIX_SLASHES,$(filter-out %.res,$(objs))) \
|
---|
| 160 | $(call TOOL_OPENWATCOM_FIX_SLASHES,$(libs)) \
|
---|
| 161 | $(call TOOL_OPENWATCOM_FIX_SLASHES,$(othersrc))
|
---|
[2068] | 162 | $(if $(filter %.res,$(objs)), $(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP) \
|
---|
| 163 | $(TOOL_OPENWATCOM_RC) \
|
---|
[2065] | 164 | $(filter -bt=%,$(flags)) \
|
---|
[2572] | 165 | /fe=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(out)) \
|
---|
| 166 | $(call TOOL_OPENWATCOM_FIX_SLASHES,$(filter %.res,$(objs))))
|
---|
[2065] | 167 | endef
|
---|
| 168 |
|
---|
[3303] | 169 | TOOL_OPENWATCOM-16_LINK_DLL_OUTPUT_MAYBE_PRECIOUS = $(outbase).map
|
---|
[2572] | 170 | TOOL_OPENWATCOM-16_LINK_DLL_OUTPUT_MAYBE = $(outbase).sym
|
---|
[2068] | 171 | TOOL_OPENWATCOM-16_LINK_DLL_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc)
|
---|
| 172 | TOOL_OPENWATCOM-16_LINK_DLL_DEPORD =
|
---|
| 173 | define TOOL_OPENWATCOM-16_LINK_DLL_CMDS
|
---|
[2749] | 174 | $(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP_BD,$(subst $(SP),,$(addsuffix ;,$(libpath))),-C $(dir $(out))) \
|
---|
[2068] | 175 | $(TOOL_OPENWATCOM_LD16) \
|
---|
[2065] | 176 | $(flags) \
|
---|
[2572] | 177 | -fe=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(out)) \
|
---|
| 178 | -fm=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(outbase).map) \
|
---|
| 179 | $(call TOOL_OPENWATCOM_FIX_SLASHES,$(filter-out %.res,$(objs))) \
|
---|
| 180 | $(call TOOL_OPENWATCOM_FIX_SLASHES,$(libs)) \
|
---|
| 181 | $(call TOOL_OPENWATCOM_FIX_SLASHES,$(othersrc))
|
---|
[2068] | 182 | $(if $(filter %.res,$(objs)), $(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP) \
|
---|
| 183 | $(TOOL_OPENWATCOM_RC) \
|
---|
[2065] | 184 | $(filter -bt=%,$(flags)) \
|
---|
[2572] | 185 | /fe=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(out)) \
|
---|
| 186 | $(call TOOL_OPENWATCOM_FIX_SLASHES,$(filter %.res,$(objs))))
|
---|
[2065] | 187 | endef
|
---|
| 188 |
|
---|
[3303] | 189 | TOOL_OPENWATCOM-16_LINK_SYSMOD_OUTPUT_MAYBE_PRECIOUS = $(outbase).map
|
---|
[2572] | 190 | TOOL_OPENWATCOM-16_LINK_SYSMOD_OUTPUT_MAYBE = $(outbase).sym
|
---|
[2068] | 191 | TOOL_OPENWATCOM-16_LINK_SYSMOD_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc)
|
---|
| 192 | TOOL_OPENWATCOM-16_LINK_SYSMOD_DEPORD =
|
---|
| 193 | define TOOL_OPENWATCOM-16_LINK_SYSMOD_CMDS
|
---|
[2749] | 194 | $(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP_BD,$(subst $(SP),,$(addsuffix ;,$(libpath))),-C $(dir $(out))) \
|
---|
[2068] | 195 | $(TOOL_OPENWATCOM_LD16) \
|
---|
[2065] | 196 | $(flags) \
|
---|
[2572] | 197 | -fe=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(out)) \
|
---|
| 198 | -fm=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(outbase).map) \
|
---|
| 199 | $(call TOOL_OPENWATCOM_FIX_SLASHES,$(filter-out %.res,$(objs))) \
|
---|
| 200 | $(call TOOL_OPENWATCOM_FIX_SLASHES,$(libs)) \
|
---|
| 201 | $(call TOOL_OPENWATCOM_FIX_SLASHES,$(othersrc))
|
---|
[2068] | 202 | $(if $(filter %.res,$(objs)), $(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP) \
|
---|
| 203 | $(TOOL_OPENWATCOM_RC) \
|
---|
[2065] | 204 | $(filter -bt=%,$(flags)) \
|
---|
[2572] | 205 | /fe=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(out)) \
|
---|
| 206 | $(call TOOL_OPENWATCOM_FIX_SLASHES,$(filter %.res,$(objs))))
|
---|
[2065] | 207 | endef
|
---|
| 208 |
|
---|