[434] | 1 | # $Id: VCC80AMD64.kmk 3303 2020-01-14 15:09:44Z bird $
|
---|
| 2 | ## @file
|
---|
[667] | 3 | # kBuild Tool Config - Visual C++ 8.0 (aka Visual .NET 2005, or MSC v14), targeting AMD64.
|
---|
[434] | 4 | #
|
---|
[1547] | 5 |
|
---|
| 6 | #
|
---|
[3121] | 7 | # Copyright (c) 2004-2017 knut st. osmundsen <bird-kBuild-spam-xviiv@anduin.net>
|
---|
[434] | 8 | #
|
---|
| 9 | # This file is part of kBuild.
|
---|
| 10 | #
|
---|
| 11 | # kBuild is free software; you can redistribute it and/or modify
|
---|
| 12 | # it under the terms of the GNU General Public License as published by
|
---|
| 13 | # the Free Software Foundation; either version 2 of the License, or
|
---|
| 14 | # (at your option) any later version.
|
---|
| 15 | #
|
---|
| 16 | # kBuild is distributed in the hope that it will be useful,
|
---|
| 17 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
| 18 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
| 19 | # GNU General Public License for more details.
|
---|
| 20 | #
|
---|
| 21 | # You should have received a copy of the GNU General Public License
|
---|
| 22 | # along with kBuild; if not, write to the Free Software
|
---|
| 23 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
---|
| 24 | #
|
---|
| 25 | #
|
---|
[1547] | 26 | # As a special exception you are granted permission to include this file, via
|
---|
[2018] | 27 | # the kmk include directive, as you wish without this in itself causing the
|
---|
| 28 | # resulting makefile, program or whatever to be covered by the GPL license.
|
---|
[1547] | 29 | # This exception does not however invalidate any other reasons why the makefile,
|
---|
| 30 | # program, whatever should not be covered the GPL.
|
---|
| 31 | #
|
---|
| 32 | #
|
---|
[434] | 33 |
|
---|
[667] | 34 | TOOL_VCC80AMD64 := Visual C++ 8.0 (aka Visual .NET 2005, or MSC v14), targeting AMD64.
|
---|
[434] | 35 |
|
---|
[667] | 36 | # Tool Specific Properties
|
---|
| 37 | ifndef PATH_TOOL_VCC80AMD64
|
---|
[2726] | 38 | PATH_TOOL_VCC80AMD64 := $(wildcard $(KBUILD_DEVTOOLS)/win.x86/vcc/v8*)
|
---|
[667] | 39 | ifeq ($(PATH_TOOL_VCC80AMD64),)
|
---|
[706] | 40 | PATH_TOOL_VCC80AMD64 := $(PATH_TOOL_VCC80)
|
---|
[667] | 41 | endif
|
---|
| 42 | ifeq ($(PATH_TOOL_VCC80AMD64),)
|
---|
[848] | 43 | PATH_TOOL_VCC80AMD64 := $(PATH_TOOL_VCC80X86)
|
---|
[706] | 44 | endif
|
---|
| 45 | ifeq ($(PATH_TOOL_VCC80AMD64),)
|
---|
[2726] | 46 | PATH_TOOL_VCC80AMD64 := $(wildcard $(KBUILD_DEVTOOLS)/win.x86/vcc/v8*)
|
---|
[667] | 47 | endif
|
---|
| 48 | ifneq ($(PATH_TOOL_VCC80AMD64),)
|
---|
[857] | 49 | PATH_TOOL_VCC80AMD64 := $(lastword $(sort $(PATH_TOOL_VCC80AMD64)))
|
---|
[667] | 50 | else
|
---|
| 51 | $(warning kBuild: PATH_TOOL_VCC80AMD64 cannot be determined!)
|
---|
[2726] | 52 | PATH_TOOL_VCC80AMD64 := $(KBUILD_DEVTOOLS)/win.x86/vcc/v8
|
---|
[667] | 53 | endif
|
---|
[434] | 54 | else
|
---|
[667] | 55 | # Resolve any fancy stuff once and for all.
|
---|
| 56 | PATH_TOOL_VCC80AMD64 := $(PATH_TOOL_VCC80AMD64)
|
---|
[434] | 57 | endif
|
---|
[1504] | 58 | ifeq ($(KBUILD_HOST).$(KBUILD_HOST_ARCH),win.amd64)
|
---|
[669] | 59 | PATH_TOOL_VCC80AMD64_BIN ?= $(PATH_TOOL_VCC80AMD64)/bin/amd64
|
---|
[667] | 60 | else
|
---|
[669] | 61 | PATH_TOOL_VCC80AMD64_BIN ?= $(PATH_TOOL_VCC80AMD64)/bin/x86_amd64
|
---|
[667] | 62 | endif
|
---|
[669] | 63 | PATH_TOOL_VCC80AMD64_LIB ?= $(PATH_TOOL_VCC80AMD64)/lib/amd64
|
---|
| 64 | PATH_TOOL_VCC80AMD64_INC ?= $(PATH_TOOL_VCC80AMD64)/include
|
---|
[848] | 65 | PATH_TOOL_VCC80AMD64_ATLMFC ?= $(PATH_TOOL_VCC80AMD64)/atlmfc
|
---|
[667] | 66 | PATH_TOOL_VCC80AMD64_ATLMFC_INC ?= $(PATH_TOOL_VCC80AMD64_ATLMFC)/include
|
---|
[669] | 67 | PATH_TOOL_VCC80AMD64_ATLMFC_LIB ?= $(PATH_TOOL_VCC80AMD64_ATLMFC)/lib/amd64
|
---|
[667] | 68 | TOOL_VCC80AMD64_CC ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC80AMD64_BIN)/cl.exe
|
---|
| 69 | TOOL_VCC80AMD64_CXX ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC80AMD64_BIN)/cl.exe
|
---|
| 70 | TOOL_VCC80AMD64_AS ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC80AMD64_BIN)/ml64.exe
|
---|
| 71 | TOOL_VCC80AMD64_RC ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC80AMD64_BIN)/../rc.exe
|
---|
| 72 | TOOL_VCC80AMD64_AR ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC80AMD64_BIN)/lib.exe
|
---|
| 73 | TOOL_VCC80AMD64_LD ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC80AMD64_BIN)/link.exe
|
---|
| 74 | TOOL_VCC80AMD64_MT ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC80AMD64_BIN)/../mt.exe
|
---|
[735] | 75 | ## Disabled fast DEP_IDB based dependencies.
|
---|
| 76 | #VCC80AMD64_OLD_DEPS = 1
|
---|
[434] | 77 |
|
---|
| 78 | ## Constructs the correct .pdb name (the name is lowercased).
|
---|
| 79 | # @param $(1) Base name, no extention.
|
---|
| 80 | # @param $(2) The extension.
|
---|
[667] | 81 | TOOL_VCC80AMD64_PDB = $(dir $(1))$(tolower $(notdir $(1))).$(2)
|
---|
[434] | 82 |
|
---|
[667] | 83 | TOOL_VCC80AMD64_COBJSUFF ?= .obj
|
---|
| 84 | TOOL_VCC80AMD64_CFLAGS ?= -TC -c -nologo
|
---|
| 85 | TOOL_VCC80AMD64_CFLAGS.debug ?= -Od -Zi
|
---|
| 86 | TOOL_VCC80AMD64_CFLAGS.release ?= -O2
|
---|
| 87 | TOOL_VCC80AMD64_CFLAGS.profile ?= -O2
|
---|
| 88 | TOOL_VCC80AMD64_CINCS ?= $(PATH_TOOL_VCC80AMD64_INC)
|
---|
| 89 | TOOL_VCC80AMD64_CDEFS ?=
|
---|
[434] | 90 |
|
---|
[667] | 91 | TOOL_VCC80AMD64_CXXOBJSUFF ?= .obj
|
---|
| 92 | TOOL_VCC80AMD64_CXXFLAGS ?= -TP -c -nologo
|
---|
| 93 | TOOL_VCC80AMD64_CXXFLAGS.debug ?= -Od -Zi
|
---|
| 94 | TOOL_VCC80AMD64_CXXFLAGS.release ?= -O2
|
---|
| 95 | TOOL_VCC80AMD64_CXXFLAGS.profile ?= -O2
|
---|
| 96 | TOOL_VCC80AMD64_CXXINCS ?= $(PATH_TOOL_VCC80AMD64_INC) $(PATH_TOOL_VCC80AMD64_ATLMFC_INC)
|
---|
| 97 | TOOL_VCC80AMD64_CXXDEFS ?=
|
---|
[434] | 98 |
|
---|
[667] | 99 | TOOL_VCC80AMD64_ASOBJSUFF ?= .obj
|
---|
[434] | 100 |
|
---|
[667] | 101 | TOOL_VCC80AMD64_RCOBJSUFF ?= .res
|
---|
| 102 | TOOL_VCC80AMD64_RCINCS ?= $(PATH_TOOL_VCC80AMD64_INC) $(PATH_TOOL_VCC80AMD64_ATLMFC_INC)
|
---|
| 103 |
|
---|
| 104 | TOOL_VCC80AMD64_ARFLAGS ?= -nologo -machine:amd64
|
---|
| 105 | TOOL_VCC80AMD64_ARLIBSUFF ?= .lib
|
---|
| 106 |
|
---|
| 107 | TOOL_VCC80AMD64_LDFLAGS ?= -nologo -machine:amd64
|
---|
| 108 | TOOL_VCC80AMD64_LDFLAGS.debug ?= -debug
|
---|
| 109 | TOOL_VCC80AMD64_LDFLAGS.release ?=
|
---|
| 110 |
|
---|
| 111 |
|
---|
| 112 |
|
---|
[434] | 113 | ## Compile C source.
|
---|
| 114 | # @param $(target) Normalized main target name.
|
---|
| 115 | # @param $(source) Source filename (relative).
|
---|
| 116 | # @param $(obj) Object file name. This shall be (re)created by the compilation.
|
---|
| 117 | # @param $(dep) Dependcy file. This shall be (re)created by the compilation.
|
---|
| 118 | # @param $(flags) Flags.
|
---|
| 119 | # @param $(defs) Definitions. No -D or something.
|
---|
| 120 | # @param $(incs) Includes. No -I or something.
|
---|
| 121 | # @param $(dirdep) Directory creation dependency.
|
---|
| 122 | # @param $(deps) Other dependencies.
|
---|
| 123 | #
|
---|
| 124 | # @param $(outbase) Output basename (full). Use this for list files and such.
|
---|
| 125 | # @param $(objsuff) Object suffix.
|
---|
[667] | 126 | TOOL_VCC80AMD64_COMPILE_C_DEPEND =
|
---|
[434] | 127 | TOOL_VCC80AMD64_COMPILE_C_DEPORD =
|
---|
[1129] | 128 | TOOL_VCC80AMD64_COMPILE_C_OUTPUT = $(call TOOL_VCC80AMD64_PDB, $(outbase)-obj,idb)
|
---|
| 129 | TOOL_VCC80AMD64_COMPILE_C_OUTPUT_MAYBE = $(call TOOL_VCC80AMD64_PDB, $(outbase)-obj,pdb)
|
---|
[434] | 130 | define TOOL_VCC80AMD64_COMPILE_C_CMDS
|
---|
[696] | 131 | $(QUIET)$(TOOL_VCC80AMD64_CC) -c\
|
---|
[434] | 132 | $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
|
---|
| 133 | -Fd$(outbase)-obj.pdb \
|
---|
| 134 | -FD\
|
---|
| 135 | -Fo$(obj)\
|
---|
[697] | 136 | $(subst /,\\,$(abspath $(source)))
|
---|
[2237] | 137 | $(QUIET)$(DEP_IDB) -f -s -q -o $(dep) -t $(obj) $(call TOOL_VCC80AMD64_PDB,$(outbase)-obj,idb)
|
---|
[434] | 138 | endef
|
---|
| 139 |
|
---|
| 140 |
|
---|
| 141 | ## Compile C++ source.
|
---|
| 142 | # @param $(target) Normalized main target name.
|
---|
| 143 | # @param $(source) Source filename (relative).
|
---|
| 144 | # @param $(obj) Object file name. This shall be (re)created by the compilation.
|
---|
| 145 | # @param $(dep) Dependcy file. This shall be (re)created by the compilation.
|
---|
| 146 | # @param $(flags) Flags.
|
---|
| 147 | # @param $(defs) Definitions. No -D or something.
|
---|
| 148 | # @param $(incs) Includes. No -I or something.
|
---|
| 149 | # @param $(dirdep) Directory creation dependency.
|
---|
| 150 | # @param $(deps) Other dependencies.
|
---|
| 151 | #
|
---|
| 152 | # @param $(outbase) Output basename (full). Use this for list files and such.
|
---|
| 153 | # @param $(objsuff) Object suffix.
|
---|
| 154 | TOOL_VCC80AMD64_COMPILE_CXX_DEPEND =
|
---|
| 155 | TOOL_VCC80AMD64_COMPILE_CXX_DEPORD =
|
---|
[1129] | 156 | TOOL_VCC80AMD64_COMPILE_CXX_OUTPUT = $(call TOOL_VCC80AMD64_PDB, $(outbase)-obj,idb)
|
---|
| 157 | TOOL_VCC80AMD64_COMPILE_CXX_OUTPUT_MAYBE = $(call TOOL_VCC80AMD64_PDB, $(outbase)-obj,pdb)
|
---|
[434] | 158 | define TOOL_VCC80AMD64_COMPILE_CXX_CMDS
|
---|
[696] | 159 | $(QUIET)$(TOOL_VCC80AMD64_CXX) -c\
|
---|
[434] | 160 | $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
|
---|
| 161 | -Fd$(outbase)-obj.pdb \
|
---|
| 162 | -FD\
|
---|
| 163 | -Fo$(obj)\
|
---|
[697] | 164 | $(subst /,\\,$(abspath $(source)))
|
---|
[2237] | 165 | $(QUIET)$(DEP_IDB) -f -s -q -o $(dep) -t $(obj) $(call TOOL_VCC80AMD64_PDB,$(outbase)-obj,idb)
|
---|
[434] | 166 | endef
|
---|
| 167 |
|
---|
| 168 |
|
---|
[641] | 169 | ## Compile resource source.
|
---|
| 170 | # @param $(target) Normalized main target name.
|
---|
| 171 | # @param $(source) Source filename (relative).
|
---|
| 172 | # @param $(obj) Object file name. This shall be (re)created by the compilation.
|
---|
| 173 | # @param $(dep) Dependcy file. This shall be (re)created by the compilation.
|
---|
| 174 | # @param $(flags) Flags.
|
---|
| 175 | # @param $(defs) Definitions. No -D or something.
|
---|
| 176 | # @param $(incs) Includes. No -I or something.
|
---|
| 177 | # @param $(dirdep) Directory creation dependency.
|
---|
| 178 | # @param $(deps) Other dependencies.
|
---|
| 179 | #
|
---|
| 180 | # @param $(outbase) Output basename (full). Use this for list files and such.
|
---|
| 181 | # @param $(objsuff) Object suffix.
|
---|
| 182 | TOOL_VCC80AMD64_COMPILE_RC_DEPEND =
|
---|
| 183 | TOOL_VCC80AMD64_COMPILE_RC_DEPORD =
|
---|
[1031] | 184 | TOOL_VCC80AMD64_COMPILE_RC_OUTPUT =
|
---|
[641] | 185 | define TOOL_VCC80AMD64_COMPILE_RC_CMDS
|
---|
[696] | 186 | $(QUIET)$(TOOL_VCC80AMD64_RC) \
|
---|
[641] | 187 | $(flags) $(addprefix /i, $(subst /,\\,$(incs))) $(addprefix /d, $(defs))\
|
---|
| 188 | /fo$(obj)\
|
---|
[697] | 189 | $(subst /,\\,$(abspath $(source)))
|
---|
[641] | 190 | endef
|
---|
| 191 |
|
---|
| 192 |
|
---|
[434] | 193 | ## Link library
|
---|
| 194 | # @param $(target) Normalized main target name.
|
---|
| 195 | # @param $(out) Library name.
|
---|
| 196 | # @param $(objs) Object files to put in the library.
|
---|
| 197 | # @param $(flags) Flags.
|
---|
| 198 | # @param $(dirdep) Directory creation dependency.
|
---|
| 199 | # @param $(deps) Other dependencies.
|
---|
| 200 | # @param $(othersrc) Unhandled sources.
|
---|
| 201 | # @param $(outbase) Output basename (full). Use this for list files and such.
|
---|
| 202 | #
|
---|
| 203 | TOOL_VCC80AMD64_LINK_LIBRARY_DEPEND = $(othersrc)
|
---|
| 204 | TOOL_VCC80AMD64_LINK_LIBRARY_DEPORD =
|
---|
[1031] | 205 | TOOL_VCC80AMD64_LINK_LIBRARY_OUTPUT = $(outbase).rsp
|
---|
| 206 | TOOL_VCC80AMD64_LINK_LIBRARY_OUTPUT_MAYBE = $(outbase).lst $(outbase).exp $(outbase).pdb
|
---|
[434] | 207 | define TOOL_VCC80AMD64_LINK_LIBRARY_CMDS
|
---|
[2557] | 208 | $(QUIET)$(APPEND) -tn $(outbase).rsp \
|
---|
[768] | 209 | $(foreach arg,\
|
---|
| 210 | $(subst /,\\,$(objs) \
|
---|
| 211 | $(filter-out %.def,$(othersrc))) \
|
---|
| 212 | $(addprefix /DEF:,$(filter %.def,$(othersrc))) \
|
---|
| 213 | ,\"$(arg)\")
|
---|
| 214 | $(QUIET)$(TOOL_VCC80AMD64_AR) $(flags) /OUT:$(out) @$(outbase).rsp
|
---|
| 215 | endef
|
---|
[434] | 216 |
|
---|
| 217 |
|
---|
| 218 | ## Link program
|
---|
| 219 | # @param $(target) Normalized main target name.
|
---|
| 220 | # @param $(out) Program name.
|
---|
| 221 | # @param $(objs) Object files to link together.
|
---|
| 222 | # @param $(libs) Libraries to search.
|
---|
| 223 | # @param $(libpath) Library search paths.
|
---|
| 224 | # @param $(flags) Flags.
|
---|
| 225 | # @param $(dirdep) Directory creation dependency.
|
---|
| 226 | # @param $(deps) Other dependencies.
|
---|
| 227 | # @param $(othersrc) Unhandled sources.
|
---|
| 228 | # @param $(custom_pre) Custom step invoked before linking.
|
---|
| 229 | # @param $(custom_post) Custom step invoked after linking.
|
---|
| 230 | # @param $(outbase) Output basename (full). Use this for list files and such.
|
---|
| 231 | #
|
---|
| 232 | TOOL_VCC80AMD64_LINK_PROGRAM_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc)
|
---|
| 233 | TOOL_VCC80AMD64_LINK_PROGRAM_DEPORD =
|
---|
[2524] | 234 | TOOL_VCC80AMD64_LINK_PROGRAM_OUTPUT_MAYBE = $(outbase).lib $(outbase).exp $(outbase).ilk $(out).manifest
|
---|
[3303] | 235 | TOOL_VCC80AMD64_LINK_PROGRAM_OUTPUT_MAYBE_PRECIOUS = $(outbase).map $(outbase).rsp
|
---|
[2524] | 236 | TOOL_VCC80AMD64_LINK_PROGRAM_OUTPUT_DEBUG = $(outbase).pdb
|
---|
| 237 | TOOL_VCC80AMD64_LINK_PROGRAM_DEBUG_INSTALL_FN = $(2).pdb=>$(basename $(3)).pdb
|
---|
[434] | 238 | define TOOL_VCC80AMD64_LINK_PROGRAM_CMDS
|
---|
[2557] | 239 | $(QUIET)$(APPEND) -tn $(outbase).rsp \
|
---|
| 240 | $(foreach arg,\
|
---|
| 241 | $(subst /,\\,$(objs)) \
|
---|
| 242 | $(subst /,\\,$(libs)) \
|
---|
| 243 | ,\"$(arg)\")
|
---|
[696] | 244 | $(QUIET)$(TOOL_VCC80AMD64_LD) $(flags) \
|
---|
[434] | 245 | /OUT:$(out) \
|
---|
[437] | 246 | /MAPINFO:EXPORTS /INCREMENTAL:NO \
|
---|
[434] | 247 | /MAP:$(outbase).map \
|
---|
| 248 | $(foreach def,$(filter %.def,$(othersrc)), /DEF:$(def)) \
|
---|
| 249 | $(subst /,\\,$(filter %.exp %.res,$(othersrc))) \
|
---|
| 250 | $(foreach p,$(libpath), /LIBPATH:$(p)) \
|
---|
[2557] | 251 | @$(outbase).rsp
|
---|
[1295] | 252 | $(QUIET)$(TEST) -f $(out).manifest -- \
|
---|
| 253 | $(TOOL_VCC80AMD64_MT) -manifest $(subst /,\\,$(out)).manifest -outputresource:$(subst /,\\,$(out))
|
---|
[434] | 254 | endef
|
---|
| 255 |
|
---|
| 256 |
|
---|
| 257 | ## Link DLL.
|
---|
| 258 | # @param $(target) Normalized main target name.
|
---|
| 259 | # @param $(out) DLL name.
|
---|
| 260 | # @param $(objs) Object files to link together.
|
---|
| 261 | # @param $(libs) Libraries to search.
|
---|
| 262 | # @param $(libpath) Library search paths.
|
---|
| 263 | # @param $(flags) Flags.
|
---|
| 264 | # @param $(dirdep) Directory creation dependency.
|
---|
| 265 | # @param $(deps) Other dependencies.
|
---|
| 266 | # @param $(othersrc) Unhandled sources.
|
---|
| 267 | # @param $(custom_pre) Custom step invoked before linking.
|
---|
| 268 | # @param $(custom_post) Custom step invoked after linking.
|
---|
| 269 | #
|
---|
| 270 | # @param $(outbase) Output basename (full). Use this for list files and such.
|
---|
| 271 | TOOL_VCC80AMD64_LINK_DLL_DEPEND = $(objs) $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc)
|
---|
[2487] | 272 | TOOL_VCC80AMD64_LINK_DLL_DEPORD = $(call DIRDEP,$(PATH_STAGE_LIB))
|
---|
[3303] | 273 | TOOL_VCC80AMD64_LINK_DLL_OUTPUT = $(outbase).lib $(outbase).exp
|
---|
| 274 | TOOL_VCC80AMD64_LINK_DLL_OUTPUT_MAYBE = $(outbase).ilk $(out).manifest
|
---|
| 275 | TOOL_VCC80AMD64_LINK_DLL_OUTPUT_MAYBE_PRECIOUS = $(outbase).map $(outbase).rsp $(PATH_STAGE_LIB)/$(notdir $(outbase)).lib $(PATH_STAGE_LIB)/$(notdir $(outbase)).exp
|
---|
[2524] | 276 | TOOL_VCC80AMD64_LINK_DLL_OUTPUT_DEBUG = $(outbase).pdb
|
---|
| 277 | TOOL_VCC80AMD64_LINK_DLL_DEBUG_INSTALL_FN = $(2).pdb=>$(basename $(3)).pdb
|
---|
[434] | 278 | define TOOL_VCC80AMD64_LINK_DLL_CMDS
|
---|
[2557] | 279 | $(QUIET)$(APPEND) -tn $(outbase).rsp \
|
---|
| 280 | $(foreach arg,\
|
---|
| 281 | $(subst /,\\,$(objs)) \
|
---|
| 282 | $(subst /,\\,$(libs)) \
|
---|
| 283 | ,\"$(arg)\")
|
---|
[696] | 284 | $(QUIET)$(TOOL_VCC80AMD64_LD) $(flags) \
|
---|
[434] | 285 | /OUT:$(out) \
|
---|
| 286 | /IMPLIB:$(outbase).lib \
|
---|
[437] | 287 | /MAPINFO:EXPORTS /INCREMENTAL:NO \
|
---|
[434] | 288 | /MAP:$(outbase).map \
|
---|
| 289 | /DLL \
|
---|
| 290 | $(foreach def,$(filter %.def,$(othersrc)), /DEF:$(def)) \
|
---|
| 291 | $(subst /,\\,$(filter %.exp %.res,$(othersrc))) \
|
---|
| 292 | $(foreach p,$(libpath), /LIBPATH:$(p)) \
|
---|
[2557] | 293 | @$(outbase).rsp
|
---|
[1295] | 294 | $(QUIET)$(TEST) -f $(out).manifest -- \
|
---|
[1312] | 295 | $(TOOL_VCC80AMD64_MT) -manifest $(subst /,\\,$(out)).manifest '-outputresource:$(subst /,\\,$(out));#2'
|
---|
[2487] | 296 | $(QUIET)$(CP) --changed --ignore-non-existing $(outbase).exp $(outbase).lib $(PATH_STAGE_LIB)/
|
---|
| 297 | $(eval _DIRS += $(PATH_STAGE_LIB))
|
---|
[434] | 298 | endef
|
---|
| 299 |
|
---|
| 300 |
|
---|
| 301 | ## Link system module (windows aka driver, linux aka kernel module)
|
---|
| 302 | # @param $(target) Normalized main target name.
|
---|
| 303 | # @param $(out) System module name.
|
---|
| 304 | # @param $(objs) Object files to link together.
|
---|
| 305 | # @param $(libs) Libraries to search.
|
---|
| 306 | # @param $(libpath) Library search paths.
|
---|
| 307 | # @param $(flags) Flags.
|
---|
| 308 | # @param $(dirdep) Directory creation dependency.
|
---|
| 309 | # @param $(deps) Other dependencies.
|
---|
| 310 | # @param $(othersrc) Unhandled sources.
|
---|
| 311 | # @param $(custom_pre) Custom step invoked before linking.
|
---|
| 312 | # @param $(custom_post) Custom step invoked after linking.
|
---|
| 313 | #
|
---|
| 314 | # @param $(outbase) Output basename (full). Use this for list files and such.
|
---|
| 315 | TOOL_VCC80AMD64_LINK_SYSMOD_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc)
|
---|
| 316 | TOOL_VCC80AMD64_LINK_SYSMOD_DEPORD =
|
---|
[2524] | 317 | TOOL_VCC80AMD64_LINK_SYSMOD_OUTPUT_MAYBE = $(outbase).lib $(outbase).exp $(outbase).ilk $(out).manifest
|
---|
[3303] | 318 | TOOL_VCC80AMD64_LINK_SYSMOD_OUTPUT_MAYBE_PRECIOUS = $(outbase).map $(outbase).rsp
|
---|
[2524] | 319 | TOOL_VCC80AMD64_LINK_SYSMOD_OUTPUT_DEBUG = $(outbase).pdb
|
---|
| 320 | TOOL_VCC80AMD64_LINK_SYSMOD_DEBUG_INSTALL_FN = $(2).pdb=>$(basename $(3)).pdb
|
---|
[434] | 321 | define TOOL_VCC80AMD64_LINK_SYSMOD_CMDS
|
---|
[2557] | 322 | $(QUIET)$(APPEND) -tn $(outbase).rsp \
|
---|
| 323 | $(foreach arg,\
|
---|
| 324 | $(subst /,\\,$(objs)) \
|
---|
| 325 | $(subst /,\\,$(libs)) \
|
---|
| 326 | ,\"$(arg)\")
|
---|
[696] | 327 | $(QUIET)$(TOOL_VCC80AMD64_LD) $(flags) \
|
---|
[434] | 328 | /OUT:$(out) \
|
---|
[437] | 329 | /MAPINFO:EXPORTS /INCREMENTAL:NO \
|
---|
[434] | 330 | /MAP:$(outbase).map \
|
---|
| 331 | $(foreach def,$(filter %.def,$(othersrc)), /DEF:$(def)) \
|
---|
| 332 | $(subst /,\\,$(filter %.exp %.res,$(othersrc))) \
|
---|
| 333 | $(foreach p,$(libpath), /LIBPATH:$(p)) \
|
---|
[2557] | 334 | @$(outbase).rsp
|
---|
[1295] | 335 | $(QUIET)$(TEST) -f $(out).manifest -- \
|
---|
[1312] | 336 | $(TOOL_VCC80AMD64_MT) -manifest $(subst /,\\,$(out)).manifest '-outputresource:$(subst /,\\,$(out));#2'
|
---|
[434] | 337 | endef
|
---|
| 338 |
|
---|