source: trunk/kBuild/tools/WATCOMC11C-16.kmk@ 2068

Last change on this file since 2068 was 2068, checked in by bird, 17 years ago

Open Watcom, some Watcom adjustments.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 5.8 KB
Line 
1# $Id: WATCOMC11C-16.kmk 2068 2008-11-17 01:18:09Z bird $
2## @file
3# kBuild Tool Config - Watcom C v11.0c, 16-bit targets.
4#
5# @remarks wrc is untested, so are DLLs, and programs.
6
7#
8# Copyright (c) 2008 knut st. osmundsen <bird-kBuild-spam@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_WATCOMC11C-16 = Watcom C/C++ v11.0c - 16-bit targets.
36TOOL_WATCOMC11C-16_EXTENDS = WATCOMC11C
37TOOL_WATCOMC11C-16_ASFLAGS.win ?= -bt=windows
38TOOL_WATCOMC11C-16_CFLAGS.win ?= -bt=windows
39TOOL_WATCOMC11C-16_CXXFLAGS.win ?= -bt=windows
40TOOL_WATCOMC11C-16_RCFLAGS.win ?= -bt=windows
41TOOL_WATCOMC11C-16_LDFLAGS.win ?= -bt=windows
42
43TOOL_WATCOMC11C-16_COMPILE_C_DEPEND =
44TOOL_WATCOMC11C-16_COMPILE_C_DEPORD =
45TOOL_WATCOMC11C-16_COMPILE_C_OUTPUT = $(obj).err
46define TOOL_WATCOMC11C-16_COMPILE_C_CMDS
47 $(QUIET) $(call TOOL_WATCOMC11C_ENV_SETUP) $(TOOL_WATCOMC11C_CC16) \
48 $(flags) \
49 $(addsuffix , $(addprefix -i=, $(subst /,\\,$(incs)))) \
50 $(addprefix -d, $(defs)) \
51 -fo=$(subst /,\\,$(obj)) \
52 -fr=$(subst /,\\,$(obj)).err \
53 $(subst /,\\,$(abspath $(source)))
54 $(QUIET)$(APPEND) -n $(obj).err
55## @todo dependencies
56endef
57
58TOOL_WATCOMC11C-16_COMPILE_CXX_DEPEND =
59TOOL_WATCOMC11C-16_COMPILE_CXX_DEPORD =
60TOOL_WATCOMC11C-16_COMPILE_CXX_OUTPUT = $(obj).err
61define TOOL_WATCOMC11C-16_COMPILE_CXX_CMDS
62 $(QUIET) $(call TOOL_WATCOMC11C_ENV_SETUP) $(TOOL_WATCOMC11C_CXX16) \
63 $(flags) \
64 $(addsuffix , $(addprefix -i=, $(subst /,\\,$(incs)))) \
65 $(addprefix -d, $(defs)) \
66 -fo=$(subst /,\\,$(obj)) \
67 -fr=$(subst /,\\,$(obj)).err \
68 $(subst /,\\,$(abspath $(source)))
69 $(QUIET)$(APPEND) -n $(obj).err
70## @todo dependencies
71endef
72
73TOOL_WATCOMC11C-16_COMPILE_RC_OUTPUT =
74TOOL_WATCOMC11C-16_COMPILE_RC_DEPEND =
75TOOL_WATCOMC11C-16_COMPILE_RC_DEPORD =
76define TOOL_WATCOMC11C-16_COMPILE_RC_CMDS
77 $(QUIET) $(call TOOL_WATCOMC11C_ENV_SETUP) \
78 $(TOOL_WATCOMC11C_RC) -r\
79 $(flags) \
80 $(addprefix -i=, $(subst /,\\,$(incs))) \
81 $(addprefix -d, $(defs))\
82 -fo=$(subst /,\\,obj) \
83 $(subst /,\\,$(abspath $(source)))
84endef
85
86TOOL_WATCOMC11C-16_LINK_LIBRARY_OUTPUT = ## @todo $(outbase).rsp
87TOOL_WATCOMC11C-16_LINK_LIBRARY_DEPEND = $(othersrc)
88TOOL_WATCOMC11C-16_LINK_LIBRARY_DEPORD =
89define TOOL_WATCOMC11C-16_LINK_LIBRARY_CMDS
90 $(if $(strip $(othersrc)),\
91 $(QUIET)$(TOOL_WATCOMC11C_ENV_SETUP) \
92 $(TOOL_WATCOMC11C_IMP) $(TOOL_WATCOMC11C_IMPFLAGS) $(subst /,\\,$(out)) $(subst /,\\,$(othersrc)) )
93 $(if $(strip $(objs)),$(QUIET)$(TOOL_WATCOMC11C_ENV_SETUP) \
94 $(QUIET)$(TOOL_WATCOMC11C_ENV_SETUP) \
95 $(TOOL_WATCOMC11C_AR) $(flags) $(subst /,\\,$(out)) $(foreach obj,$(subst /,\\,$(objs)),+"$(obj)") ";" )
96endef
97
98TOOL_WATCOMC11C-16_LINK_PROGRAM_OUTPUT = $(outbase).map
99TOOL_WATCOMC11C-16_LINK_PROGRAM_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc)
100TOOL_WATCOMC11C-16_LINK_PROGRAM_DEPORD =
101define TOOL_WATCOMC11C-16_LINK_PROGRAM_CMDS
102 $(QUIET)$(call TOOL_WATCOMC11C_ENV_SETUP,$(subst $(SP),,$(addsuffix ;,$(libpath)))) \
103 $(TOOL_WATCOMC11C_LD16) \
104 $(flags) \
105 -fe=$(subst /,\\,$(out)) \
106 -fm=$(subst /,\\,$(outbase).map) \
107 $(subst /,\\,$(filter-out %.res,$(objs))) \
108 $(subst /,\\,$(libs)) \
109 $(subst /,\\,$(othersrc))
110 $(if $(filter %.res,$(objs)), $(QUIET)$(call TOOL_WATCOMC11C_ENV_SETUP) \
111 $(TOOL_WATCOMC11C_RC) \
112 $(filter -bt=%,$(flags)) \
113 /fe=$(subst /,\\,$(out)) \
114 $(subst /,\\,$(filter %.res,$(objs))))
115endef
116
117TOOL_WATCOMC11C-16_LINK_DLL_OUTPUT = $(outbase).map
118TOOL_WATCOMC11C-16_LINK_DLL_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc)
119TOOL_WATCOMC11C-16_LINK_DLL_DEPORD =
120define TOOL_WATCOMC11C-16_LINK_DLL_CMDS
121 $(QUIET)$(call TOOL_WATCOMC11C_ENV_SETUP,$(subst $(SP),,$(addsuffix ;,$(libpath)))) \
122 $(TOOL_WATCOMC11C_LD16) \
123 $(flags) \
124 -fe=$(subst /,\\,$(out)) \
125 -fm=$(subst /,\\,$(outbase).map) \
126 $(subst /,\\,$(filter-out %.res,$(objs))) \
127 $(subst /,\\,$(libs)) \
128 $(subst /,\\,$(othersrc))
129 $(if $(filter %.res,$(objs)), $(QUIET)$(call TOOL_WATCOMC11C_ENV_SETUP) \
130 $(TOOL_WATCOMC11C_RC) \
131 $(filter -bt=%,$(flags)) \
132 /fe=$(subst /,\\,$(out)) \
133 $(subst /,\\,$(filter %.res,$(objs))))
134endef
135
136TOOL_WATCOMC11C-16_LINK_SYSMOD_OUTPUT = $(outbase).map
137TOOL_WATCOMC11C-16_LINK_SYSMOD_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc)
138TOOL_WATCOMC11C-16_LINK_SYSMOD_DEPORD =
139define TOOL_WATCOMC11C-16_LINK_SYSMOD_CMDS
140 $(QUIET)$(call TOOL_WATCOMC11C_ENV_SETUP,$(subst $(SP),,$(addsuffix ;,$(libpath)))) \
141 $(TOOL_WATCOMC11C_LD16) \
142 $(flags) \
143 -fe=$(subst /,\\,$(out)) \
144 -fm=$(subst /,\\,$(outbase).map) \
145 $(subst /,\\,$(filter-out %.res,$(objs))) \
146 $(subst /,\\,$(libs)) \
147 $(subst /,\\,$(othersrc))
148 $(if $(filter %.res,$(objs)), $(QUIET)$(call TOOL_WATCOMC11C_ENV_SETUP) \
149 $(TOOL_WATCOMC11C_RC) \
150 $(filter -bt=%,$(flags)) \
151 /fe=$(subst /,\\,$(out)) \
152 $(subst /,\\,$(filter %.res,$(objs))))
153endef
154
Note: See TracBrowser for help on using the repository browser.