[819] | 1 | # $Id: VCC80.kmk 3303 2020-01-14 15:09:44Z bird $
|
---|
| 2 | ## @file
|
---|
[1504] | 3 | # kBuild Tool Config - Visual C++ 8.0 (aka Visual .NET 2005, or MSC v14), targeting $(KBUILD_TARGET).
|
---|
[819] | 4 | #
|
---|
[1547] | 5 |
|
---|
| 6 | #
|
---|
[3121] | 7 | # Copyright (c) 2004-2017 knut st. osmundsen <bird-kBuild-spam-xviiv@anduin.net>
|
---|
[819] | 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 | #
|
---|
[1547] | 26 | # As a special exception you are granted permission to include this file, via
|
---|
[2018] | 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.
|
---|
[1547] | 29 | # This exception does not however invalidate any other reasons why the makefile,
|
---|
| 30 | # program, whatever should not be covered the GPL.
|
---|
| 31 | #
|
---|
| 32 | #
|
---|
[819] | 33 |
|
---|
[1504] | 34 | TOOL_VCC80 := Visual C++ 8.0 (aka Visual .NET 2005, or MSC v14), targeting $(KBUILD_TARGET).
|
---|
[819] | 35 |
|
---|
| 36 | # Tool Specific Properties
|
---|
| 37 | ifndef PATH_TOOL_VCC80
|
---|
[2726] | 38 | PATH_TOOL_VCC80 := $(wildcard $(KBUILD_DEVTOOLS_TRG)/vcc/v8*)
|
---|
[819] | 39 | ifeq ($(PATH_TOOL_VCC80),)
|
---|
[2726] | 40 | PATH_TOOL_VCC80 := $(wildcard $(KBUILD_DEVTOOLS)/win.x86/vcc/v8*)
|
---|
[819] | 41 | endif
|
---|
[857] | 42 | ifeq ($(PATH_TOOL_VCC80),)
|
---|
[2726] | 43 | PATH_TOOL_VCC80 := $(wildcard $(KBUILD_DEVTOOLS)/x86.win32/vcc/v8*)
|
---|
[857] | 44 | endif
|
---|
| 45 | ifeq ($(PATH_TOOL_VCC80),)
|
---|
[2726] | 46 | PATH_TOOL_VCC80 := $(wildcard $(KBUILD_DEVTOOLS)/win.amd64/vcc/v8*)
|
---|
[857] | 47 | endif
|
---|
| 48 | ifeq ($(PATH_TOOL_VCC80),)
|
---|
| 49 | PATH_TOOL_VCC80 := $(lastword $(sort $(PATH_TOOL_VCC80)))
|
---|
| 50 | endif
|
---|
[819] | 51 | # if not found, we'll enter 'pathless' mode.
|
---|
| 52 | else
|
---|
| 53 | # Resolve any fancy stuff once and for all.
|
---|
| 54 | PATH_TOOL_VCC80 := $(PATH_TOOL_VCC80)
|
---|
| 55 | endif
|
---|
| 56 | ifneq ($(PATH_TOOL_VCC80),)
|
---|
[1504] | 57 | ifeq ($(KBUILD_HOST).$(KBUILD_HOST_ARCH),win.amd64)
|
---|
[819] | 58 | PATH_TOOL_VCC80_BIN.amd64 ?= $(PATH_TOOL_VCC80)/bin/amd64
|
---|
| 59 | else
|
---|
| 60 | PATH_TOOL_VCC80_BIN.amd64 ?= $(PATH_TOOL_VCC80)/bin/x86_amd64
|
---|
| 61 | endif
|
---|
| 62 | PATH_TOOL_VCC80_BIN.x86 ?= $(PATH_TOOL_VCC80)/bin
|
---|
[2402] | 63 | PATH_TOOL_VCC80_BIN ?= $(PATH_TOOL_VCC80_BIN.$(KBUILD_TARGET_ARCH))
|
---|
[819] | 64 | PATH_TOOL_VCC80_LIB.amd64 ?= $(PATH_TOOL_VCC80)/lib/amd64
|
---|
| 65 | PATH_TOOL_VCC80_LIB.x86 ?= $(PATH_TOOL_VCC80)/lib
|
---|
[2402] | 66 | PATH_TOOL_VCC80_LIB ?= $(PATH_TOOL_VCC80_LIB.$(KBUILD_TARGET_ARCH))
|
---|
[819] | 67 | PATH_TOOL_VCC80_INC ?= $(PATH_TOOL_VCC80)/include
|
---|
| 68 | PATH_TOOL_VCC80_ATLMFC ?= $(PATH_TOOL_VCC80X86)/atlmfc
|
---|
| 69 | PATH_TOOL_VCC80_ATLMFC_INC ?= $(PATH_TOOL_VCC80_ATLMFC)/include
|
---|
| 70 | PATH_TOOL_VCC80_ATLMFC_LIB.amd64 ?= $(PATH_TOOL_VCC80_ATLMFC)/lib
|
---|
| 71 | PATH_TOOL_VCC80_ATLMFC_LIB.x86 ?= $(PATH_TOOL_VCC80_ATLMFC)/lib/amd64
|
---|
[2402] | 72 | PATH_TOOL_VCC80_ATLMFC_LIB ?= $(PATH_TOOL_VCC80_ATLMFC_LIB.$(KBUILD_TARGET_ARCH))
|
---|
[819] | 73 | TOOL_VCC80_CC ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC80_BIN)/cl.exe
|
---|
| 74 | TOOL_VCC80_CXX ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC80_BIN)/cl.exe
|
---|
| 75 | TOOL_VCC80_AS ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC80_BIN)/ml64.exe
|
---|
| 76 | TOOL_VCC80_RC ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC80_BIN.x86)/rc.exe
|
---|
| 77 | TOOL_VCC80_AR ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC80_BIN)/lib.exe
|
---|
| 78 | TOOL_VCC80_LD ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC80_BIN)/link.exe
|
---|
| 79 | TOOL_VCC80_MT ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC80_BIN.x86)/mt.exe
|
---|
| 80 | else
|
---|
| 81 | # Pathless, relies on the environment.
|
---|
| 82 | TOOL_VCC80_CC ?= $(EXEC_X86_WIN32) cl.exe
|
---|
| 83 | TOOL_VCC80_CXX ?= $(EXEC_X86_WIN32) cl.exe
|
---|
| 84 | TOOL_VCC80_AS ?= $(EXEC_X86_WIN32) ml64.exe
|
---|
| 85 | TOOL_VCC80_RC ?= $(EXEC_X86_WIN32) rc.exe
|
---|
| 86 | TOOL_VCC80_AR ?= $(EXEC_X86_WIN32) lib.exe
|
---|
| 87 | TOOL_VCC80_LD ?= $(EXEC_X86_WIN32) link.exe
|
---|
| 88 | TOOL_VCC80_MT ?= $(EXEC_X86_WIN32) mt.exe
|
---|
| 89 | endif
|
---|
| 90 | ## Disabled fast DEP_IDB based dependencies.
|
---|
| 91 | #VCC80_OLD_DEPS = 1
|
---|
| 92 |
|
---|
| 93 | ## Constructs the correct .pdb name (the name is lowercased).
|
---|
| 94 | # @param $(1) Base name, no extention.
|
---|
| 95 | # @param $(2) The extension.
|
---|
| 96 | TOOL_VCC80_PDB = $(dir $(1))$(tolower $(notdir $(1))).$(2)
|
---|
| 97 |
|
---|
| 98 | TOOL_VCC80_COBJSUFF ?= .obj
|
---|
| 99 | TOOL_VCC80_CFLAGS ?= -TC -c -nologo
|
---|
| 100 | TOOL_VCC80_CFLAGS.debug ?= -Od -Zi
|
---|
| 101 | TOOL_VCC80_CFLAGS.release ?= -O2
|
---|
| 102 | TOOL_VCC80_CFLAGS.profile ?= -O2
|
---|
| 103 | TOOL_VCC80_CINCS ?= $(PATH_TOOL_VCC80_INC)
|
---|
| 104 | TOOL_VCC80_CDEFS ?=
|
---|
| 105 |
|
---|
| 106 | TOOL_VCC80_CXXOBJSUFF ?= .obj
|
---|
| 107 | TOOL_VCC80_CXXFLAGS ?= -TP -c -nologo
|
---|
| 108 | TOOL_VCC80_CXXFLAGS.debug ?= -Od -Zi
|
---|
| 109 | TOOL_VCC80_CXXFLAGS.release ?= -O2
|
---|
| 110 | TOOL_VCC80_CXXFLAGS.profile ?= -O2
|
---|
| 111 | TOOL_VCC80_CXXINCS ?= $(PATH_TOOL_VCC80_INC) $(PATH_TOOL_VCC80_ATLMFC_INC)
|
---|
| 112 | TOOL_VCC80_CXXDEFS ?=
|
---|
| 113 |
|
---|
| 114 | TOOL_VCC80_ASOBJSUFF ?= .obj
|
---|
| 115 |
|
---|
| 116 | TOOL_VCC80_RCOBJSUFF ?= .res
|
---|
| 117 | TOOL_VCC80_RCINCS ?= $(PATH_TOOL_VCC80_INC) $(PATH_TOOL_VCC80_ATLMFC_INC)
|
---|
| 118 |
|
---|
| 119 | TOOL_VCC80_ARFLAGS.amd64 ?= -machine:amd64
|
---|
| 120 | TOOL_VCC80_ARFLAGS.x86 ?= -machine:x86
|
---|
| 121 | TOOL_VCC80_ARFLAGS ?= -nologo
|
---|
| 122 | TOOL_VCC80_ARLIBSUFF ?= .lib
|
---|
| 123 |
|
---|
| 124 | TOOL_VCC80_LDFLAGS.amd64 ?= -machine:amd64
|
---|
| 125 | TOOL_VCC80_LDFLAGS.x86 ?= -machine:x86
|
---|
| 126 | TOOL_VCC80_LDFLAGS ?= -nologo
|
---|
| 127 | TOOL_VCC80_LDFLAGS.debug ?= -debug
|
---|
| 128 | TOOL_VCC80_LDFLAGS.release ?=
|
---|
| 129 | TOOL_VCC80_LIBPATH.amd64 ?= $(PATH_TOOL_VCC80_LIB.amd64) $(PATH_TOOL_VCC80_ATLMFC_LIB.amd64)
|
---|
| 130 | TOOL_VCC80_LIBPATH.x86 ?= $(PATH_TOOL_VCC80_LIB.x86) $(PATH_TOOL_VCC80_ATLMFC_LIB.x86)
|
---|
| 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.
|
---|
| 147 | TOOL_VCC80_COMPILE_C_DEPEND =
|
---|
| 148 | TOOL_VCC80_COMPILE_C_DEPORD =
|
---|
[1129] | 149 | TOOL_VCC80_COMPILE_C_OUTPUT = $(call TOOL_VCC80_PDB, $(outbase)-obj,idb)
|
---|
| 150 | TOOL_VCC80_COMPILE_C_OUTPUT_MAYBE = $(call TOOL_VCC80_PDB, $(outbase)-obj,pdb)
|
---|
[819] | 151 | define TOOL_VCC80_COMPILE_C_CMDS
|
---|
| 152 | $(QUIET)$(TOOL_VCC80_CC) -c\
|
---|
| 153 | $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
|
---|
| 154 | -Fd$(outbase)-obj.pdb \
|
---|
| 155 | -FD\
|
---|
| 156 | -Fo$(obj)\
|
---|
| 157 | $(subst /,\\,$(abspath $(source)))
|
---|
[2237] | 158 | $(QUIET)$(DEP_IDB) -f -s -q -o $(dep) -t $(obj) $(call TOOL_VCC80_PDB,$(outbase)-obj,idb)
|
---|
[819] | 159 | endef
|
---|
| 160 |
|
---|
| 161 |
|
---|
| 162 | ## Compile C++ source.
|
---|
| 163 | # @param $(target) Normalized main target name.
|
---|
| 164 | # @param $(source) Source filename (relative).
|
---|
| 165 | # @param $(obj) Object file name. This shall be (re)created by the compilation.
|
---|
| 166 | # @param $(dep) Dependcy file. This shall be (re)created by the compilation.
|
---|
| 167 | # @param $(flags) Flags.
|
---|
| 168 | # @param $(defs) Definitions. No -D or something.
|
---|
| 169 | # @param $(incs) Includes. No -I or something.
|
---|
| 170 | # @param $(dirdep) Directory creation dependency.
|
---|
| 171 | # @param $(deps) Other dependencies.
|
---|
| 172 | #
|
---|
| 173 | # @param $(outbase) Output basename (full). Use this for list files and such.
|
---|
| 174 | # @param $(objsuff) Object suffix.
|
---|
| 175 | TOOL_VCC80_COMPILE_CXX_DEPEND =
|
---|
| 176 | TOOL_VCC80_COMPILE_CXX_DEPORD =
|
---|
[1129] | 177 | TOOL_VCC80_COMPILE_CXX_OUTPUT = $(call TOOL_VCC80_PDB, $(outbase)-obj,idb)
|
---|
| 178 | TOOL_VCC80_COMPILE_CXX_OUTPUT_MAYBE = $(call TOOL_VCC80_PDB, $(outbase)-obj,pdb)
|
---|
[819] | 179 | define TOOL_VCC80_COMPILE_CXX_CMDS
|
---|
| 180 | $(QUIET)$(TOOL_VCC80_CXX) -c\
|
---|
| 181 | $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
|
---|
| 182 | -Fd$(outbase)-obj.pdb \
|
---|
| 183 | -FD\
|
---|
| 184 | -Fo$(obj)\
|
---|
| 185 | $(subst /,\\,$(abspath $(source)))
|
---|
[2237] | 186 | $(QUIET)$(DEP_IDB) -f -s -q -o $(dep) -t $(obj) $(call TOOL_VCC80_PDB,$(outbase)-obj,idb)
|
---|
[819] | 187 | endef
|
---|
| 188 |
|
---|
| 189 |
|
---|
| 190 | ## Compile resource source.
|
---|
| 191 | # @param $(target) Normalized main target name.
|
---|
| 192 | # @param $(source) Source filename (relative).
|
---|
| 193 | # @param $(obj) Object file name. This shall be (re)created by the compilation.
|
---|
| 194 | # @param $(dep) Dependcy file. This shall be (re)created by the compilation.
|
---|
| 195 | # @param $(flags) Flags.
|
---|
| 196 | # @param $(defs) Definitions. No -D or something.
|
---|
| 197 | # @param $(incs) Includes. No -I or something.
|
---|
| 198 | # @param $(dirdep) Directory creation dependency.
|
---|
| 199 | # @param $(deps) Other dependencies.
|
---|
| 200 | #
|
---|
| 201 | # @param $(outbase) Output basename (full). Use this for list files and such.
|
---|
| 202 | # @param $(objsuff) Object suffix.
|
---|
| 203 | TOOL_VCC80_COMPILE_RC_OUTPUT =
|
---|
| 204 | TOOL_VCC80_COMPILE_RC_DEPEND =
|
---|
| 205 | TOOL_VCC80_COMPILE_RC_DEPORD =
|
---|
| 206 | define TOOL_VCC80_COMPILE_RC_CMDS
|
---|
| 207 | $(QUIET)$(TOOL_VCC80_RC) \
|
---|
| 208 | $(flags) $(addprefix /i, $(subst /,\\,$(incs))) $(addprefix /d, $(defs))\
|
---|
| 209 | /fo$(obj)\
|
---|
| 210 | $(subst /,\\,$(abspath $(source)))
|
---|
| 211 | endef
|
---|
| 212 |
|
---|
| 213 |
|
---|
| 214 | ## Link library
|
---|
| 215 | # @param $(target) Normalized main target name.
|
---|
| 216 | # @param $(out) Library name.
|
---|
| 217 | # @param $(objs) Object files to put in the library.
|
---|
| 218 | # @param $(flags) Flags.
|
---|
| 219 | # @param $(dirdep) Directory creation dependency.
|
---|
| 220 | # @param $(deps) Other dependencies.
|
---|
| 221 | # @param $(othersrc) Unhandled sources.
|
---|
| 222 | # @param $(outbase) Output basename (full). Use this for list files and such.
|
---|
| 223 | #
|
---|
| 224 | TOOL_VCC80_LINK_LIBRARY_DEPEND = $(othersrc)
|
---|
| 225 | TOOL_VCC80_LINK_LIBRARY_DEPORD =
|
---|
[1031] | 226 | TOOL_VCC80_LINK_LIBRARY_OUTPUT = $(outbase).rsp
|
---|
| 227 | TOOL_VCC80_LINK_LIBRARY_OUTPUT_MAYBE = $(outbase).lst $(outbase).exp $(outbase).pdb
|
---|
[819] | 228 | define TOOL_VCC80_LINK_LIBRARY_CMDS
|
---|
[2557] | 229 | $(QUIET)$(APPEND) -tn $(outbase).rsp \
|
---|
[819] | 230 | $(foreach arg,\
|
---|
| 231 | $(subst /,\\,$(objs) \
|
---|
| 232 | $(filter-out %.def,$(othersrc))) \
|
---|
| 233 | $(addprefix /DEF:,$(filter %.def,$(othersrc))) \
|
---|
| 234 | ,\"$(arg)\")
|
---|
| 235 | $(QUIET)$(TOOL_VCC80_AR) $(flags) /OUT:$(out) @$(outbase).rsp
|
---|
| 236 | endef
|
---|
| 237 |
|
---|
| 238 |
|
---|
| 239 |
|
---|
| 240 |
|
---|
| 241 | ## Link program
|
---|
| 242 | # @param $(target) Normalized main target name.
|
---|
| 243 | # @param $(out) Program name.
|
---|
| 244 | # @param $(objs) Object files to link together.
|
---|
| 245 | # @param $(libs) Libraries to search.
|
---|
| 246 | # @param $(libpath) Library search paths.
|
---|
| 247 | # @param $(flags) Flags.
|
---|
| 248 | # @param $(dirdep) Directory creation dependency.
|
---|
| 249 | # @param $(deps) Other dependencies.
|
---|
| 250 | # @param $(othersrc) Unhandled sources.
|
---|
| 251 | # @param $(custom_pre) Custom step invoked before linking.
|
---|
| 252 | # @param $(custom_post) Custom step invoked after linking.
|
---|
| 253 | # @param $(outbase) Output basename (full). Use this for list files and such.
|
---|
| 254 | #
|
---|
| 255 | TOOL_VCC80_LINK_PROGRAM_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc)
|
---|
| 256 | TOOL_VCC80_LINK_PROGRAM_DEPORD =
|
---|
[3303] | 257 | TOOL_VCC80_LINK_PROGRAM_OUTPUT_MAYBE = $(outbase).lib $(outbase).exp $(outbase).ilk $(out).manifest
|
---|
| 258 | TOOL_VCC80_LINK_PROGRAM_OUTPUT_MAYBE_PRECIOUS = $(outbase).map $(outbase).rsp
|
---|
[2524] | 259 | TOOL_VCC80_LINK_PROGRAM_OUTPUT_DEBUG = $(outbase).pdb
|
---|
| 260 | TOOL_VCC80_LINK_PROGRAM_DEBUG_INSTALL_FN = $(2).pdb=>$(basename $(3)).pdb
|
---|
[819] | 261 | define TOOL_VCC80_LINK_PROGRAM_CMDS
|
---|
[2557] | 262 | $(QUIET)$(APPEND) -tn $(outbase).rsp \
|
---|
| 263 | $(foreach arg,\
|
---|
| 264 | $(subst /,\\,$(objs)) \
|
---|
| 265 | $(subst /,\\,$(libs)) \
|
---|
| 266 | ,\"$(arg)\")
|
---|
[819] | 267 | $(QUIET)$(TOOL_VCC80_LD) $(flags) \
|
---|
| 268 | /OUT:$(out) \
|
---|
| 269 | /MAPINFO:EXPORTS /INCREMENTAL:NO \
|
---|
| 270 | /MAP:$(outbase).map \
|
---|
| 271 | $(foreach def,$(filter %.def,$(othersrc)), /DEF:$(def)) \
|
---|
| 272 | $(subst /,\\,$(filter %.exp %.res,$(othersrc))) \
|
---|
| 273 | $(foreach p,$(libpath), /LIBPATH:$(p)) \
|
---|
[2557] | 274 | @$(outbase).rsp
|
---|
[1295] | 275 | $(QUIET)$(TEST) -f $(out).manifest -- \
|
---|
| 276 | $(TOOL_VCC80_MT) -manifest $(subst /,\\,$(out)).manifest -outputresource:$(subst /,\\,$(out))
|
---|
[819] | 277 | endef
|
---|
| 278 |
|
---|
| 279 |
|
---|
| 280 | ## Link DLL.
|
---|
| 281 | # @param $(target) Normalized main target name.
|
---|
| 282 | # @param $(out) DLL 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 | #
|
---|
| 293 | # @param $(outbase) Output basename (full). Use this for list files and such.
|
---|
| 294 | TOOL_VCC80_LINK_DLL_DEPEND = $(objs) $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc)
|
---|
[2487] | 295 | TOOL_VCC80_LINK_DLL_DEPORD = $(call DIRDEP,$(PATH_STAGE_LIB))
|
---|
[3303] | 296 | TOOL_VCC80_LINK_DLL_OUTPUT = $(outbase).lib $(outbase).exp
|
---|
| 297 | TOOL_VCC80_LINK_DLL_OUTPUT_MAYBE = $(outbase).ilk $(out).manifest
|
---|
| 298 | TOOL_VCC80_LINK_DLL_OUTPUT_MAYBE_PRECIOUS = $(outbase).map $(outbase).rsp $(PATH_STAGE_LIB)/$(notdir $(outbase)).lib $(PATH_STAGE_LIB)/$(notdir $(outbase)).exp
|
---|
[2524] | 299 | TOOL_VCC80_LINK_DLL_OUTPUT_DEBUG = $(outbase).pdb
|
---|
| 300 | TOOL_VCC80_LINK_DLL_DEBUG_INSTALL_FN = $(2).pdb=>$(basename $(3)).pdb
|
---|
[819] | 301 | define TOOL_VCC80_LINK_DLL_CMDS
|
---|
[2557] | 302 | $(QUIET)$(APPEND) -tn $(outbase).rsp \
|
---|
| 303 | $(foreach arg,\
|
---|
| 304 | $(subst /,\\,$(objs)) \
|
---|
| 305 | $(subst /,\\,$(libs)) \
|
---|
| 306 | ,\"$(arg)\")
|
---|
[819] | 307 | $(QUIET)$(TOOL_VCC80_LD) $(flags) \
|
---|
| 308 | /OUT:$(out) \
|
---|
| 309 | /IMPLIB:$(outbase).lib \
|
---|
| 310 | /MAPINFO:EXPORTS /INCREMENTAL:NO \
|
---|
| 311 | /MAP:$(outbase).map \
|
---|
| 312 | /DLL \
|
---|
| 313 | $(foreach def,$(filter %.def,$(othersrc)), /DEF:$(def)) \
|
---|
| 314 | $(subst /,\\,$(filter %.exp %.res,$(othersrc))) \
|
---|
| 315 | $(foreach p,$(libpath), /LIBPATH:$(p)) \
|
---|
[2557] | 316 | @$(outbase).rsp
|
---|
[1295] | 317 | $(QUIET)$(TEST) -f $(out).manifest -- \
|
---|
[1312] | 318 | $(TOOL_VCC80_MT) -manifest $(subst /,\\,$(out)).manifest '-outputresource:$(subst /,\\,$(out));#2'
|
---|
[2487] | 319 | $(QUIET)$(CP) --changed --ignore-non-existing $(outbase).exp $(outbase).lib $(PATH_STAGE_LIB)/
|
---|
| 320 | $(eval _DIRS += $(PATH_STAGE_LIB))
|
---|
[819] | 321 | endef
|
---|
| 322 |
|
---|
| 323 |
|
---|
| 324 | ## Link system module (windows aka driver, linux aka kernel module)
|
---|
| 325 | # @param $(target) Normalized main target name.
|
---|
| 326 | # @param $(out) System module name.
|
---|
| 327 | # @param $(objs) Object files to link together.
|
---|
| 328 | # @param $(libs) Libraries to search.
|
---|
| 329 | # @param $(libpath) Library search paths.
|
---|
| 330 | # @param $(flags) Flags.
|
---|
| 331 | # @param $(dirdep) Directory creation dependency.
|
---|
| 332 | # @param $(deps) Other dependencies.
|
---|
| 333 | # @param $(othersrc) Unhandled sources.
|
---|
| 334 | # @param $(custom_pre) Custom step invoked before linking.
|
---|
| 335 | # @param $(custom_post) Custom step invoked after linking.
|
---|
| 336 | #
|
---|
| 337 | # @param $(outbase) Output basename (full). Use this for list files and such.
|
---|
| 338 | TOOL_VCC80_LINK_SYSMOD_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc)
|
---|
| 339 | TOOL_VCC80_LINK_SYSMOD_DEPORD =
|
---|
[2524] | 340 | TOOL_VCC80_LINK_SYSMOD_OUTPUT_MAYBE = $(outbase).lib $(outbase).exp $(outbase).ilk $(out).manifest
|
---|
[3303] | 341 | TOOL_VCC80_LINK_SYSMOD_OUTPUT_MAYBE_PRECIOUS = $(outbase).map $(outbase).rsp
|
---|
[2524] | 342 | TOOL_VCC80_LINK_SYSMOD_OUTPUT_DEBUG = $(outbase).pdb
|
---|
| 343 | TOOL_VCC80_LINK_SYSMOD_DEBUG_INSTALL_FN = $(2).pdb=>$(basename $(3)).pdb
|
---|
[819] | 344 | define TOOL_VCC80_LINK_SYSMOD_CMDS
|
---|
[2557] | 345 | $(QUIET)$(APPEND) -tn $(outbase).rsp \
|
---|
| 346 | $(foreach arg,\
|
---|
| 347 | $(subst /,\\,$(objs)) \
|
---|
| 348 | $(subst /,\\,$(libs)) \
|
---|
| 349 | ,\"$(arg)\")
|
---|
[819] | 350 | $(QUIET)$(TOOL_VCC80_LD) $(flags) \
|
---|
| 351 | /OUT:$(out) \
|
---|
| 352 | /MAPINFO:EXPORTS /INCREMENTAL:NO \
|
---|
| 353 | /MAP:$(outbase).map \
|
---|
| 354 | $(foreach def,$(filter %.def,$(othersrc)), /DEF:$(def)) \
|
---|
| 355 | $(subst /,\\,$(filter %.exp %.res,$(othersrc))) \
|
---|
| 356 | $(foreach p,$(libpath), /LIBPATH:$(p)) \
|
---|
[2557] | 357 | @$(outbase).rsp
|
---|
[1295] | 358 | $(QUIET)$(TEST) -f $(out).manifest -- \
|
---|
[1312] | 359 | $(TOOL_VCC80_MT) -manifest $(subst /,\\,$(out)).manifest '-outputresource:$(subst /,\\,$(out));#2'
|
---|
[819] | 360 | endef
|
---|
| 361 |
|
---|