3 # kBuild Tool Config - Watcom C v11.0c, 16-bit targets.
5 # @remarks wrc is untested, so are DLLs, and programs.
8 # Copyright (c) 2008-2017 knut st. osmundsen <bird-kBuild-spam-xviiv@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_WATCOMC11C-16
= Watcom C
/C
++ v11.0c
- 16-bit targets.
36 TOOL_WATCOMC11C-16_EXTENDS
= WATCOMC11C
37 TOOL_WATCOMC11C-16_ASFLAGS.win ?
= -bt
=windows
38 TOOL_WATCOMC11C-16_CFLAGS.win ?
= -bt
=windows
39 TOOL_WATCOMC11C-16_CXXFLAGS.win ?
= -bt
=windows
40 TOOL_WATCOMC11C-16_RCFLAGS.win ?
= -bt
=windows
41 TOOL_WATCOMC11C-16_LDFLAGS.win ?
= -bt
=windows
43 TOOL_WATCOMC11C-16_COMPILE_C_DEPEND
=
44 TOOL_WATCOMC11C-16_COMPILE_C_DEPORD
=
45 TOOL_WATCOMC11C-16_COMPILE_C_OUTPUT
= $(obj
).err
46 define TOOL_WATCOMC11C-16_COMPILE_C_CMDS
47 $(QUIET
) $(call TOOL_WATCOMC11C_ENV_SETUP_BD
) $(TOOL_WATCOMC11C_CC16
) \
49 $(addsuffix , $(addprefix -i
=, $(subst /,\\,$(incs
)))) \
50 $(qaddprefix sh
,-d
, $(defs
)) \
51 -fo
=$(subst /,\\,$(obj
)) \
52 -fr
=$(subst /,\\,$(obj
)).err \
53 $(subst /,\\,$(abspath
$(source
)))
54 $(QUIET
)$(APPEND
) -n
$(obj
).err
58 TOOL_WATCOMC11C-16_COMPILE_CXX_DEPEND
=
59 TOOL_WATCOMC11C-16_COMPILE_CXX_DEPORD
=
60 TOOL_WATCOMC11C-16_COMPILE_CXX_OUTPUT
= $(obj
).err
61 define TOOL_WATCOMC11C-16_COMPILE_CXX_CMDS
62 $(QUIET
) $(call TOOL_WATCOMC11C_ENV_SETUP_BD
) $(TOOL_WATCOMC11C_CXX16
) \
64 $(addsuffix , $(addprefix -i
=, $(subst /,\\,$(incs
)))) \
65 $(qaddprefix sh
,-d
, $(defs
)) \
66 -fo
=$(subst /,\\,$(obj
)) \
67 -fr
=$(subst /,\\,$(obj
)).err \
68 $(subst /,\\,$(abspath
$(source
)))
69 $(QUIET
)$(APPEND
) -n
$(obj
).err
73 TOOL_WATCOMC11C-16_COMPILE_RC_OUTPUT
=
74 TOOL_WATCOMC11C-16_COMPILE_RC_DEPEND
=
75 TOOL_WATCOMC11C-16_COMPILE_RC_DEPORD
=
76 define TOOL_WATCOMC11C-16_COMPILE_RC_CMDS
77 $(QUIET
) $(call TOOL_WATCOMC11C_ENV_SETUP
) \
78 $(TOOL_WATCOMC11C_RC
) -r\
80 $(addprefix -i
=, $(subst /,\\,$(incs
))) \
81 $(qaddprefix sh
,-d
, $(defs
))\
82 -fo
=$(subst /,\\,$(obj
)) \
83 $(subst /,\\,$(abspath
$(source
)))
86 TOOL_WATCOMC11C-16_LINK_LIBRARY_OUTPUT
= ## @todo $(outbase).rsp
87 TOOL_WATCOMC11C-16_LINK_LIBRARY_DEPEND
= $(othersrc
)
88 TOOL_WATCOMC11C-16_LINK_LIBRARY_DEPORD
=
89 define TOOL_WATCOMC11C-16_LINK_LIBRARY_CMDS
90 $(QUIET
)$(APPEND
) -tn
$(outbase
).rsp
$(foreach obj
,$(subst /,\
,$(objs
) $(othersrc
)),'+"$(obj)"')
91 $(QUIET
)$(TOOL_WATCOMC11C_ENV_SETUP_BD
) $(TOOL_WATCOMC11C_AR
) $(flags
) $(subst /,\\,$(out
)) @
$(outbase
).rsp
94 TOOL_WATCOMC11C-16_LINK_PROGRAM_OUTPUT
= $(outbase
).map
95 TOOL_WATCOMC11C-16_LINK_PROGRAM_DEPEND
= $(foreach lib
,$(libs
),$(if
$(findstring $(lib
),$(subst /,x
,$(lib
))),, $(lib
))) $(othersrc
)
96 TOOL_WATCOMC11C-16_LINK_PROGRAM_DEPORD
=
97 define TOOL_WATCOMC11C-16_LINK_PROGRAM_CMDS
98 $(QUIET
)$(call TOOL_WATCOMC11C_ENV_SETUP_BD
,$(subst $(SP
),,$(addsuffix ;,$(libpath
))),-C
$(dir $(out
))) \
99 $(TOOL_WATCOMC11C_LD16
) \
101 -fe
=$(subst /,\\,$(out
)) \
102 -fm
=$(subst /,\\,$(outbase
).map
) \
103 $(subst /,\\,$(filter-out %.res
,$(objs
))) \
104 $(subst /,\\,$(libs
)) \
105 $(subst /,\\,$(othersrc
))
106 $(if
$(filter %.res
,$(objs
)), $(QUIET
)$(call TOOL_WATCOMC11C_ENV_SETUP
) \
107 $(TOOL_WATCOMC11C_RC
) \
108 $(filter -bt
=%,$(flags
)) \
109 /fe
=$(subst /,\\,$(out
)) \
110 $(subst /,\\,$(filter %.res
,$(objs
))))
113 TOOL_WATCOMC11C-16_LINK_DLL_OUTPUT
= $(outbase
).map
114 TOOL_WATCOMC11C-16_LINK_DLL_DEPEND
= $(foreach lib
,$(libs
),$(if
$(findstring $(lib
),$(subst /,x
,$(lib
))),, $(lib
))) $(othersrc
)
115 TOOL_WATCOMC11C-16_LINK_DLL_DEPORD
=
116 define TOOL_WATCOMC11C-16_LINK_DLL_CMDS
117 $(QUIET
)$(call TOOL_WATCOMC11C_ENV_SETUP_BD
,$(subst $(SP
),,$(addsuffix ;,$(libpath
))),-C
$(dir $(out
))) \
118 $(TOOL_WATCOMC11C_LD16
) \
120 -fe
=$(subst /,\\,$(out
)) \
121 -fm
=$(subst /,\\,$(outbase
).map
) \
122 $(subst /,\\,$(filter-out %.res
,$(objs
))) \
123 $(subst /,\\,$(libs
)) \
124 $(subst /,\\,$(othersrc
))
125 $(if
$(filter %.res
,$(objs
)), $(QUIET
)$(call TOOL_WATCOMC11C_ENV_SETUP
) \
126 $(TOOL_WATCOMC11C_RC
) \
127 $(filter -bt
=%,$(flags
)) \
128 /fe
=$(subst /,\\,$(out
)) \
129 $(subst /,\\,$(filter %.res
,$(objs
))))
132 TOOL_WATCOMC11C-16_LINK_SYSMOD_OUTPUT
= $(outbase
).map
133 TOOL_WATCOMC11C-16_LINK_SYSMOD_DEPEND
= $(foreach lib
,$(libs
),$(if
$(findstring $(lib
),$(subst /,x
,$(lib
))),, $(lib
))) $(othersrc
)
134 TOOL_WATCOMC11C-16_LINK_SYSMOD_DEPORD
=
135 define TOOL_WATCOMC11C-16_LINK_SYSMOD_CMDS
136 $(QUIET
)$(call TOOL_WATCOMC11C_ENV_SETUP_BD
,$(subst $(SP
),,$(addsuffix ;,$(libpath
))),-C
$(dir $(out
))) \
137 $(TOOL_WATCOMC11C_LD16
) \
139 -fe
=$(subst /,\\,$(out
)) \
140 -fm
=$(subst /,\\,$(outbase
).map
) \
141 $(subst /,\\,$(filter-out %.res
,$(objs
))) \
142 $(subst /,\\,$(libs
)) \
143 $(subst /,\\,$(othersrc
))
144 $(if
$(filter %.res
,$(objs
)), $(QUIET
)$(call TOOL_WATCOMC11C_ENV_SETUP
) \
145 $(TOOL_WATCOMC11C_RC
) \
146 $(filter -bt
=%,$(flags
)) \
147 /fe
=$(subst /,\\,$(out
)) \
148 $(subst /,\\,$(filter %.res
,$(objs
))))