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

Last change on this file since 2847 was 2847, checked in by bird, 9 years ago

VCC100AMD64.kmk: Added experimental kSubmit/kWorker support, enabled by TOOL_VCC100AMD64_USE_KSUBMIT=1.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 17.3 KB
Line 
1# $Id: VCC100AMD64.kmk 2847 2016-08-30 12:50:46Z 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)
77ifdef TOOL_VCC100AMD64_USE_KSUBMIT
78 ifeq ($(KBUILD_HOST).$(KBUILD_HOST_ARCH),win.amd64)
79 TOOL_VCC100AMD64_KSUBMIT ?= kmk_builtin_kSubmit --
80 endif
81endif
82
83# The following in duplicated in VCC100.kmk and VCC100X86.kmk.
84TOOL_VCC100_FN_FIND_SDK_TOOL_SUB = $(eval $3 := $(firstword \
85 $(if-expr defined(PATH_SDK_WINPSDK71_BIN), $(wildcard $(PATH_SDK_WINPSDK71_BIN)/$2)) \
86 $(if-expr defined(PATH_SDK_WINPSDK_BIN) , $(wildcard $(PATH_SDK_WINPSDK_BIN)/$2)) \
87 $(rsort $(wildcard $(KBUILD_DEVTOOLS_HST)/sdk/*/[Bb][Ii][Nn]/$2)) \
88 $(rsort $(wildcard $(KBUILD_DEVTOOLS_HST_ALT)/sdk/*/[Bb][Ii][Nn]/$2)) \
89 $1))
90TOOL_VCC100_FN_FIND_SDK_TOOL = $(if-expr !defined($3),$(TOOL_VCC100_FN_FIND_SDK_TOOL_SUB),)$($3)
91
92## Disabled fast DEP_IDB based dependencies.
93#VCC100AMD64_OLD_DEPS = 1
94
95## Constructs the correct .pdb name (the name is lowercased).
96# @param $(1) Base name, no extention.
97# @param $(2) The extension.
98TOOL_VCC100AMD64_PDB = $(dir $(1))$(tolower $(notdir $(1))).$(2)
99
100TOOL_VCC100AMD64_COBJSUFF ?= .obj
101TOOL_VCC100AMD64_CFLAGS ?= -TC -nologo
102TOOL_VCC100AMD64_CFLAGS.debug ?= -Zi
103TOOL_VCC100AMD64_CFLAGS.dbgopt ?= -O2 -Zi
104TOOL_VCC100AMD64_CFLAGS.release ?= -O2
105TOOL_VCC100AMD64_CFLAGS.profile ?= -O2
106TOOL_VCC100AMD64_CINCS ?= $(PATH_TOOL_VCC100AMD64_INC)
107TOOL_VCC100AMD64_CDEFS ?=
108
109TOOL_VCC100AMD64_CXXOBJSUFF ?= .obj
110TOOL_VCC100AMD64_CXXFLAGS ?= -TP -nologo
111TOOL_VCC100AMD64_CXXFLAGS.debug ?= -Zi
112TOOL_VCC100AMD64_CXXFLAGS.dbgopt ?= -O2 -Zi
113TOOL_VCC100AMD64_CXXFLAGS.release ?= -O2
114TOOL_VCC100AMD64_CXXFLAGS.profile ?= -O2
115TOOL_VCC100AMD64_CXXINCS ?= $(PATH_TOOL_VCC100AMD64_INC) $(PATH_TOOL_VCC100AMD64_ATLMFC_INC)
116TOOL_VCC100AMD64_CXXDEFS ?=
117
118TOOL_VCC100AMD64_ASOBJSUFF ?= .obj
119
120TOOL_VCC100AMD64_RCOBJSUFF ?= .res
121TOOL_VCC100AMD64_RCINCS ?= $(PATH_TOOL_VCC100AMD64_INC) $(PATH_TOOL_VCC100AMD64_ATLMFC_INC)
122
123TOOL_VCC100AMD64_ARFLAGS ?= -nologo -machine:amd64
124TOOL_VCC100AMD64_ARLIBSUFF ?= .lib
125
126TOOL_VCC100AMD64_LDFLAGS ?= -nologo -machine:amd64
127TOOL_VCC100AMD64_LDFLAGS.debug ?= -debug
128TOOL_VCC100AMD64_LDFLAGS.dbgopt ?= -debug
129TOOL_VCC100AMD64_LDFLAGS.profile ?= -debug
130TOOL_VCC100AMD64_LDFLAGS.release ?=
131
132
133
134## Compile C source.
135# @param $(target) Normalized main target name.
136# @param $(source) Source filename (relative).
137# @param $(obj) Object file name. This shall be (re)created by the compilation.
138# @param $(dep) Dependcy file. This shall be (re)created by the compilation.
139# @param $(flags) Flags.
140# @param $(defs) Definitions. No -D or something.
141# @param $(incs) Includes. No -I or something.
142# @param $(dirdep) Directory creation dependency.
143# @param $(deps) Other dependencies.
144#
145# @param $(outbase) Output basename (full). Use this for list files and such.
146# @param $(objsuff) Object suffix.
147TOOL_VCC100AMD64_COMPILE_C_DEPEND =
148TOOL_VCC100AMD64_COMPILE_C_DEPORD =
149ifdef KBUILD_USE_KOBJCACHE
150TOOL_VCC100AMD64_COMPILE_C_USES_KOBJCACHE = 1
151TOOL_VCC100AMD64_COMPILE_C_OUTPUT = $(outbase).i
152TOOL_VCC100AMD64_COMPILE_C_OUTPUT_MAYBE =
153define TOOL_VCC100AMD64_COMPILE_C_CMDS
154 $(QUIET)$(KOBJCACHE) -f $(outbase).koc -d $(PATH_OBJCACHE) -t $(bld_trg).$(bld_trg_arch) -O2 -r\
155 --make-dep-fix-case --make-dep-gen-stubs --make-dep-quiet --make-dep-file $(dep)\
156 --kObjCache-cpp $(outbase).i\
157 $(TOOL_VCC100AMD64_CC) -E\
158 $(subst -Zi,-Z7,$(flags))\
159 $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
160 $(subst /,\\,$(abspath $(source))) \
161 --kObjCache-cc $(obj)\
162 $(TOOL_VCC100AMD64_CC) -c\
163 $(subst -Zi,-Z7,$(flags))\
164 -Fo$(obj)\
165 $(outbase).i
166endef
167else # !KBUILD_USE_KOBJCACHE
168TOOL_VCC100AMD64_COMPILE_C_OUTPUT = $(call TOOL_VCC100AMD64_PDB, $(outbase)-obj,idb)
169TOOL_VCC100AMD64_COMPILE_C_OUTPUT_MAYBE = $(call TOOL_VCC100AMD64_PDB, $(outbase)-obj,pdb)
170define TOOL_VCC100AMD64_COMPILE_C_CMDS
171 $(QUIET)$(TOOL_VCC100AMD64_KSUBMIT) $(TOOL_VCC100AMD64_CC) -c\
172 $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
173 -Fd$(outbase)-obj.pdb \
174 -FD\
175 -Fo$(obj)\
176 $(subst /,\\,$(abspath $(source)))
177 $(QUIET)$(DEP_IDB) -f -s -q -o $(dep) -t $(obj) $(call TOOL_VCC100AMD64_PDB,$(outbase)-obj,idb)
178endef
179endif # !KBUILD_USE_KOBJCACHE
180
181
182## Compile C++ source.
183# @param $(target) Normalized main target name.
184# @param $(source) Source filename (relative).
185# @param $(obj) Object file name. This shall be (re)created by the compilation.
186# @param $(dep) Dependcy file. This shall be (re)created by the compilation.
187# @param $(flags) Flags.
188# @param $(defs) Definitions. No -D or something.
189# @param $(incs) Includes. No -I or something.
190# @param $(dirdep) Directory creation dependency.
191# @param $(deps) Other dependencies.
192#
193# @param $(outbase) Output basename (full). Use this for list files and such.
194# @param $(objsuff) Object suffix.
195TOOL_VCC100AMD64_COMPILE_CXX_DEPEND =
196TOOL_VCC100AMD64_COMPILE_CXX_DEPORD =
197ifdef KBUILD_USE_KOBJCACHE
198TOOL_VCC100AMD64_COMPILE_CXX_USES_KOBJCACHE = 1
199TOOL_VCC100AMD64_COMPILE_CXX_OUTPUT = $(outbase).ii
200TOOL_VCC100AMD64_COMPILE_CXX_OUTPUT_MAYBE =
201define TOOL_VCC100AMD64_COMPILE_CXX_CMDS
202 $(QUIET)$(KOBJCACHE) -f $(outbase).koc -d $(PATH_OBJCACHE) -t $(bld_trg).$(bld_trg_arch) -O2 -r\
203 --make-dep-fix-case --make-dep-gen-stubs --make-dep-quiet --make-dep-file $(dep)\
204 --kObjCache-cpp $(outbase).ii\
205 $(TOOL_VCC100AMD64_CXX) -E\
206 $(subst -Zi,-Z7,$(flags))\
207 $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
208 $(subst /,\\,$(abspath $(source))) \
209 --kObjCache-cc $(obj)\
210 $(TOOL_VCC100AMD64_CXX) -c\
211 $(subst -Zi,-Z7,$(flags))\
212 -Fo$(obj)\
213 $(outbase).ii
214endef
215else # !KBUILD_USE_KOBJCACHE
216TOOL_VCC100AMD64_COMPILE_CXX_OUTPUT = $(call TOOL_VCC100AMD64_PDB, $(outbase)-obj,idb)
217TOOL_VCC100AMD64_COMPILE_CXX_OUTPUT_MAYBE = $(call TOOL_VCC100AMD64_PDB, $(outbase)-obj,pdb)
218define TOOL_VCC100AMD64_COMPILE_CXX_CMDS
219 $(QUIET)$(TOOL_VCC100AMD64_KSUBMIT) $(TOOL_VCC100AMD64_CXX) -c\
220 $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
221 -Fd$(outbase)-obj.pdb \
222 -FD\
223 -Fo$(obj)\
224 $(subst /,\\,$(abspath $(source)))
225 $(QUIET)$(DEP_IDB) -f -s -q -o $(dep) -t $(obj) $(call TOOL_VCC100AMD64_PDB,$(outbase)-obj,idb)
226endef
227endif # !KBUILD_USE_KOBJCACHE
228
229## @todo configure the assembler template.
230
231## Compile resource source.
232# @param $(target) Normalized main target name.
233# @param $(source) Source filename (relative).
234# @param $(obj) Object file name. This shall be (re)created by the compilation.
235# @param $(dep) Dependcy file. This shall be (re)created by the compilation.
236# @param $(flags) Flags.
237# @param $(defs) Definitions. No -D or something.
238# @param $(incs) Includes. No -I or something.
239# @param $(dirdep) Directory creation dependency.
240# @param $(deps) Other dependencies.
241#
242# @param $(outbase) Output basename (full). Use this for list files and such.
243# @param $(objsuff) Object suffix.
244TOOL_VCC100AMD64_COMPILE_RC_DEPEND =
245TOOL_VCC100AMD64_COMPILE_RC_DEPORD =
246TOOL_VCC100AMD64_COMPILE_RC_OUTPUT =
247define TOOL_VCC100AMD64_COMPILE_RC_CMDS
248 $(QUIET)$(TOOL_VCC100AMD64_RC) \
249 $(flags) $(addprefix /i, $(subst /,\\,$(incs))) $(addprefix /d, $(defs))\
250 /fo$(obj)\
251 $(subst /,\\,$(abspath $(source)))
252endef
253
254
255## Link library
256# @param $(target) Normalized main target name.
257# @param $(out) Library name.
258# @param $(objs) Object files to put in the library.
259# @param $(flags) Flags.
260# @param $(dirdep) Directory creation dependency.
261# @param $(deps) Other dependencies.
262# @param $(othersrc) Unhandled sources.
263# @param $(outbase) Output basename (full). Use this for list files and such.
264#
265TOOL_VCC100AMD64_LINK_LIBRARY_DEPEND = $(othersrc)
266TOOL_VCC100AMD64_LINK_LIBRARY_DEPORD =
267TOOL_VCC100AMD64_LINK_LIBRARY_OUTPUT = $(outbase).rsp
268TOOL_VCC100AMD64_LINK_LIBRARY_OUTPUT_MAYBE = $(outbase).lst $(outbase).exp $(outbase).pdb
269define TOOL_VCC100AMD64_LINK_LIBRARY_CMDS
270 $(QUIET)$(APPEND) -tn $(outbase).rsp \
271 $(foreach arg,\
272 $(subst /,\\,$(objs) \
273 $(filter-out %.def,$(othersrc))) \
274 $(addprefix /DEF:,$(filter %.def,$(othersrc))) \
275 ,\"$(arg)\")
276 $(QUIET)$(TOOL_VCC100AMD64_AR) $(flags) /OUT:$(out) @$(outbase).rsp
277endef
278
279
280## Link program
281# @param $(target) Normalized main target name.
282# @param $(out) Program name.
283# @param $(objs) Object files to link together.
284# @param $(libs) Libraries to search.
285# @param $(libpath) Library search paths.
286# @param $(flags) Flags.
287# @param $(dirdep) Directory creation dependency.
288# @param $(deps) Other dependencies.
289# @param $(othersrc) Unhandled sources.
290# @param $(custom_pre) Custom step invoked before linking.
291# @param $(custom_post) Custom step invoked after linking.
292# @param $(outbase) Output basename (full). Use this for list files and such.
293#
294TOOL_VCC100AMD64_LINK_PROGRAM_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc)
295TOOL_VCC100AMD64_LINK_PROGRAM_DEPORD =
296TOOL_VCC100AMD64_LINK_PROGRAM_OUTPUT = $(outbase).map $(outbase).rsp
297TOOL_VCC100AMD64_LINK_PROGRAM_OUTPUT_MAYBE = $(outbase).lib $(outbase).exp $(outbase).ilk $(out).manifest
298TOOL_VCC100AMD64_LINK_PROGRAM_OUTPUT_DEBUG = $(outbase).pdb
299TOOL_VCC100AMD64_LINK_PROGRAM_DEBUG_INSTALL_FN = $(2).pdb=>$(basename $(3)).pdb
300define TOOL_VCC100AMD64_LINK_PROGRAM_CMDS
301 $(QUIET)$(APPEND) -tn $(outbase).rsp \
302 $(foreach arg,\
303 $(subst /,\\,$(objs)) \
304 $(subst /,\\,$(libs)) \
305 ,\"$(arg)\")
306 $(QUIET)$(TOOL_VCC100AMD64_LD) $(flags) \
307 /OUT:$(out) \
308 /MAPINFO:EXPORTS /INCREMENTAL:NO \
309 /MAP:$(outbase).map \
310 $(foreach def,$(filter %.def,$(othersrc)), /DEF:$(def)) \
311 $(subst /,\\,$(filter %.exp %.res,$(othersrc))) \
312 $(foreach p,$(libpath), /LIBPATH:$(p)) \
313 @$(outbase).rsp
314ifndef TOOL_VCC100AMD64_NO_AUTO_MANIFEST
315 $(QUIET)$(TEST) -f $(out).manifest -- \
316 $(TOOL_VCC100AMD64_MT) -manifest $(subst /,\\,$(out)).manifest -outputresource:$(subst /,\\,$(out))
317endif
318endef
319
320
321## Link DLL.
322# @param $(target) Normalized main target name.
323# @param $(out) DLL 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.
335TOOL_VCC100AMD64_LINK_DLL_DEPEND = $(objs) $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc)
336TOOL_VCC100AMD64_LINK_DLL_DEPORD = $(call DIRDEP,$(PATH_STAGE_LIB))
337TOOL_VCC100AMD64_LINK_DLL_OUTPUT = $(outbase).map $(outbase).lib $(outbase).exp $(outbase).rsp
338TOOL_VCC100AMD64_LINK_DLL_OUTPUT_MAYBE = $(outbase).ilk $(out).manifest $(PATH_STAGE_LIB)/$(notdir $(outbase)).exp
339TOOL_VCC100AMD64_LINK_DLL_OUTPUT_MAYBE_PRECIOUS = $(PATH_STAGE_LIB)/$(notdir $(outbase)).lib
340TOOL_VCC100AMD64_LINK_DLL_OUTPUT_DEBUG = $(outbase).pdb
341TOOL_VCC100AMD64_LINK_DLL_DEBUG_INSTALL_FN = $(2).pdb=>$(basename $(3)).pdb
342define TOOL_VCC100AMD64_LINK_DLL_CMDS
343 $(QUIET)$(APPEND) -tn $(outbase).rsp \
344 $(foreach arg,\
345 $(subst /,\\,$(objs)) \
346 $(subst /,\\,$(libs)) \
347 ,\"$(arg)\")
348 $(QUIET)$(TOOL_VCC100AMD64_LD) $(flags) \
349 /OUT:$(out) \
350 /IMPLIB:$(outbase).lib \
351 /MAPINFO:EXPORTS /INCREMENTAL:NO \
352 /MAP:$(outbase).map \
353 /DLL \
354 $(foreach def,$(filter %.def,$(othersrc)), /DEF:$(def)) \
355 $(subst /,\\,$(filter %.exp %.res,$(othersrc))) \
356 $(foreach p,$(libpath), /LIBPATH:$(p)) \
357 @$(outbase).rsp
358ifndef TOOL_VCC100AMD64_NO_AUTO_MANIFEST
359 $(QUIET)$(TEST) -f $(out).manifest -- \
360 $(TOOL_VCC100AMD64_MT) -manifest $(subst /,\\,$(out)).manifest '-outputresource:$(subst /,\\,$(out));#2'
361endif
362 $(QUIET)$(TEST) -f $(outbase).lib -- $(KLIBTWEAKER_EXT) --clear-timestamps $(outbase).lib
363 $(QUIET)$(CP) --changed -v --ignore-non-existing $(outbase).exp $(outbase).lib $(PATH_STAGE_LIB)/
364$(eval _DIRS += $(PATH_STAGE_LIB))
365endef
366
367
368## Link system module (windows aka driver, linux aka kernel module)
369# @param $(target) Normalized main target name.
370# @param $(out) System module name.
371# @param $(objs) Object files to link together.
372# @param $(libs) Libraries to search.
373# @param $(libpath) Library search paths.
374# @param $(flags) Flags.
375# @param $(dirdep) Directory creation dependency.
376# @param $(deps) Other dependencies.
377# @param $(othersrc) Unhandled sources.
378# @param $(custom_pre) Custom step invoked before linking.
379# @param $(custom_post) Custom step invoked after linking.
380#
381# @param $(outbase) Output basename (full). Use this for list files and such.
382TOOL_VCC100AMD64_LINK_SYSMOD_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc)
383TOOL_VCC100AMD64_LINK_SYSMOD_DEPORD =
384TOOL_VCC100AMD64_LINK_SYSMOD_OUTPUT = $(outbase).map $(outbase).rsp
385TOOL_VCC100AMD64_LINK_SYSMOD_OUTPUT_MAYBE = $(outbase).lib $(outbase).exp $(outbase).ilk $(out).manifest
386TOOL_VCC100AMD64_LINK_SYSMOD_OUTPUT_DEBUG = $(outbase).pdb
387TOOL_VCC100AMD64_LINK_SYSMOD_DEBUG_INSTALL_FN = $(2).pdb=>$(basename $(3)).pdb
388define TOOL_VCC100AMD64_LINK_SYSMOD_CMDS
389 $(QUIET)$(APPEND) -tn $(outbase).rsp \
390 $(foreach arg,\
391 $(subst /,\\,$(objs)) \
392 $(subst /,\\,$(libs)) \
393 ,\"$(arg)\")
394 $(QUIET)$(TOOL_VCC100AMD64_LD) $(flags) \
395 /OUT:$(out) \
396 /MAPINFO:EXPORTS /INCREMENTAL:NO \
397 /MAP:$(outbase).map \
398 $(foreach def,$(filter %.def,$(othersrc)), /DEF:$(def)) \
399 $(subst /,\\,$(filter %.exp %.res,$(othersrc))) \
400 $(foreach p,$(libpath), /LIBPATH:$(p)) \
401 @$(outbase).rsp
402ifndef TOOL_VCC100AMD64_NO_AUTO_MANIFEST
403 $(QUIET)$(TEST) -f $(out).manifest -- \
404 $(TOOL_VCC100AMD64_MT) -manifest $(subst /,\\,$(out)).manifest '-outputresource:$(subst /,\\,$(out));#2'
405endif
406endef
407
Note: See TracBrowser for help on using the repository browser.