source: trunk/kBuild/tools/OPENWATCOM-16.kmk@ 3044

Last change on this file since 3044 was 2897, checked in by bird, 9 years ago

fixes

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 8.8 KB
Line 
1# $Id: OPENWATCOM-16.kmk 2897 2016-09-08 15:38:43Z bird $
2## @file
3# kBuild Tool Config - Open Watcom v1.4 and later, 16-bit targets.
4#
5# @remarks wrc is untested, so are DLLs, and programs.
6
7#
8# Copyright (c) 2008-2010 knut st. osmundsen <bird-kBuild-spamx@anduin.net>
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
35TOOL_OPENWATCOM-16 = Open Watcom v1.4 and later - 16-bit targets.
36TOOL_OPENWATCOM-16_EXTENDS = OPENWATCOM
37TOOL_OPENWATCOM-16_ASFLAGS.win ?= -bt=windows
38TOOL_OPENWATCOM-16_CFLAGS.win ?= -bt=windows
39TOOL_OPENWATCOM-16_CXXFLAGS.win ?= -bt=windows
40TOOL_OPENWATCOM-16_RCFLAGS.win ?= -bt=windows
41TOOL_OPENWATCOM-16_LDFLAGS.win ?= -bt=windows
42
43
44TOOL_OPENWATCOM-16_COMPILE_AS_DEPEND =
45TOOL_OPENWATCOM-16_COMPILE_AS_DEPORD =
46TOOL_OPENWATCOM-16_COMPILE_AS_OUTPUT =
47TOOL_OPENWATCOM-16_COMPILE_AS_OUTPUT_MAYBE = $(obj).err
48ifdef TOOL_OPENWATCOM_USE_KSUBMIT
49define TOOL_OPENWATCOM-16_COMPILE_AS_CMDS
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)))) \
54 $(addprefix -d, $(defs)) \
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)))
58endef
59else
60define TOOL_OPENWATCOM-16_COMPILE_AS_CMDS
61 $(QUIET) $(call TOOL_OPENWATCOM_ENV_SETUP_BD) $(TOOL_OPENWATCOM_AS) \
62 $(flags) \
63 $(addsuffix , $(addprefix -i=, $(call TOOL_OPENWATCOM_FIX_SLASHES,$(incs)))) \
64 $(addprefix -d, $(defs)) \
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)))
68 $(QUIET)$(DEP_OBJ) -s -f -q -o "$(dep)" -t "$(obj)" "$(obj)"
69endef
70endif
71
72TOOL_OPENWATCOM-16_COMPILE_C_DEPEND =
73TOOL_OPENWATCOM-16_COMPILE_C_DEPORD =
74TOOL_OPENWATCOM-16_COMPILE_C_OUTPUT =
75TOOL_OPENWATCOM-16_COMPILE_C_OUTPUT_MAYBE = $(obj).err
76ifdef TOOL_OPENWATCOM_USE_KSUBMIT
77define TOOL_OPENWATCOM-16_COMPILE_C_CMDS
78 $(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP_BD,, -P $(DEP_OBJ_INT) -s -f -q -o "$(dep)" -t "$(obj)" "$(obj)") \
79 $(TOOL_OPENWATCOM_CC16) \
80 $(flags) \
81 $(addsuffix , $(addprefix -i=, $(call TOOL_OPENWATCOM_FIX_SLASHES,$(incs)))) \
82 $(addprefix -d, $(defs)) \
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)))
86endef
87else
88define 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)))) \
92 $(addprefix -d, $(defs)) \
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)"
97endef
98endif
99
100TOOL_OPENWATCOM-16_COMPILE_CXX_DEPEND =
101TOOL_OPENWATCOM-16_COMPILE_CXX_DEPORD =
102TOOL_OPENWATCOM-16_COMPILE_CXX_OUTPUT =
103TOOL_OPENWATCOM-16_COMPILE_CXX_OUTPUT_MAYBE = $(obj).err
104ifdef TOOL_OPENWATCOM_USE_KSUBMIT
105define TOOL_OPENWATCOM-16_COMPILE_CXX_CMDS
106 $(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP_BD,, -P $(DEP_OBJ_INT) -s -f -q -o "$(dep)" -t "$(obj)" "$(obj)") \
107 $(TOOL_OPENWATCOM_CXX16) \
108 $(flags) \
109 $(addsuffix , $(addprefix -i=, $(call TOOL_OPENWATCOM_FIX_SLASHES,$(incs)))) \
110 $(addprefix -d, $(defs)) \
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)))
114endef
115else
116define 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)))) \
120 $(addprefix -d, $(defs)) \
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)"
125endef
126endif
127
128TOOL_OPENWATCOM-16_COMPILE_RC_OUTPUT =
129TOOL_OPENWATCOM-16_COMPILE_RC_DEPEND =
130TOOL_OPENWATCOM-16_COMPILE_RC_DEPORD =
131define TOOL_OPENWATCOM-16_COMPILE_RC_CMDS
132 $(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP) \
133 $(TOOL_OPENWATCOM_RC) -r\
134 $(flags) \
135 $(addprefix -i=, $(call TOOL_OPENWATCOM_FIX_SLASHES,$(incs))) \
136 $(addprefix -d, $(defs))\
137 -fo=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)) \
138 $(call TOOL_OPENWATCOM_FIX_SLASHES,$(abspath $(source)))
139endef
140
141TOOL_OPENWATCOM-16_LINK_LIBRARY_OUTPUT = $(outbase).rsp
142TOOL_OPENWATCOM-16_LINK_LIBRARY_DEPEND = $(othersrc)
143TOOL_OPENWATCOM-16_LINK_LIBRARY_DEPORD =
144define TOOL_OPENWATCOM-16_LINK_LIBRARY_CMDS
145 $(QUIET)$(APPEND) -tn $(outbase).rsp $(foreach obj,$(call TOOL_OPENWATCOM_FIX_SLASHES,$(objs) $(othersrc)),'+"$(obj)"')
146 $(QUIET)$(TOOL_OPENWATCOM_ENV_SETUP_BD) $(TOOL_OPENWATCOM_AR) $(flags) $(call TOOL_OPENWATCOM_FIX_SLASHES,$(out)) @$(outbase).rsp
147endef
148
149TOOL_OPENWATCOM-16_LINK_PROGRAM_OUTPUT = $(outbase).map
150TOOL_OPENWATCOM-16_LINK_PROGRAM_OUTPUT_MAYBE = $(outbase).sym
151TOOL_OPENWATCOM-16_LINK_PROGRAM_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc)
152TOOL_OPENWATCOM-16_LINK_PROGRAM_DEPORD =
153define TOOL_OPENWATCOM-16_LINK_PROGRAM_CMDS
154 $(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP_BD,$(subst $(SP),,$(addsuffix ;,$(libpath))),-C $(dir $(out))) \
155 $(TOOL_OPENWATCOM_LD16) \
156 $(flags) \
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))
162 $(if $(filter %.res,$(objs)), $(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP) \
163 $(TOOL_OPENWATCOM_RC) \
164 $(filter -bt=%,$(flags)) \
165 /fe=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(out)) \
166 $(call TOOL_OPENWATCOM_FIX_SLASHES,$(filter %.res,$(objs))))
167endef
168
169TOOL_OPENWATCOM-16_LINK_DLL_OUTPUT = $(outbase).map
170TOOL_OPENWATCOM-16_LINK_DLL_OUTPUT_MAYBE = $(outbase).sym
171TOOL_OPENWATCOM-16_LINK_DLL_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc)
172TOOL_OPENWATCOM-16_LINK_DLL_DEPORD =
173define TOOL_OPENWATCOM-16_LINK_DLL_CMDS
174 $(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP_BD,$(subst $(SP),,$(addsuffix ;,$(libpath))),-C $(dir $(out))) \
175 $(TOOL_OPENWATCOM_LD16) \
176 $(flags) \
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))
182 $(if $(filter %.res,$(objs)), $(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP) \
183 $(TOOL_OPENWATCOM_RC) \
184 $(filter -bt=%,$(flags)) \
185 /fe=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(out)) \
186 $(call TOOL_OPENWATCOM_FIX_SLASHES,$(filter %.res,$(objs))))
187endef
188
189TOOL_OPENWATCOM-16_LINK_SYSMOD_OUTPUT = $(outbase).map
190TOOL_OPENWATCOM-16_LINK_SYSMOD_OUTPUT_MAYBE = $(outbase).sym
191TOOL_OPENWATCOM-16_LINK_SYSMOD_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc)
192TOOL_OPENWATCOM-16_LINK_SYSMOD_DEPORD =
193define TOOL_OPENWATCOM-16_LINK_SYSMOD_CMDS
194 $(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP_BD,$(subst $(SP),,$(addsuffix ;,$(libpath))),-C $(dir $(out))) \
195 $(TOOL_OPENWATCOM_LD16) \
196 $(flags) \
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))
202 $(if $(filter %.res,$(objs)), $(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP) \
203 $(TOOL_OPENWATCOM_RC) \
204 $(filter -bt=%,$(flags)) \
205 /fe=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(out)) \
206 $(call TOOL_OPENWATCOM_FIX_SLASHES,$(filter %.res,$(objs))))
207endef
208
Note: See TracBrowser for help on using the repository browser.