source: trunk/kBuild/tools/OPENWATCOM-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: OPENWATCOM-16.kmk 2068 2008-11-17 01:18:09Z 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 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_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_C_DEPEND =
45TOOL_OPENWATCOM-16_COMPILE_C_DEPORD =
46TOOL_OPENWATCOM-16_COMPILE_C_OUTPUT = $(obj).err
47define TOOL_OPENWATCOM-16_COMPILE_C_CMDS
48 $(QUIET) $(call TOOL_OPENWATCOM_ENV_SETUP) $(TOOL_OPENWATCOM_CC16) \
49 $(flags) \
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
56## @todo dependencies
57endef
58
59TOOL_OPENWATCOM-16_COMPILE_CXX_DEPEND =
60TOOL_OPENWATCOM-16_COMPILE_CXX_DEPORD =
61TOOL_OPENWATCOM-16_COMPILE_CXX_OUTPUT = $(obj).err
62define TOOL_OPENWATCOM-16_COMPILE_CXX_CMDS
63 $(QUIET) $(call TOOL_OPENWATCOM_ENV_SETUP) $(TOOL_OPENWATCOM_CXX16) \
64 $(flags) \
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
71## @todo dependencies
72endef
73
74TOOL_OPENWATCOM-16_COMPILE_RC_OUTPUT =
75TOOL_OPENWATCOM-16_COMPILE_RC_DEPEND =
76TOOL_OPENWATCOM-16_COMPILE_RC_DEPORD =
77define TOOL_OPENWATCOM-16_COMPILE_RC_CMDS
78 $(QUIET) $(call TOOL_OPENWATCOM_ENV_SETUP) \
79 $(TOOL_OPENWATCOM_RC) -r\
80 $(flags) \
81 $(addprefix -i=, $(subst /,\\,$(incs))) \
82 $(addprefix -d, $(defs))\
83 -fo=$(subst /,\\,obj) \
84 $(subst /,\\,$(abspath $(source)))
85endef
86
87TOOL_OPENWATCOM-16_LINK_LIBRARY_OUTPUT = ## @todo $(outbase).rsp
88TOOL_OPENWATCOM-16_LINK_LIBRARY_DEPEND = $(othersrc)
89TOOL_OPENWATCOM-16_LINK_LIBRARY_DEPORD =
90define TOOL_OPENWATCOM-16_LINK_LIBRARY_CMDS
91 $(if $(strip $(othersrc)),\
92 $(QUIET)$(TOOL_OPENWATCOM_ENV_SETUP) \
93 $(TOOL_OPENWATCOM_IMP) $(TOOL_OPENWATCOM_IMPFLAGS) $(subst /,\\,$(out)) $(subst /,\\,$(othersrc)) )
94 $(if $(strip $(objs)),$(QUIET)$(TOOL_OPENWATCOM_ENV_SETUP) \
95 $(QUIET)$(TOOL_OPENWATCOM_ENV_SETUP) \
96 $(TOOL_OPENWATCOM_AR) $(flags) $(subst /,\\,$(out)) $(foreach obj,$(subst /,\\,$(objs)),+"$(obj)") ";" )
97endef
98
99TOOL_OPENWATCOM-16_LINK_PROGRAM_OUTPUT = $(outbase).map
100TOOL_OPENWATCOM-16_LINK_PROGRAM_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc)
101TOOL_OPENWATCOM-16_LINK_PROGRAM_DEPORD =
102define TOOL_OPENWATCOM-16_LINK_PROGRAM_CMDS
103 $(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP,$(subst $(SP),,$(addsuffix ;,$(libpath)))) \
104 $(TOOL_OPENWATCOM_LD16) \
105 $(flags) \
106 -fe=$(subst /,\\,$(out)) \
107 -fm=$(subst /,\\,$(outbase).map) \
108 $(subst /,\\,$(filter-out %.res,$(objs))) \
109 $(subst /,\\,$(libs)) \
110 $(subst /,\\,$(othersrc))
111 $(if $(filter %.res,$(objs)), $(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP) \
112 $(TOOL_OPENWATCOM_RC) \
113 $(filter -bt=%,$(flags)) \
114 /fe=$(subst /,\\,$(out)) \
115 $(subst /,\\,$(filter %.res,$(objs))))
116endef
117
118TOOL_OPENWATCOM-16_LINK_DLL_OUTPUT = $(outbase).map
119TOOL_OPENWATCOM-16_LINK_DLL_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc)
120TOOL_OPENWATCOM-16_LINK_DLL_DEPORD =
121define TOOL_OPENWATCOM-16_LINK_DLL_CMDS
122 $(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP,$(subst $(SP),,$(addsuffix ;,$(libpath)))) \
123 $(TOOL_OPENWATCOM_LD16) \
124 $(flags) \
125 -fe=$(subst /,\\,$(out)) \
126 -fm=$(subst /,\\,$(outbase).map) \
127 $(subst /,\\,$(filter-out %.res,$(objs))) \
128 $(subst /,\\,$(libs)) \
129 $(subst /,\\,$(othersrc))
130 $(if $(filter %.res,$(objs)), $(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP) \
131 $(TOOL_OPENWATCOM_RC) \
132 $(filter -bt=%,$(flags)) \
133 /fe=$(subst /,\\,$(out)) \
134 $(subst /,\\,$(filter %.res,$(objs))))
135endef
136
137TOOL_OPENWATCOM-16_LINK_SYSMOD_OUTPUT = $(outbase).map
138TOOL_OPENWATCOM-16_LINK_SYSMOD_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc)
139TOOL_OPENWATCOM-16_LINK_SYSMOD_DEPORD =
140define TOOL_OPENWATCOM-16_LINK_SYSMOD_CMDS
141 $(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP,$(subst $(SP),,$(addsuffix ;,$(libpath)))) \
142 $(TOOL_OPENWATCOM_LD16) \
143 $(flags) \
144 -fe=$(subst /,\\,$(out)) \
145 -fm=$(subst /,\\,$(outbase).map) \
146 $(subst /,\\,$(filter-out %.res,$(objs))) \
147 $(subst /,\\,$(libs)) \
148 $(subst /,\\,$(othersrc))
149 $(if $(filter %.res,$(objs)), $(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP) \
150 $(TOOL_OPENWATCOM_RC) \
151 $(filter -bt=%,$(flags)) \
152 /fe=$(subst /,\\,$(out)) \
153 $(subst /,\\,$(filter %.res,$(objs))))
154endef
155
Note: See TracBrowser for help on using the repository browser.