| 1 | # $Id: VCC80AMD64.kmk 1690 2008-08-31 14:29:01Z bird $ | 
|---|
| 2 | ## @file | 
|---|
| 3 | # kBuild Tool Config - Visual C++ 8.0 (aka Visual .NET 2005, or MSC v14), targeting AMD64. | 
|---|
| 4 | # | 
|---|
| 5 |  | 
|---|
| 6 | # | 
|---|
| 7 | # Copyright (c) 2004-2008 knut st. osmundsen <bird-kBuild-spam@anduin.net> | 
|---|
| 8 | # | 
|---|
| 9 | # | 
|---|
| 10 | # This file is part of kBuild. | 
|---|
| 11 | # | 
|---|
| 12 | # kBuild is free software; you can redistribute it and/or modify | 
|---|
| 13 | # it under the terms of the GNU General Public License as published by | 
|---|
| 14 | # the Free Software Foundation; either version 2 of the License, or | 
|---|
| 15 | # (at your option) any later version. | 
|---|
| 16 | # | 
|---|
| 17 | # kBuild is distributed in the hope that it will be useful, | 
|---|
| 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 
|---|
| 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | 
|---|
| 20 | # GNU General Public License for more details. | 
|---|
| 21 | # | 
|---|
| 22 | # You should have received a copy of the GNU General Public License | 
|---|
| 23 | # along with kBuild; if not, write to the Free Software | 
|---|
| 24 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA | 
|---|
| 25 | # | 
|---|
| 26 | # | 
|---|
| 27 | # As a special exception you are granted permission to include this file, via | 
|---|
| 28 | # the kmk include directive, as you wish without this in itself causing the | 
|---|
| 29 | # resulting makefile, program or whatever to be covered by the GPL license. | 
|---|
| 30 | # This exception does not however invalidate any other reasons why the makefile, | 
|---|
| 31 | # program, whatever should not be covered the GPL. | 
|---|
| 32 | # | 
|---|
| 33 | # | 
|---|
| 34 |  | 
|---|
| 35 | TOOL_VCC80AMD64 := Visual C++ 8.0 (aka Visual .NET 2005, or MSC v14), targeting AMD64. | 
|---|
| 36 |  | 
|---|
| 37 | # Tool Specific Properties | 
|---|
| 38 | ifndef PATH_TOOL_VCC80AMD64 | 
|---|
| 39 | PATH_TOOL_VCC80AMD64 := $(wildcard $(PATH_DEVTOOLS)/win.x86/vcc/v8*) | 
|---|
| 40 | ifeq ($(PATH_TOOL_VCC80AMD64),) | 
|---|
| 41 | PATH_TOOL_VCC80AMD64 := $(PATH_TOOL_VCC80) | 
|---|
| 42 | endif | 
|---|
| 43 | ifeq ($(PATH_TOOL_VCC80AMD64),) | 
|---|
| 44 | PATH_TOOL_VCC80AMD64 := $(PATH_TOOL_VCC80X86) | 
|---|
| 45 | endif | 
|---|
| 46 | ifeq ($(PATH_TOOL_VCC80AMD64),) | 
|---|
| 47 | PATH_TOOL_VCC80AMD64 := $(wildcard $(PATH_DEVTOOLS)/win.x86/vcc/v8*) | 
|---|
| 48 | endif | 
|---|
| 49 | ifneq ($(PATH_TOOL_VCC80AMD64),) | 
|---|
| 50 | PATH_TOOL_VCC80AMD64 := $(lastword $(sort $(PATH_TOOL_VCC80AMD64))) | 
|---|
| 51 | else | 
|---|
| 52 | $(warning kBuild: PATH_TOOL_VCC80AMD64 cannot be determined!) | 
|---|
| 53 | PATH_TOOL_VCC80AMD64 := $(PATH_DEVTOOLS)/win.x86/vcc/v8 | 
|---|
| 54 | endif | 
|---|
| 55 | else | 
|---|
| 56 | # Resolve any fancy stuff once and for all. | 
|---|
| 57 | PATH_TOOL_VCC80AMD64 := $(PATH_TOOL_VCC80AMD64) | 
|---|
| 58 | endif | 
|---|
| 59 | ifeq ($(KBUILD_HOST).$(KBUILD_HOST_ARCH),win.amd64) | 
|---|
| 60 | PATH_TOOL_VCC80AMD64_BIN ?= $(PATH_TOOL_VCC80AMD64)/bin/amd64 | 
|---|
| 61 | else | 
|---|
| 62 | PATH_TOOL_VCC80AMD64_BIN ?= $(PATH_TOOL_VCC80AMD64)/bin/x86_amd64 | 
|---|
| 63 | endif | 
|---|
| 64 | PATH_TOOL_VCC80AMD64_LIB ?= $(PATH_TOOL_VCC80AMD64)/lib/amd64 | 
|---|
| 65 | PATH_TOOL_VCC80AMD64_INC ?= $(PATH_TOOL_VCC80AMD64)/include | 
|---|
| 66 | PATH_TOOL_VCC80AMD64_ATLMFC ?= $(PATH_TOOL_VCC80AMD64)/atlmfc | 
|---|
| 67 | PATH_TOOL_VCC80AMD64_ATLMFC_INC ?= $(PATH_TOOL_VCC80AMD64_ATLMFC)/include | 
|---|
| 68 | PATH_TOOL_VCC80AMD64_ATLMFC_LIB ?= $(PATH_TOOL_VCC80AMD64_ATLMFC)/lib/amd64 | 
|---|
| 69 | TOOL_VCC80AMD64_CC  ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC80AMD64_BIN)/cl.exe | 
|---|
| 70 | TOOL_VCC80AMD64_CXX ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC80AMD64_BIN)/cl.exe | 
|---|
| 71 | TOOL_VCC80AMD64_AS  ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC80AMD64_BIN)/ml64.exe | 
|---|
| 72 | TOOL_VCC80AMD64_RC  ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC80AMD64_BIN)/../rc.exe | 
|---|
| 73 | TOOL_VCC80AMD64_AR  ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC80AMD64_BIN)/lib.exe | 
|---|
| 74 | TOOL_VCC80AMD64_LD  ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC80AMD64_BIN)/link.exe | 
|---|
| 75 | TOOL_VCC80AMD64_MT  ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC80AMD64_BIN)/../mt.exe | 
|---|
| 76 | ## Disabled fast DEP_IDB based dependencies. | 
|---|
| 77 | #VCC80AMD64_OLD_DEPS = 1 | 
|---|
| 78 |  | 
|---|
| 79 | ## Constructs the correct .pdb name (the name is lowercased). | 
|---|
| 80 | # @param    $(1)        Base name, no extention. | 
|---|
| 81 | # @param    $(2)        The extension. | 
|---|
| 82 | TOOL_VCC80AMD64_PDB = $(dir $(1))$(tolower $(notdir $(1))).$(2) | 
|---|
| 83 |  | 
|---|
| 84 | TOOL_VCC80AMD64_COBJSUFF         ?= .obj | 
|---|
| 85 | TOOL_VCC80AMD64_CFLAGS           ?= -TC -c -nologo | 
|---|
| 86 | TOOL_VCC80AMD64_CFLAGS.debug     ?= -Od -Zi | 
|---|
| 87 | TOOL_VCC80AMD64_CFLAGS.release   ?= -O2 | 
|---|
| 88 | TOOL_VCC80AMD64_CFLAGS.profile   ?= -O2 | 
|---|
| 89 | TOOL_VCC80AMD64_CINCS            ?= $(PATH_TOOL_VCC80AMD64_INC) | 
|---|
| 90 | TOOL_VCC80AMD64_CDEFS            ?= | 
|---|
| 91 |  | 
|---|
| 92 | TOOL_VCC80AMD64_CXXOBJSUFF       ?= .obj | 
|---|
| 93 | TOOL_VCC80AMD64_CXXFLAGS         ?= -TP -c -nologo | 
|---|
| 94 | TOOL_VCC80AMD64_CXXFLAGS.debug   ?= -Od -Zi | 
|---|
| 95 | TOOL_VCC80AMD64_CXXFLAGS.release ?= -O2 | 
|---|
| 96 | TOOL_VCC80AMD64_CXXFLAGS.profile ?= -O2 | 
|---|
| 97 | TOOL_VCC80AMD64_CXXINCS          ?= $(PATH_TOOL_VCC80AMD64_INC) $(PATH_TOOL_VCC80AMD64_ATLMFC_INC) | 
|---|
| 98 | TOOL_VCC80AMD64_CXXDEFS          ?= | 
|---|
| 99 |  | 
|---|
| 100 | TOOL_VCC80AMD64_ASOBJSUFF        ?= .obj | 
|---|
| 101 |  | 
|---|
| 102 | TOOL_VCC80AMD64_RCOBJSUFF        ?= .res | 
|---|
| 103 | TOOL_VCC80AMD64_RCINCS           ?= $(PATH_TOOL_VCC80AMD64_INC) $(PATH_TOOL_VCC80AMD64_ATLMFC_INC) | 
|---|
| 104 |  | 
|---|
| 105 | TOOL_VCC80AMD64_ARFLAGS          ?= -nologo -machine:amd64 | 
|---|
| 106 | TOOL_VCC80AMD64_ARLIBSUFF        ?= .lib | 
|---|
| 107 |  | 
|---|
| 108 | TOOL_VCC80AMD64_LDFLAGS          ?= -nologo -machine:amd64 | 
|---|
| 109 | TOOL_VCC80AMD64_LDFLAGS.debug    ?= -debug | 
|---|
| 110 | TOOL_VCC80AMD64_LDFLAGS.release  ?= | 
|---|
| 111 |  | 
|---|
| 112 |  | 
|---|
| 113 |  | 
|---|
| 114 | ## Compile C source. | 
|---|
| 115 | # @param    $(target)   Normalized main target name. | 
|---|
| 116 | # @param    $(source)   Source filename (relative). | 
|---|
| 117 | # @param    $(obj)      Object file name. This shall be (re)created by the compilation. | 
|---|
| 118 | # @param    $(dep)      Dependcy file. This shall be (re)created by the compilation. | 
|---|
| 119 | # @param    $(flags)    Flags. | 
|---|
| 120 | # @param    $(defs)     Definitions. No -D or something. | 
|---|
| 121 | # @param    $(incs)     Includes. No -I or something. | 
|---|
| 122 | # @param    $(dirdep)   Directory creation dependency. | 
|---|
| 123 | # @param    $(deps)     Other dependencies. | 
|---|
| 124 | # | 
|---|
| 125 | # @param    $(outbase)  Output basename (full). Use this for list files and such. | 
|---|
| 126 | # @param    $(objsuff)  Object suffix. | 
|---|
| 127 | TOOL_VCC80AMD64_COMPILE_C_DEPEND = | 
|---|
| 128 | TOOL_VCC80AMD64_COMPILE_C_DEPORD = | 
|---|
| 129 | TOOL_VCC80AMD64_COMPILE_C_OUTPUT = $(call TOOL_VCC80AMD64_PDB, $(outbase)-obj,idb) | 
|---|
| 130 | TOOL_VCC80AMD64_COMPILE_C_OUTPUT_MAYBE = $(call TOOL_VCC80AMD64_PDB, $(outbase)-obj,pdb) | 
|---|
| 131 | define TOOL_VCC80AMD64_COMPILE_C_CMDS | 
|---|
| 132 | $(QUIET)$(TOOL_VCC80AMD64_CC) -c\ | 
|---|
| 133 | $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\ | 
|---|
| 134 | -Fd$(outbase)-obj.pdb \ | 
|---|
| 135 | -FD\ | 
|---|
| 136 | -Fo$(obj)\ | 
|---|
| 137 | $(subst /,\\,$(abspath $(source))) | 
|---|
| 138 | $(QUIET)$(DEP_IDB) -f -s -o $(dep) -t $(obj) $(call TOOL_VCC80AMD64_PDB,$(outbase)-obj,idb) | 
|---|
| 139 | endef | 
|---|
| 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. | 
|---|
| 155 | TOOL_VCC80AMD64_COMPILE_CXX_DEPEND = | 
|---|
| 156 | TOOL_VCC80AMD64_COMPILE_CXX_DEPORD = | 
|---|
| 157 | TOOL_VCC80AMD64_COMPILE_CXX_OUTPUT = $(call TOOL_VCC80AMD64_PDB, $(outbase)-obj,idb) | 
|---|
| 158 | TOOL_VCC80AMD64_COMPILE_CXX_OUTPUT_MAYBE = $(call TOOL_VCC80AMD64_PDB, $(outbase)-obj,pdb) | 
|---|
| 159 | define TOOL_VCC80AMD64_COMPILE_CXX_CMDS | 
|---|
| 160 | $(QUIET)$(TOOL_VCC80AMD64_CXX) -c\ | 
|---|
| 161 | $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\ | 
|---|
| 162 | -Fd$(outbase)-obj.pdb \ | 
|---|
| 163 | -FD\ | 
|---|
| 164 | -Fo$(obj)\ | 
|---|
| 165 | $(subst /,\\,$(abspath $(source))) | 
|---|
| 166 | $(QUIET)$(DEP_IDB) -f -s -o $(dep) -t $(obj) $(call TOOL_VCC80AMD64_PDB,$(outbase)-obj,idb) | 
|---|
| 167 | endef | 
|---|
| 168 |  | 
|---|
| 169 |  | 
|---|
| 170 | ## Compile resource source. | 
|---|
| 171 | # @param    $(target)   Normalized main target name. | 
|---|
| 172 | # @param    $(source)   Source filename (relative). | 
|---|
| 173 | # @param    $(obj)      Object file name. This shall be (re)created by the compilation. | 
|---|
| 174 | # @param    $(dep)      Dependcy file. This shall be (re)created by the compilation. | 
|---|
| 175 | # @param    $(flags)    Flags. | 
|---|
| 176 | # @param    $(defs)     Definitions. No -D or something. | 
|---|
| 177 | # @param    $(incs)     Includes. No -I or something. | 
|---|
| 178 | # @param    $(dirdep)   Directory creation dependency. | 
|---|
| 179 | # @param    $(deps)     Other dependencies. | 
|---|
| 180 | # | 
|---|
| 181 | # @param    $(outbase)  Output basename (full). Use this for list files and such. | 
|---|
| 182 | # @param    $(objsuff)  Object suffix. | 
|---|
| 183 | TOOL_VCC80AMD64_COMPILE_RC_DEPEND = | 
|---|
| 184 | TOOL_VCC80AMD64_COMPILE_RC_DEPORD = | 
|---|
| 185 | TOOL_VCC80AMD64_COMPILE_RC_OUTPUT = | 
|---|
| 186 | define TOOL_VCC80AMD64_COMPILE_RC_CMDS | 
|---|
| 187 | $(QUIET)$(TOOL_VCC80AMD64_RC) \ | 
|---|
| 188 | $(flags) $(addprefix /i, $(subst /,\\,$(incs))) $(addprefix /d, $(defs))\ | 
|---|
| 189 | /fo$(obj)\ | 
|---|
| 190 | $(subst /,\\,$(abspath $(source))) | 
|---|
| 191 | endef | 
|---|
| 192 |  | 
|---|
| 193 |  | 
|---|
| 194 | ## Link library | 
|---|
| 195 | # @param    $(target)   Normalized main target name. | 
|---|
| 196 | # @param    $(out)      Library name. | 
|---|
| 197 | # @param    $(objs)     Object files to put in the library. | 
|---|
| 198 | # @param    $(flags)    Flags. | 
|---|
| 199 | # @param    $(dirdep)   Directory creation dependency. | 
|---|
| 200 | # @param    $(deps)     Other dependencies. | 
|---|
| 201 | # @param    $(othersrc) Unhandled sources. | 
|---|
| 202 | # @param    $(outbase)  Output basename (full). Use this for list files and such. | 
|---|
| 203 | # | 
|---|
| 204 | TOOL_VCC80AMD64_LINK_LIBRARY_DEPEND = $(othersrc) | 
|---|
| 205 | TOOL_VCC80AMD64_LINK_LIBRARY_DEPORD = | 
|---|
| 206 | TOOL_VCC80AMD64_LINK_LIBRARY_OUTPUT = $(outbase).rsp | 
|---|
| 207 | TOOL_VCC80AMD64_LINK_LIBRARY_OUTPUT_MAYBE = $(outbase).lst $(outbase).exp $(outbase).pdb | 
|---|
| 208 | define TOOL_VCC80AMD64_LINK_LIBRARY_CMDS | 
|---|
| 209 | $(QUIET)$(APPEND) -n $(outbase).rsp \ | 
|---|
| 210 | $(foreach arg,\ | 
|---|
| 211 | $(subst /,\\,$(objs) \ | 
|---|
| 212 | $(filter-out %.def,$(othersrc))) \ | 
|---|
| 213 | $(addprefix /DEF:,$(filter %.def,$(othersrc))) \ | 
|---|
| 214 | ,\"$(arg)\") | 
|---|
| 215 | $(QUIET)$(TOOL_VCC80AMD64_AR) $(flags) /OUT:$(out) @$(outbase).rsp | 
|---|
| 216 | endef | 
|---|
| 217 |  | 
|---|
| 218 |  | 
|---|
| 219 | ## Link program | 
|---|
| 220 | # @param    $(target)       Normalized main target name. | 
|---|
| 221 | # @param    $(out)          Program name. | 
|---|
| 222 | # @param    $(objs)         Object files to link together. | 
|---|
| 223 | # @param    $(libs)         Libraries to search. | 
|---|
| 224 | # @param    $(libpath)      Library search paths. | 
|---|
| 225 | # @param    $(flags)        Flags. | 
|---|
| 226 | # @param    $(dirdep)       Directory creation dependency. | 
|---|
| 227 | # @param    $(deps)         Other dependencies. | 
|---|
| 228 | # @param    $(othersrc)     Unhandled sources. | 
|---|
| 229 | # @param    $(custom_pre)   Custom step invoked before linking. | 
|---|
| 230 | # @param    $(custom_post)  Custom step invoked after linking. | 
|---|
| 231 | # @param    $(outbase)      Output basename (full). Use this for list files and such. | 
|---|
| 232 | # | 
|---|
| 233 | TOOL_VCC80AMD64_LINK_PROGRAM_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc) | 
|---|
| 234 | TOOL_VCC80AMD64_LINK_PROGRAM_DEPORD = | 
|---|
| 235 | TOOL_VCC80AMD64_LINK_PROGRAM_OUTPUT = $(outbase).map | 
|---|
| 236 | TOOL_VCC80AMD64_LINK_PROGRAM_OUTPUT_MAYBE = $(outbase).lib $(outbase).exp $(outbase).pdb $(outbase).ilk $(out).manifest | 
|---|
| 237 | define TOOL_VCC80AMD64_LINK_PROGRAM_CMDS | 
|---|
| 238 | $(QUIET)$(TOOL_VCC80AMD64_LD) $(flags) \ | 
|---|
| 239 | /OUT:$(out) \ | 
|---|
| 240 | /MAPINFO:EXPORTS /INCREMENTAL:NO \ | 
|---|
| 241 | /MAP:$(outbase).map \ | 
|---|
| 242 | $(foreach def,$(filter %.def,$(othersrc)), /DEF:$(def)) \ | 
|---|
| 243 | $(subst /,\\,$(filter %.exp %.res,$(othersrc))) \ | 
|---|
| 244 | $(foreach p,$(libpath), /LIBPATH:$(p)) \ | 
|---|
| 245 | $(subst /,\\,$(objs)) \ | 
|---|
| 246 | $(subst /,\\,$(libs)) | 
|---|
| 247 | $(QUIET)$(TEST) -f $(out).manifest -- \ | 
|---|
| 248 | $(TOOL_VCC80AMD64_MT) -manifest $(subst /,\\,$(out)).manifest -outputresource:$(subst /,\\,$(out)) | 
|---|
| 249 | endef | 
|---|
| 250 |  | 
|---|
| 251 |  | 
|---|
| 252 | ## Link DLL. | 
|---|
| 253 | # @param    $(target)   Normalized main target name. | 
|---|
| 254 | # @param    $(out)      DLL name. | 
|---|
| 255 | # @param    $(objs)     Object files to link together. | 
|---|
| 256 | # @param    $(libs)     Libraries to search. | 
|---|
| 257 | # @param    $(libpath)  Library search paths. | 
|---|
| 258 | # @param    $(flags)    Flags. | 
|---|
| 259 | # @param    $(dirdep)   Directory creation dependency. | 
|---|
| 260 | # @param    $(deps)     Other dependencies. | 
|---|
| 261 | # @param    $(othersrc)     Unhandled sources. | 
|---|
| 262 | # @param    $(custom_pre)   Custom step invoked before linking. | 
|---|
| 263 | # @param    $(custom_post)  Custom step invoked after linking. | 
|---|
| 264 | # | 
|---|
| 265 | # @param    $(outbase)  Output basename (full). Use this for list files and such. | 
|---|
| 266 | TOOL_VCC80AMD64_LINK_DLL_DEPEND = $(objs) $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc) | 
|---|
| 267 | TOOL_VCC80AMD64_LINK_DLL_DEPORD = $(call DIRDEP,$(PATH_LIB)) | 
|---|
| 268 | TOOL_VCC80AMD64_LINK_DLL_OUTPUT = $(outbase).map $(outbase).lib $(outbase).exp | 
|---|
| 269 | TOOL_VCC80AMD64_LINK_DLL_OUTPUT_MAYBE = $(outbase).pdb $(outbase).ilk $(out).manifest $(PATH_LIB)/$(notdir $(outbase)).lib $(PATH_LIB)/$(notdir $(outbase)).exp | 
|---|
| 270 | define TOOL_VCC80AMD64_LINK_DLL_CMDS | 
|---|
| 271 | $(QUIET)$(TOOL_VCC80AMD64_LD) $(flags) \ | 
|---|
| 272 | /OUT:$(out) \ | 
|---|
| 273 | /IMPLIB:$(outbase).lib \ | 
|---|
| 274 | /MAPINFO:EXPORTS /INCREMENTAL:NO \ | 
|---|
| 275 | /MAP:$(outbase).map \ | 
|---|
| 276 | /DLL \ | 
|---|
| 277 | $(foreach def,$(filter %.def,$(othersrc)), /DEF:$(def)) \ | 
|---|
| 278 | $(subst /,\\,$(filter %.exp %.res,$(othersrc))) \ | 
|---|
| 279 | $(foreach p,$(libpath), /LIBPATH:$(p)) \ | 
|---|
| 280 | $(subst /,\\,$(objs)) \ | 
|---|
| 281 | $(subst /,\\,$(libs)) | 
|---|
| 282 | $(QUIET)$(TEST) -f $(out).manifest -- \ | 
|---|
| 283 | $(TOOL_VCC80AMD64_MT) -manifest $(subst /,\\,$(out)).manifest '-outputresource:$(subst /,\\,$(out));#2' | 
|---|
| 284 | $(QUIET)$(CP) --changed --ignore-non-existing $(outbase).exp $(outbase).lib $(PATH_LIB)/ | 
|---|
| 285 | $(eval _DIRS += $(PATH_LIB)) | 
|---|
| 286 | endef | 
|---|
| 287 |  | 
|---|
| 288 |  | 
|---|
| 289 | ## Link system module (windows aka driver, linux aka kernel module) | 
|---|
| 290 | # @param    $(target)       Normalized main target name. | 
|---|
| 291 | # @param    $(out)          System module name. | 
|---|
| 292 | # @param    $(objs)         Object files to link together. | 
|---|
| 293 | # @param    $(libs)         Libraries to search. | 
|---|
| 294 | # @param    $(libpath)      Library search paths. | 
|---|
| 295 | # @param    $(flags)        Flags. | 
|---|
| 296 | # @param    $(dirdep)       Directory creation dependency. | 
|---|
| 297 | # @param    $(deps)         Other dependencies. | 
|---|
| 298 | # @param    $(othersrc)     Unhandled sources. | 
|---|
| 299 | # @param    $(custom_pre)   Custom step invoked before linking. | 
|---|
| 300 | # @param    $(custom_post)  Custom step invoked after linking. | 
|---|
| 301 | # | 
|---|
| 302 | # @param    $(outbase)  Output basename (full). Use this for list files and such. | 
|---|
| 303 | TOOL_VCC80AMD64_LINK_SYSMOD_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc) | 
|---|
| 304 | TOOL_VCC80AMD64_LINK_SYSMOD_DEPORD = | 
|---|
| 305 | TOOL_VCC80AMD64_LINK_SYSMOD_OUTPUT = $(outbase).map | 
|---|
| 306 | TOOL_VCC80AMD64_LINK_SYSMOD_OUTPUT_MAYBE = $(outbase).lib $(outbase).exp $(outbase).pdb $(outbase).ilk $(out).manifest | 
|---|
| 307 | define TOOL_VCC80AMD64_LINK_SYSMOD_CMDS | 
|---|
| 308 | $(QUIET)$(TOOL_VCC80AMD64_LD) $(flags) \ | 
|---|
| 309 | /OUT:$(out) \ | 
|---|
| 310 | /MAPINFO:EXPORTS /INCREMENTAL:NO \ | 
|---|
| 311 | /MAP:$(outbase).map \ | 
|---|
| 312 | $(foreach def,$(filter %.def,$(othersrc)), /DEF:$(def)) \ | 
|---|
| 313 | $(subst /,\\,$(filter %.exp %.res,$(othersrc))) \ | 
|---|
| 314 | $(foreach p,$(libpath), /LIBPATH:$(p)) \ | 
|---|
| 315 | $(subst /,\\,$(objs)) \ | 
|---|
| 316 | $(subst /,\\,$(libs)) | 
|---|
| 317 | $(QUIET)$(TEST) -f $(out).manifest -- \ | 
|---|
| 318 | $(TOOL_VCC80AMD64_MT) -manifest $(subst /,\\,$(out)).manifest '-outputresource:$(subst /,\\,$(out));#2' | 
|---|
| 319 | endef | 
|---|
| 320 |  | 
|---|