| 1 | # $Id: OPENWATCOM-16.kmk 2572 2012-04-27 13:19:55Z 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 |
|
|---|
| 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
|
|---|
| 42 |
|
|---|
| 43 |
|
|---|
| 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_AS) \
|
|---|
| 49 | $(flags) \
|
|---|
| 50 | $(addsuffix , $(addprefix -i=, $(call TOOL_OPENWATCOM_FIX_SLASHES,$(incs)))) \
|
|---|
| 51 | $(addprefix -d, $(defs)) \
|
|---|
| 52 | -fo=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)) \
|
|---|
| 53 | -fr=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)).err \
|
|---|
| 54 | $(call TOOL_OPENWATCOM_FIX_SLASHES,$(abspath $(source)))
|
|---|
| 55 | $(QUIET)$(APPEND) -n $(obj).err
|
|---|
| 56 | ## @todo dependencies
|
|---|
| 57 | endef
|
|---|
| 58 |
|
|---|
| 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) \
|
|---|
| 64 | $(flags) \
|
|---|
| 65 | $(addsuffix , $(addprefix -i=, $(call TOOL_OPENWATCOM_FIX_SLASHES,$(incs)))) \
|
|---|
| 66 | $(addprefix -d, $(defs)) \
|
|---|
| 67 | -fo=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)) \
|
|---|
| 68 | -fr=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)).err \
|
|---|
| 69 | $(call TOOL_OPENWATCOM_FIX_SLASHES,$(abspath $(source)))
|
|---|
| 70 | $(QUIET)$(APPEND) -n $(obj).err
|
|---|
| 71 | ## @todo dependencies
|
|---|
| 72 | endef
|
|---|
| 73 |
|
|---|
| 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) \
|
|---|
| 79 | $(flags) \
|
|---|
| 80 | $(addsuffix , $(addprefix -i=, $(call TOOL_OPENWATCOM_FIX_SLASHES,$(incs)))) \
|
|---|
| 81 | $(addprefix -d, $(defs)) \
|
|---|
| 82 | -fo=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)) \
|
|---|
| 83 | -fr=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)).err \
|
|---|
| 84 | $(call TOOL_OPENWATCOM_FIX_SLASHES,$(abspath $(source)))
|
|---|
| 85 | $(QUIET)$(APPEND) -n $(obj).err
|
|---|
| 86 | ## @todo dependencies
|
|---|
| 87 | endef
|
|---|
| 88 |
|
|---|
| 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\
|
|---|
| 95 | $(flags) \
|
|---|
| 96 | $(addprefix -i=, $(call TOOL_OPENWATCOM_FIX_SLASHES,$(incs))) \
|
|---|
| 97 | $(addprefix -d, $(defs))\
|
|---|
| 98 | -fo=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)) \
|
|---|
| 99 | $(call TOOL_OPENWATCOM_FIX_SLASHES,$(abspath $(source)))
|
|---|
| 100 | endef
|
|---|
| 101 |
|
|---|
| 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,$(call TOOL_OPENWATCOM_FIX_SLASHES,$(objs) $(othersrc)),'+"$(obj)"')
|
|---|
| 107 | $(QUIET)$(TOOL_OPENWATCOM_ENV_SETUP) $(TOOL_OPENWATCOM_AR) $(flags) $(call TOOL_OPENWATCOM_FIX_SLASHES,$(out)) @$(outbase).rsp
|
|---|
| 108 | endef
|
|---|
| 109 |
|
|---|
| 110 | TOOL_OPENWATCOM-16_LINK_PROGRAM_OUTPUT = $(outbase).map
|
|---|
| 111 | TOOL_OPENWATCOM-16_LINK_PROGRAM_OUTPUT_MAYBE = $(outbase).sym
|
|---|
| 112 | TOOL_OPENWATCOM-16_LINK_PROGRAM_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc)
|
|---|
| 113 | TOOL_OPENWATCOM-16_LINK_PROGRAM_DEPORD =
|
|---|
| 114 | define TOOL_OPENWATCOM-16_LINK_PROGRAM_CMDS
|
|---|
| 115 | $(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP,$(subst $(SP),,$(addsuffix ;,$(libpath)))) \
|
|---|
| 116 | $(TOOL_OPENWATCOM_LD16) \
|
|---|
| 117 | $(flags) \
|
|---|
| 118 | -fe=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(out)) \
|
|---|
| 119 | -fm=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(outbase).map) \
|
|---|
| 120 | $(call TOOL_OPENWATCOM_FIX_SLASHES,$(filter-out %.res,$(objs))) \
|
|---|
| 121 | $(call TOOL_OPENWATCOM_FIX_SLASHES,$(libs)) \
|
|---|
| 122 | $(call TOOL_OPENWATCOM_FIX_SLASHES,$(othersrc))
|
|---|
| 123 | $(if $(filter %.res,$(objs)), $(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP) \
|
|---|
| 124 | $(TOOL_OPENWATCOM_RC) \
|
|---|
| 125 | $(filter -bt=%,$(flags)) \
|
|---|
| 126 | /fe=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(out)) \
|
|---|
| 127 | $(call TOOL_OPENWATCOM_FIX_SLASHES,$(filter %.res,$(objs))))
|
|---|
| 128 | endef
|
|---|
| 129 |
|
|---|
| 130 | TOOL_OPENWATCOM-16_LINK_DLL_OUTPUT = $(outbase).map
|
|---|
| 131 | TOOL_OPENWATCOM-16_LINK_DLL_OUTPUT_MAYBE = $(outbase).sym
|
|---|
| 132 | TOOL_OPENWATCOM-16_LINK_DLL_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc)
|
|---|
| 133 | TOOL_OPENWATCOM-16_LINK_DLL_DEPORD =
|
|---|
| 134 | define TOOL_OPENWATCOM-16_LINK_DLL_CMDS
|
|---|
| 135 | $(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP,$(subst $(SP),,$(addsuffix ;,$(libpath)))) \
|
|---|
| 136 | $(TOOL_OPENWATCOM_LD16) \
|
|---|
| 137 | $(flags) \
|
|---|
| 138 | -fe=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(out)) \
|
|---|
| 139 | -fm=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(outbase).map) \
|
|---|
| 140 | $(call TOOL_OPENWATCOM_FIX_SLASHES,$(filter-out %.res,$(objs))) \
|
|---|
| 141 | $(call TOOL_OPENWATCOM_FIX_SLASHES,$(libs)) \
|
|---|
| 142 | $(call TOOL_OPENWATCOM_FIX_SLASHES,$(othersrc))
|
|---|
| 143 | $(if $(filter %.res,$(objs)), $(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP) \
|
|---|
| 144 | $(TOOL_OPENWATCOM_RC) \
|
|---|
| 145 | $(filter -bt=%,$(flags)) \
|
|---|
| 146 | /fe=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(out)) \
|
|---|
| 147 | $(call TOOL_OPENWATCOM_FIX_SLASHES,$(filter %.res,$(objs))))
|
|---|
| 148 | endef
|
|---|
| 149 |
|
|---|
| 150 | TOOL_OPENWATCOM-16_LINK_SYSMOD_OUTPUT = $(outbase).map
|
|---|
| 151 | TOOL_OPENWATCOM-16_LINK_SYSMOD_OUTPUT_MAYBE = $(outbase).sym
|
|---|
| 152 | TOOL_OPENWATCOM-16_LINK_SYSMOD_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc)
|
|---|
| 153 | TOOL_OPENWATCOM-16_LINK_SYSMOD_DEPORD =
|
|---|
| 154 | define TOOL_OPENWATCOM-16_LINK_SYSMOD_CMDS
|
|---|
| 155 | $(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP,$(subst $(SP),,$(addsuffix ;,$(libpath)))) \
|
|---|
| 156 | $(TOOL_OPENWATCOM_LD16) \
|
|---|
| 157 | $(flags) \
|
|---|
| 158 | -fe=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(out)) \
|
|---|
| 159 | -fm=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(outbase).map) \
|
|---|
| 160 | $(call TOOL_OPENWATCOM_FIX_SLASHES,$(filter-out %.res,$(objs))) \
|
|---|
| 161 | $(call TOOL_OPENWATCOM_FIX_SLASHES,$(libs)) \
|
|---|
| 162 | $(call TOOL_OPENWATCOM_FIX_SLASHES,$(othersrc))
|
|---|
| 163 | $(if $(filter %.res,$(objs)), $(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP) \
|
|---|
| 164 | $(TOOL_OPENWATCOM_RC) \
|
|---|
| 165 | $(filter -bt=%,$(flags)) \
|
|---|
| 166 | /fe=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(out)) \
|
|---|
| 167 | $(call TOOL_OPENWATCOM_FIX_SLASHES,$(filter %.res,$(objs))))
|
|---|
| 168 | endef
|
|---|
| 169 |
|
|---|