| 1 | # $Id: VCC80.kmk 1690 2008-08-31 14:29:01Z bird $
|
|---|
| 2 | ## @file
|
|---|
| 3 | # kBuild Tool Config - Visual C++ 8.0 (aka Visual .NET 2005, or MSC v14), targeting $(KBUILD_TARGET).
|
|---|
| 4 | #
|
|---|
| 5 |
|
|---|
| 6 | #
|
|---|
| 7 | # Copyright (c) 2004-2008 knut st. osmundsen <bird-kBuild-spam@anduin.net>
|
|---|
| 8 | #
|
|---|
| 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_VCC80 := Visual C++ 8.0 (aka Visual .NET 2005, or MSC v14), targeting $(KBUILD_TARGET).
|
|---|
| 36 |
|
|---|
| 37 | # Tool Specific Properties
|
|---|
| 38 | ifndef PATH_TOOL_VCC80
|
|---|
| 39 | PATH_TOOL_VCC80 := $(wildcard $(PATH_DEVTOOLS_TRG)/vcc/v8*)
|
|---|
| 40 | ifeq ($(PATH_TOOL_VCC80),)
|
|---|
| 41 | PATH_TOOL_VCC80 := $(wildcard $(PATH_DEVTOOLS)/win.x86/vcc/v8*)
|
|---|
| 42 | endif
|
|---|
| 43 | ifeq ($(PATH_TOOL_VCC80),)
|
|---|
| 44 | PATH_TOOL_VCC80 := $(wildcard $(PATH_DEVTOOLS)/x86.win32/vcc/v8*)
|
|---|
| 45 | endif
|
|---|
| 46 | ifeq ($(PATH_TOOL_VCC80),)
|
|---|
| 47 | PATH_TOOL_VCC80 := $(wildcard $(PATH_DEVTOOLS)/win.amd64/vcc/v8*)
|
|---|
| 48 | endif
|
|---|
| 49 | ifeq ($(PATH_TOOL_VCC80),)
|
|---|
| 50 | PATH_TOOL_VCC80 := $(lastword $(sort $(PATH_TOOL_VCC80)))
|
|---|
| 51 | endif
|
|---|
| 52 | # if not found, we'll enter 'pathless' mode.
|
|---|
| 53 | else
|
|---|
| 54 | # Resolve any fancy stuff once and for all.
|
|---|
| 55 | PATH_TOOL_VCC80 := $(PATH_TOOL_VCC80)
|
|---|
| 56 | endif
|
|---|
| 57 | ifneq ($(PATH_TOOL_VCC80),)
|
|---|
| 58 | ifeq ($(KBUILD_HOST).$(KBUILD_HOST_ARCH),win.amd64)
|
|---|
| 59 | PATH_TOOL_VCC80_BIN.amd64 ?= $(PATH_TOOL_VCC80)/bin/amd64
|
|---|
| 60 | else
|
|---|
| 61 | PATH_TOOL_VCC80_BIN.amd64 ?= $(PATH_TOOL_VCC80)/bin/x86_amd64
|
|---|
| 62 | endif
|
|---|
| 63 | PATH_TOOL_VCC80_BIN.x86 ?= $(PATH_TOOL_VCC80)/bin
|
|---|
| 64 | PATH_TOOL_VCC80_BIN ?= $(PATH_TOOL_VCC80_BIN.$(KBUILD_TARGET))
|
|---|
| 65 | PATH_TOOL_VCC80_LIB.amd64 ?= $(PATH_TOOL_VCC80)/lib/amd64
|
|---|
| 66 | PATH_TOOL_VCC80_LIB.x86 ?= $(PATH_TOOL_VCC80)/lib
|
|---|
| 67 | PATH_TOOL_VCC80_LIB ?= $(PATH_TOOL_VCC80_LIB.$(KBUILD_TARGET))
|
|---|
| 68 | PATH_TOOL_VCC80_INC ?= $(PATH_TOOL_VCC80)/include
|
|---|
| 69 | PATH_TOOL_VCC80_ATLMFC ?= $(PATH_TOOL_VCC80X86)/atlmfc
|
|---|
| 70 | PATH_TOOL_VCC80_ATLMFC_INC ?= $(PATH_TOOL_VCC80_ATLMFC)/include
|
|---|
| 71 | PATH_TOOL_VCC80_ATLMFC_LIB.amd64 ?= $(PATH_TOOL_VCC80_ATLMFC)/lib
|
|---|
| 72 | PATH_TOOL_VCC80_ATLMFC_LIB.x86 ?= $(PATH_TOOL_VCC80_ATLMFC)/lib/amd64
|
|---|
| 73 | PATH_TOOL_VCC80_ATLMFC_LIB ?= $(PATH_TOOL_VCC80_ATLMFC_LIB.$(KBUILD_TARGET))
|
|---|
| 74 | TOOL_VCC80_CC ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC80_BIN)/cl.exe
|
|---|
| 75 | TOOL_VCC80_CXX ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC80_BIN)/cl.exe
|
|---|
| 76 | TOOL_VCC80_AS ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC80_BIN)/ml64.exe
|
|---|
| 77 | TOOL_VCC80_RC ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC80_BIN.x86)/rc.exe
|
|---|
| 78 | TOOL_VCC80_AR ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC80_BIN)/lib.exe
|
|---|
| 79 | TOOL_VCC80_LD ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC80_BIN)/link.exe
|
|---|
| 80 | TOOL_VCC80_MT ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC80_BIN.x86)/mt.exe
|
|---|
| 81 | else
|
|---|
| 82 | # Pathless, relies on the environment.
|
|---|
| 83 | TOOL_VCC80_CC ?= $(EXEC_X86_WIN32) cl.exe
|
|---|
| 84 | TOOL_VCC80_CXX ?= $(EXEC_X86_WIN32) cl.exe
|
|---|
| 85 | TOOL_VCC80_AS ?= $(EXEC_X86_WIN32) ml64.exe
|
|---|
| 86 | TOOL_VCC80_RC ?= $(EXEC_X86_WIN32) rc.exe
|
|---|
| 87 | TOOL_VCC80_AR ?= $(EXEC_X86_WIN32) lib.exe
|
|---|
| 88 | TOOL_VCC80_LD ?= $(EXEC_X86_WIN32) link.exe
|
|---|
| 89 | TOOL_VCC80_MT ?= $(EXEC_X86_WIN32) mt.exe
|
|---|
| 90 | endif
|
|---|
| 91 | ## Disabled fast DEP_IDB based dependencies.
|
|---|
| 92 | #VCC80_OLD_DEPS = 1
|
|---|
| 93 |
|
|---|
| 94 | ## Constructs the correct .pdb name (the name is lowercased).
|
|---|
| 95 | # @param $(1) Base name, no extention.
|
|---|
| 96 | # @param $(2) The extension.
|
|---|
| 97 | TOOL_VCC80_PDB = $(dir $(1))$(tolower $(notdir $(1))).$(2)
|
|---|
| 98 |
|
|---|
| 99 | TOOL_VCC80_COBJSUFF ?= .obj
|
|---|
| 100 | TOOL_VCC80_CFLAGS ?= -TC -c -nologo
|
|---|
| 101 | TOOL_VCC80_CFLAGS.debug ?= -Od -Zi
|
|---|
| 102 | TOOL_VCC80_CFLAGS.release ?= -O2
|
|---|
| 103 | TOOL_VCC80_CFLAGS.profile ?= -O2
|
|---|
| 104 | TOOL_VCC80_CINCS ?= $(PATH_TOOL_VCC80_INC)
|
|---|
| 105 | TOOL_VCC80_CDEFS ?=
|
|---|
| 106 |
|
|---|
| 107 | TOOL_VCC80_CXXOBJSUFF ?= .obj
|
|---|
| 108 | TOOL_VCC80_CXXFLAGS ?= -TP -c -nologo
|
|---|
| 109 | TOOL_VCC80_CXXFLAGS.debug ?= -Od -Zi
|
|---|
| 110 | TOOL_VCC80_CXXFLAGS.release ?= -O2
|
|---|
| 111 | TOOL_VCC80_CXXFLAGS.profile ?= -O2
|
|---|
| 112 | TOOL_VCC80_CXXINCS ?= $(PATH_TOOL_VCC80_INC) $(PATH_TOOL_VCC80_ATLMFC_INC)
|
|---|
| 113 | TOOL_VCC80_CXXDEFS ?=
|
|---|
| 114 |
|
|---|
| 115 | TOOL_VCC80_ASOBJSUFF ?= .obj
|
|---|
| 116 |
|
|---|
| 117 | TOOL_VCC80_RCOBJSUFF ?= .res
|
|---|
| 118 | TOOL_VCC80_RCINCS ?= $(PATH_TOOL_VCC80_INC) $(PATH_TOOL_VCC80_ATLMFC_INC)
|
|---|
| 119 |
|
|---|
| 120 | TOOL_VCC80_ARFLAGS.amd64 ?= -machine:amd64
|
|---|
| 121 | TOOL_VCC80_ARFLAGS.x86 ?= -machine:x86
|
|---|
| 122 | TOOL_VCC80_ARFLAGS ?= -nologo
|
|---|
| 123 | TOOL_VCC80_ARLIBSUFF ?= .lib
|
|---|
| 124 |
|
|---|
| 125 | TOOL_VCC80_LDFLAGS.amd64 ?= -machine:amd64
|
|---|
| 126 | TOOL_VCC80_LDFLAGS.x86 ?= -machine:x86
|
|---|
| 127 | TOOL_VCC80_LDFLAGS ?= -nologo
|
|---|
| 128 | TOOL_VCC80_LDFLAGS.debug ?= -debug
|
|---|
| 129 | TOOL_VCC80_LDFLAGS.release ?=
|
|---|
| 130 | TOOL_VCC80_LIBPATH.amd64 ?= $(PATH_TOOL_VCC80_LIB.amd64) $(PATH_TOOL_VCC80_ATLMFC_LIB.amd64)
|
|---|
| 131 | TOOL_VCC80_LIBPATH.x86 ?= $(PATH_TOOL_VCC80_LIB.x86) $(PATH_TOOL_VCC80_ATLMFC_LIB.x86)
|
|---|
| 132 |
|
|---|
| 133 |
|
|---|
| 134 |
|
|---|
| 135 | ## Compile C source.
|
|---|
| 136 | # @param $(target) Normalized main target name.
|
|---|
| 137 | # @param $(source) Source filename (relative).
|
|---|
| 138 | # @param $(obj) Object file name. This shall be (re)created by the compilation.
|
|---|
| 139 | # @param $(dep) Dependcy file. This shall be (re)created by the compilation.
|
|---|
| 140 | # @param $(flags) Flags.
|
|---|
| 141 | # @param $(defs) Definitions. No -D or something.
|
|---|
| 142 | # @param $(incs) Includes. No -I or something.
|
|---|
| 143 | # @param $(dirdep) Directory creation dependency.
|
|---|
| 144 | # @param $(deps) Other dependencies.
|
|---|
| 145 | #
|
|---|
| 146 | # @param $(outbase) Output basename (full). Use this for list files and such.
|
|---|
| 147 | # @param $(objsuff) Object suffix.
|
|---|
| 148 | TOOL_VCC80_COMPILE_C_DEPEND =
|
|---|
| 149 | TOOL_VCC80_COMPILE_C_DEPORD =
|
|---|
| 150 | TOOL_VCC80_COMPILE_C_OUTPUT = $(call TOOL_VCC80_PDB, $(outbase)-obj,idb)
|
|---|
| 151 | TOOL_VCC80_COMPILE_C_OUTPUT_MAYBE = $(call TOOL_VCC80_PDB, $(outbase)-obj,pdb)
|
|---|
| 152 | define TOOL_VCC80_COMPILE_C_CMDS
|
|---|
| 153 | $(QUIET)$(TOOL_VCC80_CC) -c\
|
|---|
| 154 | $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
|
|---|
| 155 | -Fd$(outbase)-obj.pdb \
|
|---|
| 156 | -FD\
|
|---|
| 157 | -Fo$(obj)\
|
|---|
| 158 | $(subst /,\\,$(abspath $(source)))
|
|---|
| 159 | $(QUIET)$(DEP_IDB) -f -s -o $(dep) -t $(obj) $(call TOOL_VCC80_PDB,$(outbase)-obj,idb)
|
|---|
| 160 | endef
|
|---|
| 161 |
|
|---|
| 162 |
|
|---|
| 163 | ## Compile C++ source.
|
|---|
| 164 | # @param $(target) Normalized main target name.
|
|---|
| 165 | # @param $(source) Source filename (relative).
|
|---|
| 166 | # @param $(obj) Object file name. This shall be (re)created by the compilation.
|
|---|
| 167 | # @param $(dep) Dependcy file. This shall be (re)created by the compilation.
|
|---|
| 168 | # @param $(flags) Flags.
|
|---|
| 169 | # @param $(defs) Definitions. No -D or something.
|
|---|
| 170 | # @param $(incs) Includes. No -I or something.
|
|---|
| 171 | # @param $(dirdep) Directory creation dependency.
|
|---|
| 172 | # @param $(deps) Other dependencies.
|
|---|
| 173 | #
|
|---|
| 174 | # @param $(outbase) Output basename (full). Use this for list files and such.
|
|---|
| 175 | # @param $(objsuff) Object suffix.
|
|---|
| 176 | TOOL_VCC80_COMPILE_CXX_DEPEND =
|
|---|
| 177 | TOOL_VCC80_COMPILE_CXX_DEPORD =
|
|---|
| 178 | TOOL_VCC80_COMPILE_CXX_OUTPUT = $(call TOOL_VCC80_PDB, $(outbase)-obj,idb)
|
|---|
| 179 | TOOL_VCC80_COMPILE_CXX_OUTPUT_MAYBE = $(call TOOL_VCC80_PDB, $(outbase)-obj,pdb)
|
|---|
| 180 | define TOOL_VCC80_COMPILE_CXX_CMDS
|
|---|
| 181 | $(QUIET)$(TOOL_VCC80_CXX) -c\
|
|---|
| 182 | $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
|
|---|
| 183 | -Fd$(outbase)-obj.pdb \
|
|---|
| 184 | -FD\
|
|---|
| 185 | -Fo$(obj)\
|
|---|
| 186 | $(subst /,\\,$(abspath $(source)))
|
|---|
| 187 | $(QUIET)$(DEP_IDB) -f -s -o $(dep) -t $(obj) $(call TOOL_VCC80_PDB,$(outbase)-obj,idb)
|
|---|
| 188 | endef
|
|---|
| 189 |
|
|---|
| 190 |
|
|---|
| 191 | ## Compile resource source.
|
|---|
| 192 | # @param $(target) Normalized main target name.
|
|---|
| 193 | # @param $(source) Source filename (relative).
|
|---|
| 194 | # @param $(obj) Object file name. This shall be (re)created by the compilation.
|
|---|
| 195 | # @param $(dep) Dependcy file. This shall be (re)created by the compilation.
|
|---|
| 196 | # @param $(flags) Flags.
|
|---|
| 197 | # @param $(defs) Definitions. No -D or something.
|
|---|
| 198 | # @param $(incs) Includes. No -I or something.
|
|---|
| 199 | # @param $(dirdep) Directory creation dependency.
|
|---|
| 200 | # @param $(deps) Other dependencies.
|
|---|
| 201 | #
|
|---|
| 202 | # @param $(outbase) Output basename (full). Use this for list files and such.
|
|---|
| 203 | # @param $(objsuff) Object suffix.
|
|---|
| 204 | TOOL_VCC80_COMPILE_RC_OUTPUT =
|
|---|
| 205 | TOOL_VCC80_COMPILE_RC_DEPEND =
|
|---|
| 206 | TOOL_VCC80_COMPILE_RC_DEPORD =
|
|---|
| 207 | define TOOL_VCC80_COMPILE_RC_CMDS
|
|---|
| 208 | $(QUIET)$(TOOL_VCC80_RC) \
|
|---|
| 209 | $(flags) $(addprefix /i, $(subst /,\\,$(incs))) $(addprefix /d, $(defs))\
|
|---|
| 210 | /fo$(obj)\
|
|---|
| 211 | $(subst /,\\,$(abspath $(source)))
|
|---|
| 212 | endef
|
|---|
| 213 |
|
|---|
| 214 |
|
|---|
| 215 | ## Link library
|
|---|
| 216 | # @param $(target) Normalized main target name.
|
|---|
| 217 | # @param $(out) Library name.
|
|---|
| 218 | # @param $(objs) Object files to put in the library.
|
|---|
| 219 | # @param $(flags) Flags.
|
|---|
| 220 | # @param $(dirdep) Directory creation dependency.
|
|---|
| 221 | # @param $(deps) Other dependencies.
|
|---|
| 222 | # @param $(othersrc) Unhandled sources.
|
|---|
| 223 | # @param $(outbase) Output basename (full). Use this for list files and such.
|
|---|
| 224 | #
|
|---|
| 225 | TOOL_VCC80_LINK_LIBRARY_DEPEND = $(othersrc)
|
|---|
| 226 | TOOL_VCC80_LINK_LIBRARY_DEPORD =
|
|---|
| 227 | TOOL_VCC80_LINK_LIBRARY_OUTPUT = $(outbase).rsp
|
|---|
| 228 | TOOL_VCC80_LINK_LIBRARY_OUTPUT_MAYBE = $(outbase).lst $(outbase).exp $(outbase).pdb
|
|---|
| 229 | define TOOL_VCC80_LINK_LIBRARY_CMDS
|
|---|
| 230 | $(QUIET)$(APPEND) -n $(outbase).rsp \
|
|---|
| 231 | $(foreach arg,\
|
|---|
| 232 | $(subst /,\\,$(objs) \
|
|---|
| 233 | $(filter-out %.def,$(othersrc))) \
|
|---|
| 234 | $(addprefix /DEF:,$(filter %.def,$(othersrc))) \
|
|---|
| 235 | ,\"$(arg)\")
|
|---|
| 236 | $(QUIET)$(TOOL_VCC80_AR) $(flags) /OUT:$(out) @$(outbase).rsp
|
|---|
| 237 | endef
|
|---|
| 238 |
|
|---|
| 239 |
|
|---|
| 240 |
|
|---|
| 241 |
|
|---|
| 242 | ## Link program
|
|---|
| 243 | # @param $(target) Normalized main target name.
|
|---|
| 244 | # @param $(out) Program name.
|
|---|
| 245 | # @param $(objs) Object files to link together.
|
|---|
| 246 | # @param $(libs) Libraries to search.
|
|---|
| 247 | # @param $(libpath) Library search paths.
|
|---|
| 248 | # @param $(flags) Flags.
|
|---|
| 249 | # @param $(dirdep) Directory creation dependency.
|
|---|
| 250 | # @param $(deps) Other dependencies.
|
|---|
| 251 | # @param $(othersrc) Unhandled sources.
|
|---|
| 252 | # @param $(custom_pre) Custom step invoked before linking.
|
|---|
| 253 | # @param $(custom_post) Custom step invoked after linking.
|
|---|
| 254 | # @param $(outbase) Output basename (full). Use this for list files and such.
|
|---|
| 255 | #
|
|---|
| 256 | TOOL_VCC80_LINK_PROGRAM_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc)
|
|---|
| 257 | TOOL_VCC80_LINK_PROGRAM_DEPORD =
|
|---|
| 258 | TOOL_VCC80_LINK_PROGRAM_OUTPUT = $(outbase).map
|
|---|
| 259 | TOOL_VCC80_LINK_PROGRAM_OUTPUT_MAYBE = $(outbase).map $(outbase).lib $(outbase).exp $(outbase).pdb $(outbase).ilk $(out).manifest
|
|---|
| 260 | define TOOL_VCC80_LINK_PROGRAM_CMDS
|
|---|
| 261 | $(QUIET)$(TOOL_VCC80_LD) $(flags) \
|
|---|
| 262 | /OUT:$(out) \
|
|---|
| 263 | /MAPINFO:EXPORTS /INCREMENTAL:NO \
|
|---|
| 264 | /MAP:$(outbase).map \
|
|---|
| 265 | $(foreach def,$(filter %.def,$(othersrc)), /DEF:$(def)) \
|
|---|
| 266 | $(subst /,\\,$(filter %.exp %.res,$(othersrc))) \
|
|---|
| 267 | $(foreach p,$(libpath), /LIBPATH:$(p)) \
|
|---|
| 268 | $(subst /,\\,$(objs)) \
|
|---|
| 269 | $(subst /,\\,$(libs))
|
|---|
| 270 | $(QUIET)$(TEST) -f $(out).manifest -- \
|
|---|
| 271 | $(TOOL_VCC80_MT) -manifest $(subst /,\\,$(out)).manifest -outputresource:$(subst /,\\,$(out))
|
|---|
| 272 | endef
|
|---|
| 273 |
|
|---|
| 274 |
|
|---|
| 275 | ## Link DLL.
|
|---|
| 276 | # @param $(target) Normalized main target name.
|
|---|
| 277 | # @param $(out) DLL name.
|
|---|
| 278 | # @param $(objs) Object files to link together.
|
|---|
| 279 | # @param $(libs) Libraries to search.
|
|---|
| 280 | # @param $(libpath) Library search paths.
|
|---|
| 281 | # @param $(flags) Flags.
|
|---|
| 282 | # @param $(dirdep) Directory creation dependency.
|
|---|
| 283 | # @param $(deps) Other dependencies.
|
|---|
| 284 | # @param $(othersrc) Unhandled sources.
|
|---|
| 285 | # @param $(custom_pre) Custom step invoked before linking.
|
|---|
| 286 | # @param $(custom_post) Custom step invoked after linking.
|
|---|
| 287 | #
|
|---|
| 288 | # @param $(outbase) Output basename (full). Use this for list files and such.
|
|---|
| 289 | TOOL_VCC80_LINK_DLL_DEPEND = $(objs) $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc)
|
|---|
| 290 | TOOL_VCC80_LINK_DLL_DEPORD = $(call DIRDEP,$(PATH_LIB))
|
|---|
| 291 | TOOL_VCC80_LINK_DLL_OUTPUT = $(outbase).map $(outbase).lib $(outbase).exp
|
|---|
| 292 | TOOL_VCC80_LINK_DLL_OUTPUT_MAYBE = $(outbase).pdb $(outbase).ilk $(out).manifest $(PATH_LIB)/$(notdir $(outbase)).lib $(PATH_LIB)/$(notdir $(outbase)).exp
|
|---|
| 293 | define TOOL_VCC80_LINK_DLL_CMDS
|
|---|
| 294 | $(QUIET)$(TOOL_VCC80_LD) $(flags) \
|
|---|
| 295 | /OUT:$(out) \
|
|---|
| 296 | /IMPLIB:$(outbase).lib \
|
|---|
| 297 | /MAPINFO:EXPORTS /INCREMENTAL:NO \
|
|---|
| 298 | /MAP:$(outbase).map \
|
|---|
| 299 | /DLL \
|
|---|
| 300 | $(foreach def,$(filter %.def,$(othersrc)), /DEF:$(def)) \
|
|---|
| 301 | $(subst /,\\,$(filter %.exp %.res,$(othersrc))) \
|
|---|
| 302 | $(foreach p,$(libpath), /LIBPATH:$(p)) \
|
|---|
| 303 | $(subst /,\\,$(objs)) \
|
|---|
| 304 | $(subst /,\\,$(libs))
|
|---|
| 305 | $(QUIET)$(TEST) -f $(out).manifest -- \
|
|---|
| 306 | $(TOOL_VCC80_MT) -manifest $(subst /,\\,$(out)).manifest '-outputresource:$(subst /,\\,$(out));#2'
|
|---|
| 307 | $(QUIET)$(CP) --changed --ignore-non-existing $(outbase).exp $(outbase).lib $(PATH_LIB)/
|
|---|
| 308 | $(eval _DIRS += $(PATH_LIB))
|
|---|
| 309 | endef
|
|---|
| 310 |
|
|---|
| 311 |
|
|---|
| 312 | ## Link system module (windows aka driver, linux aka kernel module)
|
|---|
| 313 | # @param $(target) Normalized main target name.
|
|---|
| 314 | # @param $(out) System module name.
|
|---|
| 315 | # @param $(objs) Object files to link together.
|
|---|
| 316 | # @param $(libs) Libraries to search.
|
|---|
| 317 | # @param $(libpath) Library search paths.
|
|---|
| 318 | # @param $(flags) Flags.
|
|---|
| 319 | # @param $(dirdep) Directory creation dependency.
|
|---|
| 320 | # @param $(deps) Other dependencies.
|
|---|
| 321 | # @param $(othersrc) Unhandled sources.
|
|---|
| 322 | # @param $(custom_pre) Custom step invoked before linking.
|
|---|
| 323 | # @param $(custom_post) Custom step invoked after linking.
|
|---|
| 324 | #
|
|---|
| 325 | # @param $(outbase) Output basename (full). Use this for list files and such.
|
|---|
| 326 | TOOL_VCC80_LINK_SYSMOD_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc)
|
|---|
| 327 | TOOL_VCC80_LINK_SYSMOD_DEPORD =
|
|---|
| 328 | TOOL_VCC80_LINK_SYSMOD_OUTPUT = $(outbase).map
|
|---|
| 329 | TOOL_VCC80_LINK_SYSMOD_OUTPUT_MAYBE = $(outbase).lib $(outbase).exp $(outbase).pdb $(outbase).ilk $(out).manifest
|
|---|
| 330 | define TOOL_VCC80_LINK_SYSMOD_CMDS
|
|---|
| 331 | $(QUIET)$(TOOL_VCC80_LD) $(flags) \
|
|---|
| 332 | /OUT:$(out) \
|
|---|
| 333 | /MAPINFO:EXPORTS /INCREMENTAL:NO \
|
|---|
| 334 | /MAP:$(outbase).map \
|
|---|
| 335 | $(foreach def,$(filter %.def,$(othersrc)), /DEF:$(def)) \
|
|---|
| 336 | $(subst /,\\,$(filter %.exp %.res,$(othersrc))) \
|
|---|
| 337 | $(foreach p,$(libpath), /LIBPATH:$(p)) \
|
|---|
| 338 | $(subst /,\\,$(objs)) \
|
|---|
| 339 | $(subst /,\\,$(libs))
|
|---|
| 340 | $(QUIET)$(TEST) -f $(out).manifest -- \
|
|---|
| 341 | $(TOOL_VCC80_MT) -manifest $(subst /,\\,$(out)).manifest '-outputresource:$(subst /,\\,$(out));#2'
|
|---|
| 342 | endef
|
|---|
| 343 |
|
|---|