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

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

VCC100AMD64.kmk: kSubmit causes trouble when cross compiling 64-bit on a 32-bit host, so just don't do that for the time being. Some PDB mixup.

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