| 1 | # $Id: VCC80AMD64.kmk 857 2007-03-28 22:36:57Z bird $
|
|---|
| 2 | ## @file
|
|---|
| 3 | #
|
|---|
| 4 | # kBuild Tool Config - Visual C++ 8.0 (aka Visual .NET 2005, or MSC v14), targeting AMD64.
|
|---|
| 5 | #
|
|---|
| 6 | # Copyright (c) 2004-2007 knut st. osmundsen <bird-kBuild-spam@anduin.net>
|
|---|
| 7 | #
|
|---|
| 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 | #
|
|---|
| 26 |
|
|---|
| 27 | TOOL_VCC80AMD64 := Visual C++ 8.0 (aka Visual .NET 2005, or MSC v14), targeting AMD64.
|
|---|
| 28 |
|
|---|
| 29 | # Tool Specific Properties
|
|---|
| 30 | ifndef PATH_TOOL_VCC80AMD64
|
|---|
| 31 | PATH_TOOL_VCC80AMD64 := $(wildcard $(PATH_DEVTOOLS)/win.x86/vcc/v8*)
|
|---|
| 32 | ifeq ($(PATH_TOOL_VCC80AMD64),)
|
|---|
| 33 | PATH_TOOL_VCC80AMD64 := $(PATH_TOOL_VCC80)
|
|---|
| 34 | endif
|
|---|
| 35 | ifeq ($(PATH_TOOL_VCC80AMD64),)
|
|---|
| 36 | PATH_TOOL_VCC80AMD64 := $(PATH_TOOL_VCC80X86)
|
|---|
| 37 | endif
|
|---|
| 38 | ifeq ($(PATH_TOOL_VCC80AMD64),)
|
|---|
| 39 | PATH_TOOL_VCC80AMD64 := $(wildcard $(PATH_DEVTOOLS)/win.x86/vcc/v8*)
|
|---|
| 40 | endif
|
|---|
| 41 | ifneq ($(PATH_TOOL_VCC80AMD64),)
|
|---|
| 42 | PATH_TOOL_VCC80AMD64 := $(lastword $(sort $(PATH_TOOL_VCC80AMD64)))
|
|---|
| 43 | else
|
|---|
| 44 | $(warning kBuild: PATH_TOOL_VCC80AMD64 cannot be determined!)
|
|---|
| 45 | PATH_TOOL_VCC80AMD64 := $(PATH_DEVTOOLS)/win.x86/vcc/v8
|
|---|
| 46 | endif
|
|---|
| 47 | else
|
|---|
| 48 | # Resolve any fancy stuff once and for all.
|
|---|
| 49 | PATH_TOOL_VCC80AMD64 := $(PATH_TOOL_VCC80AMD64)
|
|---|
| 50 | endif
|
|---|
| 51 | ifeq ($(BUILD_PLATFORM).$(BUILD_PLATFORM_ARCH),win.amd64)
|
|---|
| 52 | PATH_TOOL_VCC80AMD64_BIN ?= $(PATH_TOOL_VCC80AMD64)/bin/amd64
|
|---|
| 53 | else
|
|---|
| 54 | PATH_TOOL_VCC80AMD64_BIN ?= $(PATH_TOOL_VCC80AMD64)/bin/x86_amd64
|
|---|
| 55 | endif
|
|---|
| 56 | PATH_TOOL_VCC80AMD64_LIB ?= $(PATH_TOOL_VCC80AMD64)/lib/amd64
|
|---|
| 57 | PATH_TOOL_VCC80AMD64_INC ?= $(PATH_TOOL_VCC80AMD64)/include
|
|---|
| 58 | PATH_TOOL_VCC80AMD64_ATLMFC ?= $(PATH_TOOL_VCC80AMD64)/atlmfc
|
|---|
| 59 | PATH_TOOL_VCC80AMD64_ATLMFC_INC ?= $(PATH_TOOL_VCC80AMD64_ATLMFC)/include
|
|---|
| 60 | PATH_TOOL_VCC80AMD64_ATLMFC_LIB ?= $(PATH_TOOL_VCC80AMD64_ATLMFC)/lib/amd64
|
|---|
| 61 | TOOL_VCC80AMD64_CC ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC80AMD64_BIN)/cl.exe
|
|---|
| 62 | TOOL_VCC80AMD64_CXX ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC80AMD64_BIN)/cl.exe
|
|---|
| 63 | TOOL_VCC80AMD64_AS ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC80AMD64_BIN)/ml64.exe
|
|---|
| 64 | TOOL_VCC80AMD64_RC ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC80AMD64_BIN)/../rc.exe
|
|---|
| 65 | TOOL_VCC80AMD64_AR ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC80AMD64_BIN)/lib.exe
|
|---|
| 66 | TOOL_VCC80AMD64_LD ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC80AMD64_BIN)/link.exe
|
|---|
| 67 | TOOL_VCC80AMD64_MT ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC80AMD64_BIN)/../mt.exe
|
|---|
| 68 | ## Disabled fast DEP_IDB based dependencies.
|
|---|
| 69 | #VCC80AMD64_OLD_DEPS = 1
|
|---|
| 70 |
|
|---|
| 71 | ## Constructs the correct .pdb name (the name is lowercased).
|
|---|
| 72 | # @param $(1) Base name, no extention.
|
|---|
| 73 | # @param $(2) The extension.
|
|---|
| 74 | ifeq ($(filter tolower,$(KMK_FEATURES)),tolower)
|
|---|
| 75 | TOOL_VCC80AMD64_PDB = $(dir $(1))$(tolower $(notdir $(1))).$(2)
|
|---|
| 76 | else # this fallback is incorrect and won't work on a case sensitive FS.
|
|---|
| 77 | TOOL_VCC80AMD64_PDB = $(1).$(2)
|
|---|
| 78 | endif
|
|---|
| 79 |
|
|---|
| 80 | TOOL_VCC80AMD64_COBJSUFF ?= .obj
|
|---|
| 81 | TOOL_VCC80AMD64_CFLAGS ?= -TC -c -nologo
|
|---|
| 82 | TOOL_VCC80AMD64_CFLAGS.debug ?= -Od -Zi
|
|---|
| 83 | TOOL_VCC80AMD64_CFLAGS.release ?= -O2
|
|---|
| 84 | TOOL_VCC80AMD64_CFLAGS.profile ?= -O2
|
|---|
| 85 | TOOL_VCC80AMD64_CINCS ?= $(PATH_TOOL_VCC80AMD64_INC)
|
|---|
| 86 | TOOL_VCC80AMD64_CDEFS ?=
|
|---|
| 87 |
|
|---|
| 88 | TOOL_VCC80AMD64_CXXOBJSUFF ?= .obj
|
|---|
| 89 | TOOL_VCC80AMD64_CXXFLAGS ?= -TP -c -nologo
|
|---|
| 90 | TOOL_VCC80AMD64_CXXFLAGS.debug ?= -Od -Zi
|
|---|
| 91 | TOOL_VCC80AMD64_CXXFLAGS.release ?= -O2
|
|---|
| 92 | TOOL_VCC80AMD64_CXXFLAGS.profile ?= -O2
|
|---|
| 93 | TOOL_VCC80AMD64_CXXINCS ?= $(PATH_TOOL_VCC80AMD64_INC) $(PATH_TOOL_VCC80AMD64_ATLMFC_INC)
|
|---|
| 94 | TOOL_VCC80AMD64_CXXDEFS ?=
|
|---|
| 95 |
|
|---|
| 96 | TOOL_VCC80AMD64_ASOBJSUFF ?= .obj
|
|---|
| 97 |
|
|---|
| 98 | TOOL_VCC80AMD64_RCOBJSUFF ?= .res
|
|---|
| 99 | TOOL_VCC80AMD64_RCINCS ?= $(PATH_TOOL_VCC80AMD64_INC) $(PATH_TOOL_VCC80AMD64_ATLMFC_INC)
|
|---|
| 100 |
|
|---|
| 101 | TOOL_VCC80AMD64_ARFLAGS ?= -nologo -machine:amd64
|
|---|
| 102 | TOOL_VCC80AMD64_ARLIBSUFF ?= .lib
|
|---|
| 103 |
|
|---|
| 104 | TOOL_VCC80AMD64_LDFLAGS ?= -nologo -machine:amd64
|
|---|
| 105 | TOOL_VCC80AMD64_LDFLAGS.debug ?= -debug
|
|---|
| 106 | TOOL_VCC80AMD64_LDFLAGS.release ?=
|
|---|
| 107 |
|
|---|
| 108 |
|
|---|
| 109 |
|
|---|
| 110 | ## Compile C source.
|
|---|
| 111 | # @param $(target) Normalized main target name.
|
|---|
| 112 | # @param $(source) Source filename (relative).
|
|---|
| 113 | # @param $(obj) Object file name. This shall be (re)created by the compilation.
|
|---|
| 114 | # @param $(dep) Dependcy file. This shall be (re)created by the compilation.
|
|---|
| 115 | # @param $(flags) Flags.
|
|---|
| 116 | # @param $(defs) Definitions. No -D or something.
|
|---|
| 117 | # @param $(incs) Includes. No -I or something.
|
|---|
| 118 | # @param $(dirdep) Directory creation dependency.
|
|---|
| 119 | # @param $(deps) Other dependencies.
|
|---|
| 120 | #
|
|---|
| 121 | # @param $(outbase) Output basename (full). Use this for list files and such.
|
|---|
| 122 | # @param $(objsuff) Object suffix.
|
|---|
| 123 | TOOL_VCC80AMD64_COMPILE_C_OUTPUT = $(call TOOL_VCC80AMD64_PDB, $(outbase)-obj,pdb) $(call TOOL_VCC80AMD64_PDB, $(outbase)-obj,idb)
|
|---|
| 124 | TOOL_VCC80AMD64_COMPILE_C_DEPEND =
|
|---|
| 125 | TOOL_VCC80AMD64_COMPILE_C_DEPORD =
|
|---|
| 126 | ifndef VCC80AMD64_OLD_DEPS
|
|---|
| 127 | define TOOL_VCC80AMD64_COMPILE_C_CMDS
|
|---|
| 128 | $(QUIET)$(TOOL_VCC80AMD64_CC) -c\
|
|---|
| 129 | $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
|
|---|
| 130 | -Fd$(outbase)-obj.pdb \
|
|---|
| 131 | -FD\
|
|---|
| 132 | -Fo$(obj)\
|
|---|
| 133 | $(subst /,\\,$(abspath $(source)))
|
|---|
| 134 | $(QUIET)$(DEP_IDB) -f -s -o $(dep) -t $(obj) $(call TOOL_VCC80AMD64_PDB,$(outbase)-obj,idb)
|
|---|
| 135 | endef
|
|---|
| 136 | else
|
|---|
| 137 | define TOOL_VCC80AMD64_COMPILE_C_CMDS
|
|---|
| 138 | $(QUIET)$(TOOL_VCC80AMD64_CC) -c\
|
|---|
| 139 | $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
|
|---|
| 140 | -Fd$(outbase)-obj.pdb \
|
|---|
| 141 | -Fo$(obj)\
|
|---|
| 142 | $(subst /,\\,$(abspath $(source)))
|
|---|
| 143 | $(QUIET)$(TOOL_VCC80AMD64_CC) -E\
|
|---|
| 144 | $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
|
|---|
| 145 | $(subst /,\\,$(abspath $(source)))\
|
|---|
| 146 | | $(DEP_PRE) -f -s -o $(dep) -t $(obj) -
|
|---|
| 147 | endef
|
|---|
| 148 | endif
|
|---|
| 149 |
|
|---|
| 150 |
|
|---|
| 151 | ## Compile C++ source.
|
|---|
| 152 | # @param $(target) Normalized main target name.
|
|---|
| 153 | # @param $(source) Source filename (relative).
|
|---|
| 154 | # @param $(obj) Object file name. This shall be (re)created by the compilation.
|
|---|
| 155 | # @param $(dep) Dependcy file. This shall be (re)created by the compilation.
|
|---|
| 156 | # @param $(flags) Flags.
|
|---|
| 157 | # @param $(defs) Definitions. No -D or something.
|
|---|
| 158 | # @param $(incs) Includes. No -I or something.
|
|---|
| 159 | # @param $(dirdep) Directory creation dependency.
|
|---|
| 160 | # @param $(deps) Other dependencies.
|
|---|
| 161 | #
|
|---|
| 162 | # @param $(outbase) Output basename (full). Use this for list files and such.
|
|---|
| 163 | # @param $(objsuff) Object suffix.
|
|---|
| 164 | TOOL_VCC80AMD64_COMPILE_CXX_OUTPUT = $(call TOOL_VCC80AMD64_PDB, $(outbase)-obj,pdb) $(call TOOL_VCC80AMD64_PDB, $(outbase)-obj,idb)
|
|---|
| 165 | TOOL_VCC80AMD64_COMPILE_CXX_DEPEND =
|
|---|
| 166 | TOOL_VCC80AMD64_COMPILE_CXX_DEPORD =
|
|---|
| 167 | ifndef VCC80AMD64_OLD_DEPS
|
|---|
| 168 | define TOOL_VCC80AMD64_COMPILE_CXX_CMDS
|
|---|
| 169 | $(QUIET)$(TOOL_VCC80AMD64_CXX) -c\
|
|---|
| 170 | $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
|
|---|
| 171 | -Fd$(outbase)-obj.pdb \
|
|---|
| 172 | -FD\
|
|---|
| 173 | -Fo$(obj)\
|
|---|
| 174 | $(subst /,\\,$(abspath $(source)))
|
|---|
| 175 | $(QUIET)$(DEP_IDB) -f -s -o $(dep) -t $(obj) $(call TOOL_VCC80AMD64_PDB,$(outbase)-obj,idb)
|
|---|
| 176 | endef
|
|---|
| 177 | else
|
|---|
| 178 | define TOOL_VCC80AMD64_COMPILE_CXX_CMDS
|
|---|
| 179 | $(QUIET)$(TOOL_VCC80AMD64_CXX) -c\
|
|---|
| 180 | $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
|
|---|
| 181 | -Fd$(outbase)-obj.pdb \
|
|---|
| 182 | -Fo$(obj)\
|
|---|
| 183 | $(subst /,\\,$(abspath $(source)))
|
|---|
| 184 | $(QUIET)$(TOOL_VCC80AMD64_CXX) -E\
|
|---|
| 185 | $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
|
|---|
| 186 | $(subst /,\\,$(abspath $(source)))\
|
|---|
| 187 | | $(DEP_PRE) -f -s -o $(dep) -t $(obj) -
|
|---|
| 188 | endef
|
|---|
| 189 | endif
|
|---|
| 190 |
|
|---|
| 191 |
|
|---|
| 192 | ## Compile resource source.
|
|---|
| 193 | # @param $(target) Normalized main target name.
|
|---|
| 194 | # @param $(source) Source filename (relative).
|
|---|
| 195 | # @param $(obj) Object file name. This shall be (re)created by the compilation.
|
|---|
| 196 | # @param $(dep) Dependcy file. This shall be (re)created by the compilation.
|
|---|
| 197 | # @param $(flags) Flags.
|
|---|
| 198 | # @param $(defs) Definitions. No -D or something.
|
|---|
| 199 | # @param $(incs) Includes. No -I or something.
|
|---|
| 200 | # @param $(dirdep) Directory creation dependency.
|
|---|
| 201 | # @param $(deps) Other dependencies.
|
|---|
| 202 | #
|
|---|
| 203 | # @param $(outbase) Output basename (full). Use this for list files and such.
|
|---|
| 204 | # @param $(objsuff) Object suffix.
|
|---|
| 205 | TOOL_VCC80AMD64_COMPILE_RC_OUTPUT =
|
|---|
| 206 | TOOL_VCC80AMD64_COMPILE_RC_DEPEND =
|
|---|
| 207 | TOOL_VCC80AMD64_COMPILE_RC_DEPORD =
|
|---|
| 208 | define TOOL_VCC80AMD64_COMPILE_RC_CMDS
|
|---|
| 209 | $(QUIET)$(TOOL_VCC80AMD64_RC) \
|
|---|
| 210 | $(flags) $(addprefix /i, $(subst /,\\,$(incs))) $(addprefix /d, $(defs))\
|
|---|
| 211 | /fo$(obj)\
|
|---|
| 212 | $(subst /,\\,$(abspath $(source)))
|
|---|
| 213 | endef
|
|---|
| 214 |
|
|---|
| 215 |
|
|---|
| 216 | ## Link library
|
|---|
| 217 | # @param $(target) Normalized main target name.
|
|---|
| 218 | # @param $(out) Library name.
|
|---|
| 219 | # @param $(objs) Object files to put in the library.
|
|---|
| 220 | # @param $(flags) Flags.
|
|---|
| 221 | # @param $(dirdep) Directory creation dependency.
|
|---|
| 222 | # @param $(deps) Other dependencies.
|
|---|
| 223 | # @param $(othersrc) Unhandled sources.
|
|---|
| 224 | # @param $(outbase) Output basename (full). Use this for list files and such.
|
|---|
| 225 | #
|
|---|
| 226 | TOOL_VCC80AMD64_LINK_LIBRARY_DEPEND = $(othersrc)
|
|---|
| 227 | TOOL_VCC80AMD64_LINK_LIBRARY_DEPORD =
|
|---|
| 228 | ifeq ($(filter append-dash-n,$(KMK_FEATURES)),append-dash-n)
|
|---|
| 229 | TOOL_VCC80AMD64_LINK_LIBRARY_OUTPUT = $(outbase).lst $(outbase).exp $(outbase).pdb $(outbase).rsp
|
|---|
| 230 | define TOOL_VCC80AMD64_LINK_LIBRARY_CMDS
|
|---|
| 231 | $(QUIET)$(APPEND) -n $(outbase).rsp \
|
|---|
| 232 | $(foreach arg,\
|
|---|
| 233 | $(subst /,\\,$(objs) \
|
|---|
| 234 | $(filter-out %.def,$(othersrc))) \
|
|---|
| 235 | $(addprefix /DEF:,$(filter %.def,$(othersrc))) \
|
|---|
| 236 | ,\"$(arg)\")
|
|---|
| 237 | $(QUIET)$(TOOL_VCC80AMD64_AR) $(flags) /OUT:$(out) @$(outbase).rsp
|
|---|
| 238 | endef
|
|---|
| 239 | else
|
|---|
| 240 | TOOL_VCC80AMD64_LINK_LIBRARY_OUTPUT = $(outbase).lst $(outbase).exp $(outbase).pdb
|
|---|
| 241 | define TOOL_VCC80AMD64_LINK_LIBRARY_CMDS
|
|---|
| 242 | $(QUIET)$(TOOL_VCC80AMD64_AR) $(flags) /OUT:$(out) $(subst /,\\,$(objs) $(filter %.a %.lib,$(othersrc))) \
|
|---|
| 243 | $(foreach def,$(filter %.def,$(othersrc)), /DEF:$(def))
|
|---|
| 244 | endef
|
|---|
| 245 | endif
|
|---|
| 246 |
|
|---|
| 247 |
|
|---|
| 248 | ## Link program
|
|---|
| 249 | # @param $(target) Normalized main target name.
|
|---|
| 250 | # @param $(out) Program name.
|
|---|
| 251 | # @param $(objs) Object files to link together.
|
|---|
| 252 | # @param $(libs) Libraries to search.
|
|---|
| 253 | # @param $(libpath) Library search paths.
|
|---|
| 254 | # @param $(flags) Flags.
|
|---|
| 255 | # @param $(dirdep) Directory creation dependency.
|
|---|
| 256 | # @param $(deps) Other dependencies.
|
|---|
| 257 | # @param $(othersrc) Unhandled sources.
|
|---|
| 258 | # @param $(custom_pre) Custom step invoked before linking.
|
|---|
| 259 | # @param $(custom_post) Custom step invoked after linking.
|
|---|
| 260 | # @param $(outbase) Output basename (full). Use this for list files and such.
|
|---|
| 261 | #
|
|---|
| 262 | TOOL_VCC80AMD64_LINK_PROGRAM_OUTPUT = $(outbase).map $(outbase).lib $(outbase).exp $(outbase).pdb $(outbase).ilk $(out).manifest
|
|---|
| 263 | TOOL_VCC80AMD64_LINK_PROGRAM_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc)
|
|---|
| 264 | TOOL_VCC80AMD64_LINK_PROGRAM_DEPORD =
|
|---|
| 265 | define TOOL_VCC80AMD64_LINK_PROGRAM_CMDS
|
|---|
| 266 | $(QUIET)$(TOOL_VCC80AMD64_LD) $(flags) \
|
|---|
| 267 | /OUT:$(out) \
|
|---|
| 268 | /MAPINFO:EXPORTS /INCREMENTAL:NO \
|
|---|
| 269 | /MAP:$(outbase).map \
|
|---|
| 270 | $(foreach def,$(filter %.def,$(othersrc)), /DEF:$(def)) \
|
|---|
| 271 | $(subst /,\\,$(filter %.exp %.res,$(othersrc))) \
|
|---|
| 272 | $(foreach p,$(libpath), /LIBPATH:$(p)) \
|
|---|
| 273 | $(subst /,\\,$(objs)) \
|
|---|
| 274 | $(subst /,\\,$(libs))
|
|---|
| 275 | $(QUIET)if test -f $(out).manifest; then \
|
|---|
| 276 | $(TOOL_VCC80AMD64_MT) -manifest $(subst /,\\,$(out)).manifest -outputresource:$(subst /,\\,$(out)); \
|
|---|
| 277 | fi
|
|---|
| 278 | endef
|
|---|
| 279 |
|
|---|
| 280 |
|
|---|
| 281 | ## Link DLL.
|
|---|
| 282 | # @param $(target) Normalized main target name.
|
|---|
| 283 | # @param $(out) DLL name.
|
|---|
| 284 | # @param $(objs) Object files to link together.
|
|---|
| 285 | # @param $(libs) Libraries to search.
|
|---|
| 286 | # @param $(libpath) Library search paths.
|
|---|
| 287 | # @param $(flags) Flags.
|
|---|
| 288 | # @param $(dirdep) Directory creation dependency.
|
|---|
| 289 | # @param $(deps) Other dependencies.
|
|---|
| 290 | # @param $(othersrc) Unhandled sources.
|
|---|
| 291 | # @param $(custom_pre) Custom step invoked before linking.
|
|---|
| 292 | # @param $(custom_post) Custom step invoked after linking.
|
|---|
| 293 | #
|
|---|
| 294 | # @param $(outbase) Output basename (full). Use this for list files and such.
|
|---|
| 295 | TOOL_VCC80AMD64_LINK_DLL_OUTPUT = $(outbase).map $(outbase).lib $(outbase).exp $(outbase).pdb $(outbase).ilk $(out).manifest
|
|---|
| 296 | TOOL_VCC80AMD64_LINK_DLL_DEPEND = $(objs) $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc)
|
|---|
| 297 | TOOL_VCC80AMD64_LINK_DLL_DEPORD = $(call DIRDEP,$(PATH_LIB))
|
|---|
| 298 | define TOOL_VCC80AMD64_LINK_DLL_CMDS
|
|---|
| 299 | $(QUIET)$(TOOL_VCC80AMD64_LD) $(flags) \
|
|---|
| 300 | /OUT:$(out) \
|
|---|
| 301 | /IMPLIB:$(outbase).lib \
|
|---|
| 302 | /MAPINFO:EXPORTS /INCREMENTAL:NO \
|
|---|
| 303 | /MAP:$(outbase).map \
|
|---|
| 304 | /DLL \
|
|---|
| 305 | $(foreach def,$(filter %.def,$(othersrc)), /DEF:$(def)) \
|
|---|
| 306 | $(subst /,\\,$(filter %.exp %.res,$(othersrc))) \
|
|---|
| 307 | $(foreach p,$(libpath), /LIBPATH:$(p)) \
|
|---|
| 308 | $(subst /,\\,$(objs)) \
|
|---|
| 309 | $(subst /,\\,$(libs))
|
|---|
| 310 | $(QUIET)if test -f $(out).manifest; then \
|
|---|
| 311 | $(TOOL_VCC80AMD64_MT) -manifest $(subst /,\\,$(out)).manifest "-outputresource:$(subst /,\\,$(out));#2"; \
|
|---|
| 312 | fi
|
|---|
| 313 | ifeq ($(filter %.exp .def,$(othersrc)),)
|
|---|
| 314 | $(QUIET)if test -f $(outbase).exp; then $(CP_EXT) $(outbase).exp $(PATH_LIB)/; fi
|
|---|
| 315 | $(QUIET)if test -f $(outbase).lib; then $(CP_EXT) $(outbase).lib $(PATH_LIB)/; fi
|
|---|
| 316 | endif
|
|---|
| 317 | $(eval _DIRS += $(PATH_LIB))
|
|---|
| 318 | endef
|
|---|
| 319 |
|
|---|
| 320 |
|
|---|
| 321 | ## Link system module (windows aka driver, linux aka kernel module)
|
|---|
| 322 | # @param $(target) Normalized main target name.
|
|---|
| 323 | # @param $(out) System module name.
|
|---|
| 324 | # @param $(objs) Object files to link together.
|
|---|
| 325 | # @param $(libs) Libraries to search.
|
|---|
| 326 | # @param $(libpath) Library search paths.
|
|---|
| 327 | # @param $(flags) Flags.
|
|---|
| 328 | # @param $(dirdep) Directory creation dependency.
|
|---|
| 329 | # @param $(deps) Other dependencies.
|
|---|
| 330 | # @param $(othersrc) Unhandled sources.
|
|---|
| 331 | # @param $(custom_pre) Custom step invoked before linking.
|
|---|
| 332 | # @param $(custom_post) Custom step invoked after linking.
|
|---|
| 333 | #
|
|---|
| 334 | # @param $(outbase) Output basename (full). Use this for list files and such.
|
|---|
| 335 | TOOL_VCC80AMD64_LINK_SYSMOD_OUTPUT = $(outbase).map $(outbase).lib $(outbase).exp $(outbase).pdb $(outbase).ilk $(out).manifest
|
|---|
| 336 | TOOL_VCC80AMD64_LINK_SYSMOD_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc)
|
|---|
| 337 | TOOL_VCC80AMD64_LINK_SYSMOD_DEPORD =
|
|---|
| 338 | define TOOL_VCC80AMD64_LINK_SYSMOD_CMDS
|
|---|
| 339 | $(QUIET)$(TOOL_VCC80AMD64_LD) $(flags) \
|
|---|
| 340 | /OUT:$(out) \
|
|---|
| 341 | /MAPINFO:EXPORTS /INCREMENTAL:NO \
|
|---|
| 342 | /MAP:$(outbase).map \
|
|---|
| 343 | $(foreach def,$(filter %.def,$(othersrc)), /DEF:$(def)) \
|
|---|
| 344 | $(subst /,\\,$(filter %.exp %.res,$(othersrc))) \
|
|---|
| 345 | $(foreach p,$(libpath), /LIBPATH:$(p)) \
|
|---|
| 346 | $(subst /,\\,$(objs)) \
|
|---|
| 347 | $(subst /,\\,$(libs))
|
|---|
| 348 | $(QUIET)if test -f $(out).manifest; then \
|
|---|
| 349 | $(TOOL_VCC80AMD64_MT) -manifest $(subst /,\\,$(out)).manifest "-outputresource:$(subst /,\\,$(out));#2"; \
|
|---|
| 350 | fi
|
|---|
| 351 | endef
|
|---|
| 352 |
|
|---|