3 # kBuild Tool Config - Open Watcom v1.4 and later, 16-bit targets.
5 # @remarks wrc is untested, so are DLLs, and programs.
8 # Copyright (c) 2008-2009 knut st. osmundsen <bird-kBuild-spamix@anduin.net>
10 # This file is part of kBuild.
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.
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.
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
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.
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
44 TOOL_OPENWATCOM-16_COMPILE_AS_DEPEND
=
45 TOOL_OPENWATCOM-16_COMPILE_AS_DEPORD
=
46 TOOL_OPENWATCOM-16_COMPILE_AS_OUTPUT
= $(obj
).err
47 define TOOL_OPENWATCOM-16_COMPILE_AS_CMDS
48 $(QUIET
) $(call TOOL_OPENWATCOM_ENV_SETUP
) $(TOOL_OPENWATCOM_CC16
) \
50 $(addsuffix , $(addprefix -i
=, $(subst /,\\,$(incs
)))) \
51 $(addprefix -d
, $(defs
)) \
52 -fo
=$(subst /,\\,$(obj
)) \
53 -fr
=$(subst /,\\,$(obj
)).err \
54 $(subst /,\\,$(abspath
$(source
)))
55 $(QUIET
)$(APPEND
) -n
$(obj
).err
59 TOOL_OPENWATCOM-16_COMPILE_C_DEPEND
=
60 TOOL_OPENWATCOM-16_COMPILE_C_DEPORD
=
61 TOOL_OPENWATCOM-16_COMPILE_C_OUTPUT
= $(obj
).err
62 define TOOL_OPENWATCOM-16_COMPILE_C_CMDS
63 $(QUIET
) $(call TOOL_OPENWATCOM_ENV_SETUP
) $(TOOL_OPENWATCOM_CC16
) \
65 $(addsuffix , $(addprefix -i
=, $(subst /,\\,$(incs
)))) \
66 $(addprefix -d
, $(defs
)) \
67 -fo
=$(subst /,\\,$(obj
)) \
68 -fr
=$(subst /,\\,$(obj
)).err \
69 $(subst /,\\,$(abspath
$(source
)))
70 $(QUIET
)$(APPEND
) -n
$(obj
).err
74 TOOL_OPENWATCOM-16_COMPILE_CXX_DEPEND
=
75 TOOL_OPENWATCOM-16_COMPILE_CXX_DEPORD
=
76 TOOL_OPENWATCOM-16_COMPILE_CXX_OUTPUT
= $(obj
).err
77 define TOOL_OPENWATCOM-16_COMPILE_CXX_CMDS
78 $(QUIET
) $(call TOOL_OPENWATCOM_ENV_SETUP
) $(TOOL_OPENWATCOM_CXX16
) \
80 $(addsuffix , $(addprefix -i
=, $(subst /,\\,$(incs
)))) \
81 $(addprefix -d
, $(defs
)) \
82 -fo
=$(subst /,\\,$(obj
)) \
83 -fr
=$(subst /,\\,$(obj
)).err \
84 $(subst /,\\,$(abspath
$(source
)))
85 $(QUIET
)$(APPEND
) -n
$(obj
).err
89 TOOL_OPENWATCOM-16_COMPILE_RC_OUTPUT
=
90 TOOL_OPENWATCOM-16_COMPILE_RC_DEPEND
=
91 TOOL_OPENWATCOM-16_COMPILE_RC_DEPORD
=
92 define TOOL_OPENWATCOM-16_COMPILE_RC_CMDS
93 $(QUIET
) $(call TOOL_OPENWATCOM_ENV_SETUP
) \
94 $(TOOL_OPENWATCOM_RC
) -r\
96 $(addprefix -i
=, $(subst /,\\,$(incs
))) \
97 $(addprefix -d
, $(defs
))\
98 -fo
=$(subst /,\\,obj
) \
99 $(subst /,\\,$(abspath
$(source
)))
102 TOOL_OPENWATCOM-16_LINK_LIBRARY_OUTPUT
= $(outbase
).rsp
103 TOOL_OPENWATCOM-16_LINK_LIBRARY_DEPEND
= $(othersrc
)
104 TOOL_OPENWATCOM-16_LINK_LIBRARY_DEPORD
=
105 define TOOL_OPENWATCOM-16_LINK_LIBRARY_CMDS
106 $(QUIET
)$(APPEND
) -tn
$(outbase
).rsp
$(foreach obj
,$(subst /,\
,$(objs
) $(othersrc
)),'+"$(obj)"')
107 $(QUIET
)$(TOOL_OPENWATCOM_ENV_SETUP
) $(TOOL_OPENWATCOM_AR
) $(flags
) $(subst /,\\,$(out
)) @
$(outbase
).rsp
110 TOOL_OPENWATCOM-16_LINK_PROGRAM_OUTPUT
= $(outbase
).map
111 TOOL_OPENWATCOM-16_LINK_PROGRAM_DEPEND
= $(foreach lib
,$(libs
),$(if
$(findstring $(lib
),$(subst /,x
,$(lib
))),, $(lib
))) $(othersrc
)
112 TOOL_OPENWATCOM-16_LINK_PROGRAM_DEPORD
=
113 define TOOL_OPENWATCOM-16_LINK_PROGRAM_CMDS
114 $(QUIET
)$(call TOOL_OPENWATCOM_ENV_SETUP
,$(subst $(SP
),,$(addsuffix ;,$(libpath
)))) \
115 $(TOOL_OPENWATCOM_LD16
) \
117 -fe
=$(subst /,\\,$(out
)) \
118 -fm
=$(subst /,\\,$(outbase
).map
) \
119 $(subst /,\\,$(filter-out %.res
,$(objs
))) \
120 $(subst /,\\,$(libs
)) \
121 $(subst /,\\,$(othersrc
))
122 $(if
$(filter %.res
,$(objs
)), $(QUIET
)$(call TOOL_OPENWATCOM_ENV_SETUP
) \
123 $(TOOL_OPENWATCOM_RC
) \
124 $(filter -bt
=%,$(flags
)) \
125 /fe
=$(subst /,\\,$(out
)) \
126 $(subst /,\\,$(filter %.res
,$(objs
))))
129 TOOL_OPENWATCOM-16_LINK_DLL_OUTPUT
= $(outbase
).map
130 TOOL_OPENWATCOM-16_LINK_DLL_DEPEND
= $(foreach lib
,$(libs
),$(if
$(findstring $(lib
),$(subst /,x
,$(lib
))),, $(lib
))) $(othersrc
)
131 TOOL_OPENWATCOM-16_LINK_DLL_DEPORD
=
132 define TOOL_OPENWATCOM-16_LINK_DLL_CMDS
133 $(QUIET
)$(call TOOL_OPENWATCOM_ENV_SETUP
,$(subst $(SP
),,$(addsuffix ;,$(libpath
)))) \
134 $(TOOL_OPENWATCOM_LD16
) \
136 -fe
=$(subst /,\\,$(out
)) \
137 -fm
=$(subst /,\\,$(outbase
).map
) \
138 $(subst /,\\,$(filter-out %.res
,$(objs
))) \
139 $(subst /,\\,$(libs
)) \
140 $(subst /,\\,$(othersrc
))
141 $(if
$(filter %.res
,$(objs
)), $(QUIET
)$(call TOOL_OPENWATCOM_ENV_SETUP
) \
142 $(TOOL_OPENWATCOM_RC
) \
143 $(filter -bt
=%,$(flags
)) \
144 /fe
=$(subst /,\\,$(out
)) \
145 $(subst /,\\,$(filter %.res
,$(objs
))))
148 TOOL_OPENWATCOM-16_LINK_SYSMOD_OUTPUT
= $(outbase
).map
149 TOOL_OPENWATCOM-16_LINK_SYSMOD_DEPEND
= $(foreach lib
,$(libs
),$(if
$(findstring $(lib
),$(subst /,x
,$(lib
))),, $(lib
))) $(othersrc
)
150 TOOL_OPENWATCOM-16_LINK_SYSMOD_DEPORD
=
151 define TOOL_OPENWATCOM-16_LINK_SYSMOD_CMDS
152 $(QUIET
)$(call TOOL_OPENWATCOM_ENV_SETUP
,$(subst $(SP
),,$(addsuffix ;,$(libpath
)))) \
153 $(TOOL_OPENWATCOM_LD16
) \
155 -fe
=$(subst /,\\,$(out
)) \
156 -fm
=$(subst /,\\,$(outbase
).map
) \
157 $(subst /,\\,$(filter-out %.res
,$(objs
))) \
158 $(subst /,\\,$(libs
)) \
159 $(subst /,\\,$(othersrc
))
160 $(if
$(filter %.res
,$(objs
)), $(QUIET
)$(call TOOL_OPENWATCOM_ENV_SETUP
) \
161 $(TOOL_OPENWATCOM_RC
) \
162 $(filter -bt
=%,$(flags
)) \
163 /fe
=$(subst /,\\,$(out
)) \
164 $(subst /,\\,$(filter %.res
,$(objs
))))