source: trunk/kBuild/tools/VCC100AMD64.kmk@ 2803

Last change on this file since 2803 was 2795, checked in by bird, 10 years ago

footer-pass2-compiling-targets.kmk,VCC100*: Introducing linker output variable OUTPUT_MAYBE_PRECIOUS for files that shouldn't be unconditionally deleted prior to linking. This way it's possible to keep the PATH_STAGE_LIB copy of an import library and only update it when there are real changes to the exports of the DLL we're linking, thus avoiding a relinking cascade.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 17.1 KB
Line 
1# $Id: VCC100AMD64.kmk 2795 2015-09-15 23:35:37Z bird $
2## @file
3# kBuild Tool Config - Visual C++ 10.0 (aka Visual 2010 and MSC v16), targeting AMD64.
4#
5
6#
7# Copyright (c) 2004-2014 knut st. osmundsen <bird-kBuild-spam-xiv@anduin.net>
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# As a special exception you are granted permission to include this file, via
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.
29# This exception does not however invalidate any other reasons why the makefile,
30# program, whatever should not be covered the GPL.
31#
32#
33
34TOOL_VCC100AMD64 := Visual C++ 10.0 (aka Visual 2010 and MSC v16), targeting AMD64
35
36# Tool Specific Properties
37ifndef PATH_TOOL_VCC100AMD64
38 PATH_TOOL_VCC100AMD64 := $(wildcard $(KBUILD_DEVTOOLS)/win.x86/vcc/v10*)
39 ifeq ($(PATH_TOOL_VCC100AMD64),)
40 PATH_TOOL_VCC100AMD64 := $(PATH_TOOL_VCC100)
41 endif
42 ifeq ($(PATH_TOOL_VCC100AMD64),)
43 PATH_TOOL_VCC100AMD64 := $(PATH_TOOL_VCC100X86)
44 endif
45 ifeq ($(PATH_TOOL_VCC100AMD64),)
46 PATH_TOOL_VCC100AMD64 := $(wildcard $(KBUILD_DEVTOOLS)/win.x86/vcc/v10*)
47 endif
48 ifneq ($(PATH_TOOL_VCC100AMD64),)
49 PATH_TOOL_VCC100AMD64 := $(lastword $(sort $(PATH_TOOL_VCC100AMD64)))
50 else
51 $(warning kBuild: PATH_TOOL_VCC100AMD64 cannot be determined!)
52 PATH_TOOL_VCC100AMD64 := $(KBUILD_DEVTOOLS)/win.x86/vcc/v10
53 endif
54else
55 # Resolve any fancy stuff once and for all.
56 PATH_TOOL_VCC100AMD64 := $(PATH_TOOL_VCC100AMD64)
57endif
58ifeq ($(KBUILD_HOST).$(KBUILD_HOST_ARCH),win.amd64)
59PATH_TOOL_VCC100AMD64_BIN ?= $(PATH_TOOL_VCC100AMD64)/bin/amd64
60else
61PATH_TOOL_VCC100AMD64_BIN ?= $(PATH_TOOL_VCC100AMD64)/bin/x86_amd64
62endif
63PATH_TOOL_VCC100AMD64_LIB ?= $(PATH_TOOL_VCC100AMD64)/lib/amd64
64PATH_TOOL_VCC100AMD64_INC ?= $(PATH_TOOL_VCC100AMD64)/include
65PATH_TOOL_VCC100AMD64_ATLMFC ?= $(PATH_TOOL_VCC100AMD64)/atlmfc
66PATH_TOOL_VCC100AMD64_ATLMFC_INC ?= $(PATH_TOOL_VCC100AMD64_ATLMFC)/include
67PATH_TOOL_VCC100AMD64_ATLMFC_LIB ?= $(PATH_TOOL_VCC100AMD64_ATLMFC)/lib/amd64
68TOOL_VCC100AMD64_CC ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC100AMD64_BIN)/cl.exe
69TOOL_VCC100AMD64_CXX ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC100AMD64_BIN)/cl.exe
70TOOL_VCC100AMD64_AS ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC100AMD64_BIN)/ml64.exe
71TOOL_VCC100AMD64_AR ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC100AMD64_BIN)/lib.exe
72TOOL_VCC100AMD64_LD ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC100AMD64_BIN)/link.exe
73TOOL_VCC100AMD64_DUMPBIN ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC100AMD64_BIN)/dumpbin.exe
74TOOL_VCC100AMD64_EDITBIN ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC100AMD64_BIN)/editbin.exe
75TOOL_VCC100AMD64_RC ?= $(EXEC_X86_WIN32) $(call TOOL_VCC100_FN_FIND_SDK_TOOL,rc.exe,[Rr][Cc].[Ee][Xx][Ee],TOOL_VCC100_RC_CACHED)
76TOOL_VCC100AMD64_MT ?= $(EXEC_X86_WIN32) $(call TOOL_VCC100_FN_FIND_SDK_TOOL,mt.exe,[Mm][Tt].[Ee][Xx][Ee],TOOL_VCC100_MT_CACHED)
77
78# The following in duplicated in VCC100.kmk and VCC100X86.kmk.
79TOOL_VCC100_FN_FIND_SDK_TOOL_SUB = $(eval $3 := $(firstword \
80 $(if-expr defined(PATH_SDK_WINPSDK71_BIN), $(wildcard $(PATH_SDK_WINPSDK71_BIN)/$2)) \
81 $(if-expr defined(PATH_SDK_WINPSDK_BIN) , $(wildcard $(PATH_SDK_WINPSDK_BIN)/$2)) \
82 $(rsort $(wildcard $(KBUILD_DEVTOOLS_HST)/sdk/*/[Bb][Ii][Nn]/$2)) \
83 $(rsort $(wildcard $(KBUILD_DEVTOOLS_HST_ALT)/sdk/*/[Bb][Ii][Nn]/$2)) \
84 $1))
85TOOL_VCC100_FN_FIND_SDK_TOOL = $(if-expr !defined($3),$(TOOL_VCC100_FN_FIND_SDK_TOOL_SUB),)$($3)
86
87## Disabled fast DEP_IDB based dependencies.
88#VCC100AMD64_OLD_DEPS = 1
89
90## Constructs the correct .pdb name (the name is lowercased).
91# @param $(1) Base name, no extention.
92# @param $(2) The extension.
93TOOL_VCC100AMD64_PDB = $(dir $(1))$(tolower $(notdir $(1))).$(2)
94
95TOOL_VCC100AMD64_COBJSUFF ?= .obj
96TOOL_VCC100AMD64_CFLAGS ?= -TC -nologo
97TOOL_VCC100AMD64_CFLAGS.debug ?= -Zi
98TOOL_VCC100AMD64_CFLAGS.dbgopt ?= -O2 -Zi
99TOOL_VCC100AMD64_CFLAGS.release ?= -O2
100TOOL_VCC100AMD64_CFLAGS.profile ?= -O2
101TOOL_VCC100AMD64_CINCS ?= $(PATH_TOOL_VCC100AMD64_INC)
102TOOL_VCC100AMD64_CDEFS ?=
103
104TOOL_VCC100AMD64_CXXOBJSUFF ?= .obj
105TOOL_VCC100AMD64_CXXFLAGS ?= -TP -nologo
106TOOL_VCC100AMD64_CXXFLAGS.debug ?= -Zi
107TOOL_VCC100AMD64_CXXFLAGS.dbgopt ?= -O2 -Zi
108TOOL_VCC100AMD64_CXXFLAGS.release ?= -O2
109TOOL_VCC100AMD64_CXXFLAGS.profile ?= -O2
110TOOL_VCC100AMD64_CXXINCS ?= $(PATH_TOOL_VCC100AMD64_INC) $(PATH_TOOL_VCC100AMD64_ATLMFC_INC)
111TOOL_VCC100AMD64_CXXDEFS ?=
112
113TOOL_VCC100AMD64_ASOBJSUFF ?= .obj
114
115TOOL_VCC100AMD64_RCOBJSUFF ?= .res
116TOOL_VCC100AMD64_RCINCS ?= $(PATH_TOOL_VCC100AMD64_INC) $(PATH_TOOL_VCC100AMD64_ATLMFC_INC)
117
118TOOL_VCC100AMD64_ARFLAGS ?= -nologo -machine:amd64
119TOOL_VCC100AMD64_ARLIBSUFF ?= .lib
120
121TOOL_VCC100AMD64_LDFLAGS ?= -nologo -machine:amd64
122TOOL_VCC100AMD64_LDFLAGS.debug ?= -debug
123TOOL_VCC100AMD64_LDFLAGS.dbgopt ?= -debug
124TOOL_VCC100AMD64_LDFLAGS.profile ?= -debug
125TOOL_VCC100AMD64_LDFLAGS.release ?=
126
127
128
129## Compile C source.
130# @param $(target) Normalized main target name.
131# @param $(source) Source filename (relative).
132# @param $(obj) Object file name. This shall be (re)created by the compilation.
133# @param $(dep) Dependcy file. This shall be (re)created by the compilation.
134# @param $(flags) Flags.
135# @param $(defs) Definitions. No -D or something.
136# @param $(incs) Includes. No -I or something.
137# @param $(dirdep) Directory creation dependency.
138# @param $(deps) Other dependencies.
139#
140# @param $(outbase) Output basename (full). Use this for list files and such.
141# @param $(objsuff) Object suffix.
142TOOL_VCC100AMD64_COMPILE_C_DEPEND =
143TOOL_VCC100AMD64_COMPILE_C_DEPORD =
144ifdef KBUILD_USE_KOBJCACHE
145TOOL_VCC100AMD64_COMPILE_C_USES_KOBJCACHE = 1
146TOOL_VCC100AMD64_COMPILE_C_OUTPUT = $(outbase).i
147TOOL_VCC100AMD64_COMPILE_C_OUTPUT_MAYBE =
148define TOOL_VCC100AMD64_COMPILE_C_CMDS
149 $(QUIET)$(KOBJCACHE) -f $(outbase).koc -d $(PATH_OBJCACHE) -t $(bld_trg).$(bld_trg_arch) -O2 -r\
150 --make-dep-fix-case --make-dep-gen-stubs --make-dep-quiet --make-dep-file $(dep)\
151 --kObjCache-cpp $(outbase).i\
152 $(TOOL_VCC100AMD64_CC) -E\
153 $(subst -Zi,-Z7,$(flags))\
154 $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
155 $(subst /,\\,$(abspath $(source))) \
156 --kObjCache-cc $(obj)\
157 $(TOOL_VCC100AMD64_CC) -c\
158 $(subst -Zi,-Z7,$(flags))\
159 -Fo$(obj)\
160 $(outbase).i
161endef
162else # !KBUILD_USE_KOBJCACHE
163TOOL_VCC100AMD64_COMPILE_C_OUTPUT = $(call TOOL_VCC100AMD64_PDB, $(outbase)-obj,idb)
164TOOL_VCC100AMD64_COMPILE_C_OUTPUT_MAYBE = $(call TOOL_VCC100AMD64_PDB, $(outbase)-obj,pdb)
165define TOOL_VCC100AMD64_COMPILE_C_CMDS
166 $(QUIET)$(TOOL_VCC100AMD64_CC) -c\
167 $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
168 -Fd$(outbase)-obj.pdb \
169 -FD\
170 -Fo$(obj)\
171 $(subst /,\\,$(abspath $(source)))
172 $(QUIET)$(DEP_IDB) -f -s -q -o $(dep) -t $(obj) $(call TOOL_VCC100AMD64_PDB,$(outbase)-obj,idb)
173endef
174endif # !KBUILD_USE_KOBJCACHE
175
176
177## Compile C++ source.
178# @param $(target) Normalized main target name.
179# @param $(source) Source filename (relative).
180# @param $(obj) Object file name. This shall be (re)created by the compilation.
181# @param $(dep) Dependcy file. This shall be (re)created by the compilation.
182# @param $(flags) Flags.
183# @param $(defs) Definitions. No -D or something.
184# @param $(incs) Includes. No -I or something.
185# @param $(dirdep) Directory creation dependency.
186# @param $(deps) Other dependencies.
187#
188# @param $(outbase) Output basename (full). Use this for list files and such.
189# @param $(objsuff) Object suffix.
190TOOL_VCC100AMD64_COMPILE_CXX_DEPEND =
191TOOL_VCC100AMD64_COMPILE_CXX_DEPORD =
192ifdef KBUILD_USE_KOBJCACHE
193TOOL_VCC100AMD64_COMPILE_CXX_USES_KOBJCACHE = 1
194TOOL_VCC100AMD64_COMPILE_CXX_OUTPUT = $(outbase).ii
195TOOL_VCC100AMD64_COMPILE_CXX_OUTPUT_MAYBE =
196define TOOL_VCC100AMD64_COMPILE_CXX_CMDS
197 $(QUIET)$(KOBJCACHE) -f $(outbase).koc -d $(PATH_OBJCACHE) -t $(bld_trg).$(bld_trg_arch) -O2 -r\
198 --make-dep-fix-case --make-dep-gen-stubs --make-dep-quiet --make-dep-file $(dep)\
199 --kObjCache-cpp $(outbase).ii\
200 $(TOOL_VCC100AMD64_CXX) -E\
201 $(subst -Zi,-Z7,$(flags))\
202 $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
203 $(subst /,\\,$(abspath $(source))) \
204 --kObjCache-cc $(obj)\
205 $(TOOL_VCC100AMD64_CXX) -c\
206 $(subst -Zi,-Z7,$(flags))\
207 -Fo$(obj)\
208 $(outbase).ii
209endef
210else # !KBUILD_USE_KOBJCACHE
211TOOL_VCC100AMD64_COMPILE_CXX_OUTPUT = $(call TOOL_VCC100AMD64_PDB, $(outbase)-obj,idb)
212TOOL_VCC100AMD64_COMPILE_CXX_OUTPUT_MAYBE = $(call TOOL_VCC100AMD64_PDB, $(outbase)-obj,pdb)
213define TOOL_VCC100AMD64_COMPILE_CXX_CMDS
214 $(QUIET)$(TOOL_VCC100AMD64_CXX) -c\
215 $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
216 -Fd$(outbase)-obj.pdb \
217 -FD\
218 -Fo$(obj)\
219 $(subst /,\\,$(abspath $(source)))
220 $(QUIET)$(DEP_IDB) -f -s -q -o $(dep) -t $(obj) $(call TOOL_VCC100AMD64_PDB,$(outbase)-obj,idb)
221endef
222endif # !KBUILD_USE_KOBJCACHE
223
224## @todo configure the assembler template.
225
226## Compile resource source.
227# @param $(target) Normalized main target name.
228# @param $(source) Source filename (relative).
229# @param $(obj) Object file name. This shall be (re)created by the compilation.
230# @param $(dep) Dependcy file. This shall be (re)created by the compilation.
231# @param $(flags) Flags.
232# @param $(defs) Definitions. No -D or something.
233# @param $(incs) Includes. No -I or something.
234# @param $(dirdep) Directory creation dependency.
235# @param $(deps) Other dependencies.
236#
237# @param $(outbase) Output basename (full). Use this for list files and such.
238# @param $(objsuff) Object suffix.
239TOOL_VCC100AMD64_COMPILE_RC_DEPEND =
240TOOL_VCC100AMD64_COMPILE_RC_DEPORD =
241TOOL_VCC100AMD64_COMPILE_RC_OUTPUT =
242define TOOL_VCC100AMD64_COMPILE_RC_CMDS
243 $(QUIET)$(TOOL_VCC100AMD64_RC) \
244 $(flags) $(addprefix /i, $(subst /,\\,$(incs))) $(addprefix /d, $(defs))\
245 /fo$(obj)\
246 $(subst /,\\,$(abspath $(source)))
247endef
248
249
250## Link library
251# @param $(target) Normalized main target name.
252# @param $(out) Library name.
253# @param $(objs) Object files to put in the library.
254# @param $(flags) Flags.
255# @param $(dirdep) Directory creation dependency.
256# @param $(deps) Other dependencies.
257# @param $(othersrc) Unhandled sources.
258# @param $(outbase) Output basename (full). Use this for list files and such.
259#
260TOOL_VCC100AMD64_LINK_LIBRARY_DEPEND = $(othersrc)
261TOOL_VCC100AMD64_LINK_LIBRARY_DEPORD =
262TOOL_VCC100AMD64_LINK_LIBRARY_OUTPUT = $(outbase).rsp
263TOOL_VCC100AMD64_LINK_LIBRARY_OUTPUT_MAYBE = $(outbase).lst $(outbase).exp $(outbase).pdb
264define TOOL_VCC100AMD64_LINK_LIBRARY_CMDS
265 $(QUIET)$(APPEND) -tn $(outbase).rsp \
266 $(foreach arg,\
267 $(subst /,\\,$(objs) \
268 $(filter-out %.def,$(othersrc))) \
269 $(addprefix /DEF:,$(filter %.def,$(othersrc))) \
270 ,\"$(arg)\")
271 $(QUIET)$(TOOL_VCC100AMD64_AR) $(flags) /OUT:$(out) @$(outbase).rsp
272endef
273
274
275## Link program
276# @param $(target) Normalized main target name.
277# @param $(out) Program 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# @param $(outbase) Output basename (full). Use this for list files and such.
288#
289TOOL_VCC100AMD64_LINK_PROGRAM_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc)
290TOOL_VCC100AMD64_LINK_PROGRAM_DEPORD =
291TOOL_VCC100AMD64_LINK_PROGRAM_OUTPUT = $(outbase).map $(outbase).rsp
292TOOL_VCC100AMD64_LINK_PROGRAM_OUTPUT_MAYBE = $(outbase).lib $(outbase).exp $(outbase).ilk $(out).manifest
293TOOL_VCC100AMD64_LINK_PROGRAM_OUTPUT_DEBUG = $(outbase).pdb
294TOOL_VCC100AMD64_LINK_PROGRAM_DEBUG_INSTALL_FN = $(2).pdb=>$(basename $(3)).pdb
295define TOOL_VCC100AMD64_LINK_PROGRAM_CMDS
296 $(QUIET)$(APPEND) -tn $(outbase).rsp \
297 $(foreach arg,\
298 $(subst /,\\,$(objs)) \
299 $(subst /,\\,$(libs)) \
300 ,\"$(arg)\")
301 $(QUIET)$(TOOL_VCC100AMD64_LD) $(flags) \
302 /OUT:$(out) \
303 /MAPINFO:EXPORTS /INCREMENTAL:NO \
304 /MAP:$(outbase).map \
305 $(foreach def,$(filter %.def,$(othersrc)), /DEF:$(def)) \
306 $(subst /,\\,$(filter %.exp %.res,$(othersrc))) \
307 $(foreach p,$(libpath), /LIBPATH:$(p)) \
308 @$(outbase).rsp
309ifndef TOOL_VCC100AMD64_NO_AUTO_MANIFEST
310 $(QUIET)$(TEST) -f $(out).manifest -- \
311 $(TOOL_VCC100AMD64_MT) -manifest $(subst /,\\,$(out)).manifest -outputresource:$(subst /,\\,$(out))
312endif
313endef
314
315
316## Link DLL.
317# @param $(target) Normalized main target name.
318# @param $(out) DLL name.
319# @param $(objs) Object files to link together.
320# @param $(libs) Libraries to search.
321# @param $(libpath) Library search paths.
322# @param $(flags) Flags.
323# @param $(dirdep) Directory creation dependency.
324# @param $(deps) Other dependencies.
325# @param $(othersrc) Unhandled sources.
326# @param $(custom_pre) Custom step invoked before linking.
327# @param $(custom_post) Custom step invoked after linking.
328#
329# @param $(outbase) Output basename (full). Use this for list files and such.
330TOOL_VCC100AMD64_LINK_DLL_DEPEND = $(objs) $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc)
331TOOL_VCC100AMD64_LINK_DLL_DEPORD = $(call DIRDEP,$(PATH_STAGE_LIB))
332TOOL_VCC100AMD64_LINK_DLL_OUTPUT = $(outbase).map $(outbase).lib $(outbase).exp $(outbase).rsp
333TOOL_VCC100AMD64_LINK_DLL_OUTPUT_MAYBE = $(outbase).ilk $(out).manifest $(PATH_STAGE_LIB)/$(notdir $(outbase)).exp
334TOOL_VCC100AMD64_LINK_DLL_OUTPUT_MAYBE_PRECIOUS = $(PATH_STAGE_LIB)/$(notdir $(outbase)).lib
335TOOL_VCC100AMD64_LINK_DLL_OUTPUT_DEBUG = $(outbase).pdb
336TOOL_VCC100AMD64_LINK_DLL_DEBUG_INSTALL_FN = $(2).pdb=>$(basename $(3)).pdb
337define TOOL_VCC100AMD64_LINK_DLL_CMDS
338 $(QUIET)$(APPEND) -tn $(outbase).rsp \
339 $(foreach arg,\
340 $(subst /,\\,$(objs)) \
341 $(subst /,\\,$(libs)) \
342 ,\"$(arg)\")
343 $(QUIET)$(TOOL_VCC100AMD64_LD) $(flags) \
344 /OUT:$(out) \
345 /IMPLIB:$(outbase).lib \
346 /MAPINFO:EXPORTS /INCREMENTAL:NO \
347 /MAP:$(outbase).map \
348 /DLL \
349 $(foreach def,$(filter %.def,$(othersrc)), /DEF:$(def)) \
350 $(subst /,\\,$(filter %.exp %.res,$(othersrc))) \
351 $(foreach p,$(libpath), /LIBPATH:$(p)) \
352 @$(outbase).rsp
353ifndef TOOL_VCC100AMD64_NO_AUTO_MANIFEST
354 $(QUIET)$(TEST) -f $(out).manifest -- \
355 $(TOOL_VCC100AMD64_MT) -manifest $(subst /,\\,$(out)).manifest '-outputresource:$(subst /,\\,$(out));#2'
356endif
357 $(QUIET)$(TEST) -f $(outbase).lib -- $(KLIBTWEAKER_EXT) --clear-timestamps $(outbase).lib
358 $(QUIET)$(CP) --changed -v --ignore-non-existing $(outbase).exp $(outbase).lib $(PATH_STAGE_LIB)/
359$(eval _DIRS += $(PATH_STAGE_LIB))
360endef
361
362
363## Link system module (windows aka driver, linux aka kernel module)
364# @param $(target) Normalized main target name.
365# @param $(out) System module name.
366# @param $(objs) Object files to link together.
367# @param $(libs) Libraries to search.
368# @param $(libpath) Library search paths.
369# @param $(flags) Flags.
370# @param $(dirdep) Directory creation dependency.
371# @param $(deps) Other dependencies.
372# @param $(othersrc) Unhandled sources.
373# @param $(custom_pre) Custom step invoked before linking.
374# @param $(custom_post) Custom step invoked after linking.
375#
376# @param $(outbase) Output basename (full). Use this for list files and such.
377TOOL_VCC100AMD64_LINK_SYSMOD_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc)
378TOOL_VCC100AMD64_LINK_SYSMOD_DEPORD =
379TOOL_VCC100AMD64_LINK_SYSMOD_OUTPUT = $(outbase).map $(outbase).rsp
380TOOL_VCC100AMD64_LINK_SYSMOD_OUTPUT_MAYBE = $(outbase).lib $(outbase).exp $(outbase).ilk $(out).manifest
381TOOL_VCC100AMD64_LINK_SYSMOD_OUTPUT_DEBUG = $(outbase).pdb
382TOOL_VCC100AMD64_LINK_SYSMOD_DEBUG_INSTALL_FN = $(2).pdb=>$(basename $(3)).pdb
383define TOOL_VCC100AMD64_LINK_SYSMOD_CMDS
384 $(QUIET)$(APPEND) -tn $(outbase).rsp \
385 $(foreach arg,\
386 $(subst /,\\,$(objs)) \
387 $(subst /,\\,$(libs)) \
388 ,\"$(arg)\")
389 $(QUIET)$(TOOL_VCC100AMD64_LD) $(flags) \
390 /OUT:$(out) \
391 /MAPINFO:EXPORTS /INCREMENTAL:NO \
392 /MAP:$(outbase).map \
393 $(foreach def,$(filter %.def,$(othersrc)), /DEF:$(def)) \
394 $(subst /,\\,$(filter %.exp %.res,$(othersrc))) \
395 $(foreach p,$(libpath), /LIBPATH:$(p)) \
396 @$(outbase).rsp
397ifndef TOOL_VCC100AMD64_NO_AUTO_MANIFEST
398 $(QUIET)$(TEST) -f $(out).manifest -- \
399 $(TOOL_VCC100AMD64_MT) -manifest $(subst /,\\,$(out)).manifest '-outputresource:$(subst /,\\,$(out));#2'
400endif
401endef
402
Note: See TracBrowser for help on using the repository browser.