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

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

updates

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