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

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

Use kObjDep more.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 8.7 KB
Line 
1# $Id: OPENWATCOM-16.kmk 2895 2016-09-08 13:28:37Z 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_MAYBE = $(obj).err
47ifdef TOOL_OPENWATCOM_USE_KSUBMIT
48define TOOL_OPENWATCOM-16_COMPILE_AS_CMDS
49 $(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP_BD,, -P $(DEP_OBJ_INT) -s -f -q -o "$(dep)" -t "$(obj)" "$(obj)") \
50 $(TOOL_OPENWATCOM_AS) \
51 $(flags) \
52 $(addsuffix , $(addprefix -i=, $(call TOOL_OPENWATCOM_FIX_SLASHES,$(incs)))) \
53 $(addprefix -d, $(defs)) \
54 -fo=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)) \
55 -fr=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)).err \
56 $(call TOOL_OPENWATCOM_FIX_SLASHES,$(abspath $(source)))
57endef
58else
59define TOOL_OPENWATCOM-16_COMPILE_AS_CMDS
60 $(QUIET) $(call TOOL_OPENWATCOM_ENV_SETUP_BD) $(TOOL_OPENWATCOM_AS) \
61 $(flags) \
62 $(addsuffix , $(addprefix -i=, $(call TOOL_OPENWATCOM_FIX_SLASHES,$(incs)))) \
63 $(addprefix -d, $(defs)) \
64 -fo=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)) \
65 -fr=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)).err \
66 $(call TOOL_OPENWATCOM_FIX_SLASHES,$(abspath $(source)))
67 $(QUIET)$(DEP_OBJ) -s -f -q -o "$(dep)" -t "$(obj)" "$(obj)"
68endef
69endif
70
71TOOL_OPENWATCOM-16_COMPILE_C_DEPEND =
72TOOL_OPENWATCOM-16_COMPILE_C_DEPORD =
73TOOL_OPENWATCOM-16_COMPILE_C_OUTPUT_MAYBE = $(obj).err
74ifdef TOOL_OPENWATCOM_USE_KSUBMIT
75define TOOL_OPENWATCOM-16_COMPILE_C_CMDS
76 $(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP_BD,, -P $(DEP_OBJ_INT) -s -f -q -o "$(dep)" -t "$(obj)" "$(obj)") \
77 $(TOOL_OPENWATCOM_CC16) \
78 $(flags) \
79 $(addsuffix , $(addprefix -i=, $(call TOOL_OPENWATCOM_FIX_SLASHES,$(incs)))) \
80 $(addprefix -d, $(defs)) \
81 -fo=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)) \
82 -fr=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)).err \
83 $(call TOOL_OPENWATCOM_FIX_SLASHES,$(abspath $(source)))
84endef
85else
86define TOOL_OPENWATCOM-16_COMPILE_C_CMDS
87 $(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP_BD) $(TOOL_OPENWATCOM_CC16) \
88 $(flags) \
89 $(addsuffix , $(addprefix -i=, $(call TOOL_OPENWATCOM_FIX_SLASHES,$(incs)))) \
90 $(addprefix -d, $(defs)) \
91 -fo=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)) \
92 -fr=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)).err \
93 $(call TOOL_OPENWATCOM_FIX_SLASHES,$(abspath $(source)))
94 $(QUIET)$(DEP_OBJ) -s -f -q -o "$(dep)" -t "$(obj)" "$(obj)"
95endef
96endif
97
98TOOL_OPENWATCOM-16_COMPILE_CXX_DEPEND =
99TOOL_OPENWATCOM-16_COMPILE_CXX_DEPORD =
100TOOL_OPENWATCOM-16_COMPILE_CXX_OUTPUT_MAYBE = $(obj).err
101ifdef TOOL_OPENWATCOM_USE_KSUBMIT
102define TOOL_OPENWATCOM-16_COMPILE_CXX_CMDS
103 $(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP_BD,, -P $(DEP_OBJ_INT) -s -f -q -o "$(dep)" -t "$(obj)" "$(obj)") \
104 $(TOOL_OPENWATCOM_CXX16) \
105 $(flags) \
106 $(addsuffix , $(addprefix -i=, $(call TOOL_OPENWATCOM_FIX_SLASHES,$(incs)))) \
107 $(addprefix -d, $(defs)) \
108 -fo=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)) \
109 -fr=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)).err \
110 $(call TOOL_OPENWATCOM_FIX_SLASHES,$(abspath $(source)))
111endef
112else
113define TOOL_OPENWATCOM-16_COMPILE_CXX_CMDS
114 $(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP_BD) $(TOOL_OPENWATCOM_CXX16) \
115 $(flags) \
116 $(addsuffix , $(addprefix -i=, $(call TOOL_OPENWATCOM_FIX_SLASHES,$(incs)))) \
117 $(addprefix -d, $(defs)) \
118 -fo=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)) \
119 -fr=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)).err \
120 $(call TOOL_OPENWATCOM_FIX_SLASHES,$(abspath $(source)))
121 $(QUIET)$(DEP_OBJ) -s -f -q -o "$(dep)" -t "$(obj)" "$(obj)"
122endef
123endif
124
125TOOL_OPENWATCOM-16_COMPILE_RC_OUTPUT =
126TOOL_OPENWATCOM-16_COMPILE_RC_DEPEND =
127TOOL_OPENWATCOM-16_COMPILE_RC_DEPORD =
128define TOOL_OPENWATCOM-16_COMPILE_RC_CMDS
129 $(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP) \
130 $(TOOL_OPENWATCOM_RC) -r\
131 $(flags) \
132 $(addprefix -i=, $(call TOOL_OPENWATCOM_FIX_SLASHES,$(incs))) \
133 $(addprefix -d, $(defs))\
134 -fo=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)) \
135 $(call TOOL_OPENWATCOM_FIX_SLASHES,$(abspath $(source)))
136endef
137
138TOOL_OPENWATCOM-16_LINK_LIBRARY_OUTPUT = $(outbase).rsp
139TOOL_OPENWATCOM-16_LINK_LIBRARY_DEPEND = $(othersrc)
140TOOL_OPENWATCOM-16_LINK_LIBRARY_DEPORD =
141define TOOL_OPENWATCOM-16_LINK_LIBRARY_CMDS
142 $(QUIET)$(APPEND) -tn $(outbase).rsp $(foreach obj,$(call TOOL_OPENWATCOM_FIX_SLASHES,$(objs) $(othersrc)),'+"$(obj)"')
143 $(QUIET)$(TOOL_OPENWATCOM_ENV_SETUP_BD) $(TOOL_OPENWATCOM_AR) $(flags) $(call TOOL_OPENWATCOM_FIX_SLASHES,$(out)) @$(outbase).rsp
144endef
145
146TOOL_OPENWATCOM-16_LINK_PROGRAM_OUTPUT = $(outbase).map
147TOOL_OPENWATCOM-16_LINK_PROGRAM_OUTPUT_MAYBE = $(outbase).sym
148TOOL_OPENWATCOM-16_LINK_PROGRAM_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc)
149TOOL_OPENWATCOM-16_LINK_PROGRAM_DEPORD =
150define TOOL_OPENWATCOM-16_LINK_PROGRAM_CMDS
151 $(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP_BD,$(subst $(SP),,$(addsuffix ;,$(libpath))),-C $(dir $(out))) \
152 $(TOOL_OPENWATCOM_LD16) \
153 $(flags) \
154 -fe=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(out)) \
155 -fm=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(outbase).map) \
156 $(call TOOL_OPENWATCOM_FIX_SLASHES,$(filter-out %.res,$(objs))) \
157 $(call TOOL_OPENWATCOM_FIX_SLASHES,$(libs)) \
158 $(call TOOL_OPENWATCOM_FIX_SLASHES,$(othersrc))
159 $(if $(filter %.res,$(objs)), $(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP) \
160 $(TOOL_OPENWATCOM_RC) \
161 $(filter -bt=%,$(flags)) \
162 /fe=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(out)) \
163 $(call TOOL_OPENWATCOM_FIX_SLASHES,$(filter %.res,$(objs))))
164endef
165
166TOOL_OPENWATCOM-16_LINK_DLL_OUTPUT = $(outbase).map
167TOOL_OPENWATCOM-16_LINK_DLL_OUTPUT_MAYBE = $(outbase).sym
168TOOL_OPENWATCOM-16_LINK_DLL_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc)
169TOOL_OPENWATCOM-16_LINK_DLL_DEPORD =
170define TOOL_OPENWATCOM-16_LINK_DLL_CMDS
171 $(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP_BD,$(subst $(SP),,$(addsuffix ;,$(libpath))),-C $(dir $(out))) \
172 $(TOOL_OPENWATCOM_LD16) \
173 $(flags) \
174 -fe=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(out)) \
175 -fm=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(outbase).map) \
176 $(call TOOL_OPENWATCOM_FIX_SLASHES,$(filter-out %.res,$(objs))) \
177 $(call TOOL_OPENWATCOM_FIX_SLASHES,$(libs)) \
178 $(call TOOL_OPENWATCOM_FIX_SLASHES,$(othersrc))
179 $(if $(filter %.res,$(objs)), $(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP) \
180 $(TOOL_OPENWATCOM_RC) \
181 $(filter -bt=%,$(flags)) \
182 /fe=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(out)) \
183 $(call TOOL_OPENWATCOM_FIX_SLASHES,$(filter %.res,$(objs))))
184endef
185
186TOOL_OPENWATCOM-16_LINK_SYSMOD_OUTPUT = $(outbase).map
187TOOL_OPENWATCOM-16_LINK_SYSMOD_OUTPUT_MAYBE = $(outbase).sym
188TOOL_OPENWATCOM-16_LINK_SYSMOD_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc)
189TOOL_OPENWATCOM-16_LINK_SYSMOD_DEPORD =
190define TOOL_OPENWATCOM-16_LINK_SYSMOD_CMDS
191 $(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP_BD,$(subst $(SP),,$(addsuffix ;,$(libpath))),-C $(dir $(out))) \
192 $(TOOL_OPENWATCOM_LD16) \
193 $(flags) \
194 -fe=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(out)) \
195 -fm=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(outbase).map) \
196 $(call TOOL_OPENWATCOM_FIX_SLASHES,$(filter-out %.res,$(objs))) \
197 $(call TOOL_OPENWATCOM_FIX_SLASHES,$(libs)) \
198 $(call TOOL_OPENWATCOM_FIX_SLASHES,$(othersrc))
199 $(if $(filter %.res,$(objs)), $(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP) \
200 $(TOOL_OPENWATCOM_RC) \
201 $(filter -bt=%,$(flags)) \
202 /fe=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(out)) \
203 $(call TOOL_OPENWATCOM_FIX_SLASHES,$(filter %.res,$(objs))))
204endef
205
Note: See TracBrowser for help on using the repository browser.