| 1 | # $Id: WATCOMC11C-16.kmk 2749 2015-01-23 01:01:02Z 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-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_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
|
|---|
| 42 |
|
|---|
| 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) \
|
|---|
| 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
|
|---|
| 56 | endef
|
|---|
| 57 |
|
|---|
| 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) \
|
|---|
| 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
|
|---|
| 71 | endef
|
|---|
| 72 |
|
|---|
| 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\
|
|---|
| 79 | $(flags) \
|
|---|
| 80 | $(addprefix -i=, $(subst /,\\,$(incs))) \
|
|---|
| 81 | $(addprefix -d, $(defs))\
|
|---|
| 82 | -fo=$(subst /,\\,$(obj)) \
|
|---|
| 83 | $(subst /,\\,$(abspath $(source)))
|
|---|
| 84 | endef
|
|---|
| 85 |
|
|---|
| 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
|
|---|
| 92 | endef
|
|---|
| 93 |
|
|---|
| 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) \
|
|---|
| 100 | $(flags) \
|
|---|
| 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))))
|
|---|
| 111 | endef
|
|---|
| 112 |
|
|---|
| 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) \
|
|---|
| 119 | $(flags) \
|
|---|
| 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))))
|
|---|
| 130 | endef
|
|---|
| 131 |
|
|---|
| 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) \
|
|---|
| 138 | $(flags) \
|
|---|
| 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))))
|
|---|
| 149 | endef
|
|---|
| 150 |
|
|---|