| 1 | # $Id: VCC70.kmk 2557 2011-12-13 12:48:32Z bird $
|
|---|
| 2 | ## @file
|
|---|
| 3 | # kBuild Tool Config - Visual C++ 7.0 (aka Visual Studio .NET), targeting x86.
|
|---|
| 4 | #
|
|---|
| 5 |
|
|---|
| 6 | #
|
|---|
| 7 | # Copyright (c) 2004-2010 knut st. osmundsen <bird-kBuild-spamx@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 |
|
|---|
| 34 | TOOL_VCC70 := Visual C++ 7.0 (aka Visual Studio .NET), targeting x86.
|
|---|
| 35 |
|
|---|
| 36 | # Tool Specific Properties
|
|---|
| 37 | ifndef PATH_TOOL_VCC70
|
|---|
| 38 | PATH_TOOL_VCC70 := $(firstword $(wildcard \
|
|---|
| 39 | $(PATH_DEVTOOLS)/win.x86/vcc/v7 \
|
|---|
| 40 | $(PATH_DEVTOOLS)/x86.win32/vcc/v7 \
|
|---|
| 41 | $(PATH_DEVTOOLS)/x86.win32/vcc70) )
|
|---|
| 42 | # if not found, we'll enter 'pathless' mode.
|
|---|
| 43 | else
|
|---|
| 44 | # Resolve any fancy stuff once and for all.
|
|---|
| 45 | PATH_TOOL_VCC70 := $(PATH_TOOL_VCC70)
|
|---|
| 46 | endif
|
|---|
| 47 | ifneq ($(PATH_TOOL_VCC70),)
|
|---|
| 48 | PATH_TOOL_VCC70_BIN ?= $(PATH_TOOL_VCC70)/bin
|
|---|
| 49 | PATH_TOOL_VCC70_LIB ?= $(PATH_TOOL_VCC70)/lib
|
|---|
| 50 | PATH_TOOL_VCC70_INC ?= $(PATH_TOOL_VCC70)/include
|
|---|
| 51 | PATH_TOOL_VCC70_ATLMFC ?= $(PATH_TOOL_VCC70)/atlmfc
|
|---|
| 52 | PATH_TOOL_VCC70_ATLMFC_INC ?= $(PATH_TOOL_VCC70_ATLMFC)/include
|
|---|
| 53 | PATH_TOOL_VCC70_ATLMFC_LIB ?= $(PATH_TOOL_VCC70_ATLMFC)/lib
|
|---|
| 54 | TOOL_VCC70_CC ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC70_BIN)/cl.exe
|
|---|
| 55 | TOOL_VCC70_CXX ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC70_BIN)/cl.exe
|
|---|
| 56 | TOOL_VCC70_AS ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC70_BIN)/ml.exe
|
|---|
| 57 | TOOL_VCC70_RC ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC70_BIN)/rc.exe
|
|---|
| 58 | TOOL_VCC70_AR ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC70_BIN)/lib.exe
|
|---|
| 59 | TOOL_VCC70_LD ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC70_BIN)/link.exe
|
|---|
| 60 | else
|
|---|
| 61 | # Pathless, relies on the environment.
|
|---|
| 62 | TOOL_VCC70_CC ?= $(EXEC_X86_WIN32) cl.exe
|
|---|
| 63 | TOOL_VCC70_CXX ?= $(EXEC_X86_WIN32) cl.exe
|
|---|
| 64 | TOOL_VCC70_AS ?= $(EXEC_X86_WIN32) ml.exe
|
|---|
| 65 | TOOL_VCC70_RC ?= $(EXEC_X86_WIN32) rc.exe
|
|---|
| 66 | TOOL_VCC70_AR ?= $(EXEC_X86_WIN32) lib.exe
|
|---|
| 67 | TOOL_VCC70_LD ?= $(EXEC_X86_WIN32) link.exe
|
|---|
| 68 | endif
|
|---|
| 69 | ## Disabled fast DEP_IDB based dependencies.
|
|---|
| 70 | #VCC70_OLD_DEPS = 1
|
|---|
| 71 |
|
|---|
| 72 | ## Constructs the correct .pdb name (the name is lowercased).
|
|---|
| 73 | # @param $(1) Base name, no extention.
|
|---|
| 74 | # @param $(2) The extension.
|
|---|
| 75 | TOOL_VCC70_PDB = $(dir $(1))$(tolower $(notdir $(1))).$(2)
|
|---|
| 76 |
|
|---|
| 77 | # General Properties used by kBuild
|
|---|
| 78 | TOOL_VCC70_COBJSUFF ?= .obj
|
|---|
| 79 | TOOL_VCC70_CFLAGS ?= -TC -c -nologo
|
|---|
| 80 | TOOL_VCC70_CFLAGS.debug ?= -Od -Zi
|
|---|
| 81 | TOOL_VCC70_CFLAGS.release ?= -O2
|
|---|
| 82 | TOOL_VCC70_CFLAGS.profile ?= -O2
|
|---|
| 83 | TOOL_VCC70_CINCS ?= $(PATH_TOOL_VCC70_INC)
|
|---|
| 84 | TOOL_VCC70_CDEFS ?=
|
|---|
| 85 |
|
|---|
| 86 | TOOL_VCC70_CXXOBJSUFF ?= .obj
|
|---|
| 87 | TOOL_VCC70_CXXFLAGS ?= -TP -c -nologo
|
|---|
| 88 | TOOL_VCC70_CXXFLAGS.debug ?= -Od -Zi
|
|---|
| 89 | TOOL_VCC70_CXXFLAGS.release ?= -O2
|
|---|
| 90 | TOOL_VCC70_CXXFLAGS.profile ?= -O2
|
|---|
| 91 | TOOL_VCC70_CXXINCS ?= $(PATH_TOOL_VCC70_INC) $(PATH_TOOL_VCC70_ATLMFC_INC)
|
|---|
| 92 | TOOL_VCC70_CXXDEFS ?=
|
|---|
| 93 |
|
|---|
| 94 | TOOL_VCC70_ASOBJSUFF ?= .obj
|
|---|
| 95 |
|
|---|
| 96 | TOOL_VCC70_RCOBJSUFF ?= .res
|
|---|
| 97 | TOOL_VCC70_RCINCS ?= $(PATH_TOOL_VCC70_INC) $(PATH_TOOL_VCC70_ATLMFC_INC)
|
|---|
| 98 |
|
|---|
| 99 | TOOL_VCC70_ARFLAGS ?= -nologo
|
|---|
| 100 | TOOL_VCC70_ARLIBSUFF ?= .lib
|
|---|
| 101 |
|
|---|
| 102 | TOOL_VCC70_LDFLAGS ?= -nologo
|
|---|
| 103 | TOOL_VCC70_LDFLAGS.debug ?= -debug
|
|---|
| 104 | TOOL_VCC70_LDFLAGS.release ?=
|
|---|
| 105 |
|
|---|
| 106 |
|
|---|
| 107 | ## Compile C source.
|
|---|
| 108 | # @param $(target) Normalized main target name.
|
|---|
| 109 | # @param $(source) Source filename (relative).
|
|---|
| 110 | # @param $(obj) Object file name. This shall be (re)created by the compilation.
|
|---|
| 111 | # @param $(dep) Dependcy file. This shall be (re)created by the compilation.
|
|---|
| 112 | # @param $(flags) Flags.
|
|---|
| 113 | # @param $(defs) Definitions. No -D or something.
|
|---|
| 114 | # @param $(incs) Includes. No -I or something.
|
|---|
| 115 | # @param $(dirdep) Directory creation dependency.
|
|---|
| 116 | # @param $(deps) Other dependencies.
|
|---|
| 117 | #
|
|---|
| 118 | # @param $(outbase) Output basename (full). Use this for list files and such.
|
|---|
| 119 | # @param $(objsuff) Object suffix.
|
|---|
| 120 | TOOL_VCC70_COMPILE_C_DONT_PURGE_OUTPUT =
|
|---|
| 121 | TOOL_VCC70_COMPILE_C_DEPEND =
|
|---|
| 122 | TOOL_VCC70_COMPILE_C_DEPORD =
|
|---|
| 123 | #ifdef KBUILD_USE_KOBJCACHE
|
|---|
| 124 | #TOOL_VCC70_COMPILE_C_OUTPUT = $(call TOOL_VCC70_PDB, $(outbase)-obj,pdb) $(call TOOL_VCC70_PDB, $(outbase)-obj,idb) $(outbase).i
|
|---|
| 125 | #TOOL_VCC70_COMPILE_C_USESES_KOBJCACHE = 1
|
|---|
| 126 | #define TOOL_VCC70_COMPILE_C_CMDS
|
|---|
| 127 | # $(QUIET)$(KOBJCACHE) -f $(outbase).koc -r --kObjCache-cpp $(outbase).i \
|
|---|
| 128 | # $(TOOL_VCC70_CC) -E \
|
|---|
| 129 | # $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
|
|---|
| 130 | # $(subst /,\\,$(abspath $(source))) \
|
|---|
| 131 | # --kObjCache-cc $(obj) \
|
|---|
| 132 | # $(TOOL_VCC70_CC) -c -TC\
|
|---|
| 133 | # $(flags) \
|
|---|
| 134 | # -Fd$(outbase)-obj.pdb \
|
|---|
| 135 | # -FD\
|
|---|
| 136 | # -Fo$(obj)\
|
|---|
| 137 | # $(subst /,\\,$(outbase).i)
|
|---|
| 138 | # $(QUIET)$(DEP_IDB) -f -s -q -o $(dep) -t $(obj) $(call TOOL_VCC70_PDB,$(outbase)-obj,idb)
|
|---|
| 139 | #endef
|
|---|
| 140 | #else # !KBUILD_USE_KOBJCACHE
|
|---|
| 141 | TOOL_VCC70_COMPILE_C_OUTPUT = $(call TOOL_VCC70_PDB, $(outbase)-obj,idb)
|
|---|
| 142 | TOOL_VCC70_COMPILE_C_OUTPUT_MAYBE = $(call TOOL_VCC70_PDB, $(outbase)-obj,pdb)
|
|---|
| 143 | define TOOL_VCC70_COMPILE_C_CMDS
|
|---|
| 144 | $(QUIET)$(TOOL_VCC70_CC) -c\
|
|---|
| 145 | $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
|
|---|
| 146 | -Fd$(outbase)-obj.pdb \
|
|---|
| 147 | -FD\
|
|---|
| 148 | -Fo$(obj)\
|
|---|
| 149 | $(subst /,\\,$(abspath $(source)))
|
|---|
| 150 | $(QUIET)$(DEP_IDB) -f -s -q -o $(dep) -t $(obj) $(call TOOL_VCC70_PDB,$(outbase)-obj,idb)
|
|---|
| 151 | endef
|
|---|
| 152 | #endif # !KBUILD_USE_KOBJCACHE
|
|---|
| 153 |
|
|---|
| 154 |
|
|---|
| 155 | ## Compile C++ source.
|
|---|
| 156 | # @param $(target) Normalized main target name.
|
|---|
| 157 | # @param $(source) Source filename (relative).
|
|---|
| 158 | # @param $(obj) Object file name. This shall be (re)created by the compilation.
|
|---|
| 159 | # @param $(dep) Dependcy file. This shall be (re)created by the compilation.
|
|---|
| 160 | # @param $(flags) Flags.
|
|---|
| 161 | # @param $(defs) Definitions. No -D or something.
|
|---|
| 162 | # @param $(incs) Includes. No -I or something.
|
|---|
| 163 | # @param $(dirdep) Directory creation dependency.
|
|---|
| 164 | # @param $(deps) Other dependencies.
|
|---|
| 165 | #
|
|---|
| 166 | # @param $(outbase) Output basename (full). Use this for list files and such.
|
|---|
| 167 | # @param $(objsuff) Object suffix.
|
|---|
| 168 | TOOL_VCC70_COMPILE_CXX_DONT_PURGE_OUTPUT =
|
|---|
| 169 | TOOL_VCC70_COMPILE_CXX_DEPEND =
|
|---|
| 170 | TOOL_VCC70_COMPILE_CXX_DEPORD =
|
|---|
| 171 | #ifdef KBUILD_USE_KOBJCACHE
|
|---|
| 172 | #TOOL_VCC70_COMPILE_CXX_OUTPUT = $(call TOOL_VCC70_PDB, $(outbase)-obj,pdb) $(call TOOL_VCC70_PDB, $(outbase)-obj,idb) $(outbase).ii
|
|---|
| 173 | #TOOL_VCC70_COMPILE_CXX_USES_KOBJCACHE = 1
|
|---|
| 174 | #define TOOL_VCC70_COMPILE_CXX_CMDS
|
|---|
| 175 | # $(QUIET)$(KOBJCACHE) -f $(outbase).koc -r --kObjCache-cpp $(outbase).ii \
|
|---|
| 176 | # $(TOOL_VCC70_CC) -E \
|
|---|
| 177 | # $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
|
|---|
| 178 | # $(subst /,\\,$(abspath $(source))) \
|
|---|
| 179 | # --kObjCache-cc $(obj) \
|
|---|
| 180 | # $(TOOL_VCC70_CC) -c -TP\
|
|---|
| 181 | # $(flags) \
|
|---|
| 182 | # -Fd$(outbase)-obj.pdb \
|
|---|
| 183 | # -FD\
|
|---|
| 184 | # -Fo$(obj)\
|
|---|
| 185 | # $(subst /,\\,$(outbase).ii)
|
|---|
| 186 | # $(QUIET)$(DEP_IDB) -f -s -q -o $(dep) -t $(obj) $(call TOOL_VCC70_PDB,$(outbase)-obj,idb)
|
|---|
| 187 | #endef
|
|---|
| 188 | #else # !KBUILD_USE_KOBJCACHE
|
|---|
| 189 | TOOL_VCC70_COMPILE_CXX_OUTPUT = $(call TOOL_VCC70_PDB, $(outbase)-obj,idb)
|
|---|
| 190 | TOOL_VCC70_COMPILE_CXX_OUTPUT_MAYBE = $(call TOOL_VCC70_PDB, $(outbase)-obj,pdb)
|
|---|
| 191 | define TOOL_VCC70_COMPILE_CXX_CMDS
|
|---|
| 192 | $(QUIET)$(TOOL_VCC70_CXX) -c\
|
|---|
| 193 | $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
|
|---|
| 194 | -Fd$(outbase)-obj.pdb \
|
|---|
| 195 | -FD\
|
|---|
| 196 | -Fo$(obj)\
|
|---|
| 197 | $(subst /,\\,$(abspath $(source)))
|
|---|
| 198 | $(QUIET)$(DEP_IDB) -f -s -q -o $(dep) -t $(obj) $(call TOOL_VCC70_PDB,$(outbase)-obj,idb)
|
|---|
| 199 | endef
|
|---|
| 200 | #endif # !KBUILD_USE_KOBJCACHE
|
|---|
| 201 |
|
|---|
| 202 |
|
|---|
| 203 | ## Compile resource source.
|
|---|
| 204 | # @param $(target) Normalized main target name.
|
|---|
| 205 | # @param $(source) Source filename (relative).
|
|---|
| 206 | # @param $(obj) Object file name. This shall be (re)created by the compilation.
|
|---|
| 207 | # @param $(dep) Dependcy file. This shall be (re)created by the compilation.
|
|---|
| 208 | # @param $(flags) Flags.
|
|---|
| 209 | # @param $(defs) Definitions. No -D or something.
|
|---|
| 210 | # @param $(incs) Includes. No -I or something.
|
|---|
| 211 | # @param $(dirdep) Directory creation dependency.
|
|---|
| 212 | # @param $(deps) Other dependencies.
|
|---|
| 213 | #
|
|---|
| 214 | # @param $(outbase) Output basename (full). Use this for list files and such.
|
|---|
| 215 | # @param $(objsuff) Object suffix.
|
|---|
| 216 | TOOL_VCC70_COMPILE_RC_OUTPUT =
|
|---|
| 217 | TOOL_VCC70_COMPILE_RC_DEPEND =
|
|---|
| 218 | TOOL_VCC70_COMPILE_RC_DEPORD =
|
|---|
| 219 | define TOOL_VCC70_COMPILE_RC_CMDS
|
|---|
| 220 | $(QUIET)$(TOOL_VCC70_RC) \
|
|---|
| 221 | $(flags) $(addprefix /i, $(subst /,\\,$(incs))) $(addprefix /d, $(defs))\
|
|---|
| 222 | /fo$(obj)\
|
|---|
| 223 | $(subst /,\\,$(abspath $(source)))
|
|---|
| 224 | endef
|
|---|
| 225 |
|
|---|
| 226 |
|
|---|
| 227 | ## Link library
|
|---|
| 228 | # @param $(target) Normalized main target name.
|
|---|
| 229 | # @param $(out) Library name.
|
|---|
| 230 | # @param $(objs) Object files to put in the library.
|
|---|
| 231 | # @param $(flags) Flags.
|
|---|
| 232 | # @param $(dirdep) Directory creation dependency.
|
|---|
| 233 | # @param $(deps) Other dependencies.
|
|---|
| 234 | # @param $(othersrc) Unhandled sources.
|
|---|
| 235 | # @param $(outbase) Output basename (full). Use this for list files and such.
|
|---|
| 236 | #
|
|---|
| 237 | TOOL_VCC70_LINK_LIBRARY_DEPEND = $(othersrc)
|
|---|
| 238 | TOOL_VCC70_LINK_LIBRARY_DEPORD =
|
|---|
| 239 | TOOL_VCC70_LINK_LIBRARY_OUTPUT = $(outbase).rsp
|
|---|
| 240 | TOOL_VCC70_LINK_LIBRARY_OUTPUT_MAYBE = $(outbase).lst $(outbase).exp $(outbase).pdb
|
|---|
| 241 | define TOOL_VCC70_LINK_LIBRARY_CMDS
|
|---|
| 242 | $(QUIET)$(APPEND) -tn $(outbase).rsp \
|
|---|
| 243 | $(foreach arg,\
|
|---|
| 244 | $(subst /,\\,$(objs) \
|
|---|
| 245 | $(filter-out %.def,$(othersrc))) \
|
|---|
| 246 | $(addprefix /DEF:,$(filter %.def,$(othersrc))) \
|
|---|
| 247 | ,\"$(arg)\")
|
|---|
| 248 | $(QUIET)$(TOOL_VCC70_AR) $(flags) /OUT:$(out) @$(outbase).rsp
|
|---|
| 249 | endef
|
|---|
| 250 |
|
|---|
| 251 |
|
|---|
| 252 | ## Link program
|
|---|
| 253 | # @param $(target) Normalized main target name.
|
|---|
| 254 | # @param $(out) Program 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 | # @param $(outbase) Output basename (full). Use this for list files and such.
|
|---|
| 265 | #
|
|---|
| 266 | TOOL_VCC70_LINK_PROGRAM_OUTPUT = $(outbase).rsp
|
|---|
| 267 | TOOL_VCC70_LINK_PROGRAM_OUTPUT_MAYBE = $(outbase).map $(outbase).lib $(outbase).exp $(outbase).ilk
|
|---|
| 268 | TOOL_VCC70_LINK_PROGRAM_OUTPUT_DEBUG = $(outbase).pdb
|
|---|
| 269 | TOOL_VCC70_LINK_PROGRAM_DEBUG_INSTALL_FN = $(2).pdb=>$(basename $(3)).pdb
|
|---|
| 270 | TOOL_VCC70_LINK_PROGRAM_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc)
|
|---|
| 271 | TOOL_VCC70_LINK_PROGRAM_DEPORD =
|
|---|
| 272 | define TOOL_VCC70_LINK_PROGRAM_CMDS
|
|---|
| 273 | $(QUIET)$(APPEND) -tn $(outbase).rsp \
|
|---|
| 274 | $(foreach arg,\
|
|---|
| 275 | $(subst /,\\,$(objs)) \
|
|---|
| 276 | $(subst /,\\,$(libs)) \
|
|---|
| 277 | ,\"$(arg)\")
|
|---|
| 278 | $(QUIET)$(TOOL_VCC70_LD) $(flags) \
|
|---|
| 279 | /OUT:$(out) \
|
|---|
| 280 | /MAPINFO:EXPORTS /INCREMENTAL:NO /MAPINFO:LINES \
|
|---|
| 281 | /MAP:$(outbase).map \
|
|---|
| 282 | $(foreach def,$(filter %.def,$(othersrc)), /DEF:$(def)) \
|
|---|
| 283 | $(subst /,\\,$(filter %.exp %.res,$(othersrc))) \
|
|---|
| 284 | $(foreach p,$(libpath), /LIBPATH:$(p)) \
|
|---|
| 285 | @$(outbase).rsp
|
|---|
| 286 | endef
|
|---|
| 287 |
|
|---|
| 288 |
|
|---|
| 289 | ## Link DLL.
|
|---|
| 290 | # @param $(target) Normalized main target name.
|
|---|
| 291 | # @param $(out) DLL 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_VCC70_LINK_DLL_OUTPUT = $(outbase).map $(outbase).lib $(outbase).exp $(outbase).rsp
|
|---|
| 304 | TOOL_VCC70_LINK_DLL_OUTPUT_MAYBE = $(outbase).ilk $(PATH_STAGE_LIB)/$(notdir $(outbase)).lib $(PATH_STAGE_LIB)/$(notdir $(outbase)).exp
|
|---|
| 305 | TOOL_VCC70_LINK_DLL_OUTPUT_DEBUG = $(outbase).pdb
|
|---|
| 306 | TOOL_VCC70_LINK_DLL_DEBUG_INSTALL_FN = $(2).pdb=>$(basename $(3)).pdb
|
|---|
| 307 | TOOL_VCC70_LINK_DLL_DEPEND = $(objs) $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc)
|
|---|
| 308 | TOOL_VCC70_LINK_DLL_DEPORD = $(call DIRDEP,$(PATH_STAGE_LIB))
|
|---|
| 309 | define TOOL_VCC70_LINK_DLL_CMDS
|
|---|
| 310 | $(QUIET)$(APPEND) -tn $(outbase).rsp \
|
|---|
| 311 | $(foreach arg,\
|
|---|
| 312 | $(subst /,\\,$(objs)) \
|
|---|
| 313 | $(subst /,\\,$(libs)) \
|
|---|
| 314 | ,\"$(arg)\")
|
|---|
| 315 | $(QUIET)$(TOOL_VCC70_LD) $(flags) \
|
|---|
| 316 | /OUT:$(out) \
|
|---|
| 317 | /IMPLIB:$(outbase).lib \
|
|---|
| 318 | /MAPINFO:EXPORTS /INCREMENTAL:NO /MAPINFO:LINES \
|
|---|
| 319 | /MAP:$(outbase).map \
|
|---|
| 320 | /DLL \
|
|---|
| 321 | $(foreach def,$(filter %.def,$(othersrc)), /DEF:$(def)) \
|
|---|
| 322 | $(subst /,\\,$(filter %.exp %.res,$(othersrc))) \
|
|---|
| 323 | $(foreach p,$(libpath), /LIBPATH:$(p)) \
|
|---|
| 324 | @$(outbase).rsp
|
|---|
| 325 | $(QUIET)$(CP) --changed --ignore-non-existing $(outbase).exp $(outbase).lib $(PATH_STAGE_LIB)/
|
|---|
| 326 | $(eval _DIRS += $(PATH_STAGE_LIB))
|
|---|
| 327 | endef
|
|---|
| 328 |
|
|---|
| 329 |
|
|---|
| 330 | ## Link system module (windows aka driver, linux aka kernel module)
|
|---|
| 331 | # @param $(target) Normalized main target name.
|
|---|
| 332 | # @param $(out) System module name.
|
|---|
| 333 | # @param $(objs) Object files to link together.
|
|---|
| 334 | # @param $(libs) Libraries to search.
|
|---|
| 335 | # @param $(libpath) Library search paths.
|
|---|
| 336 | # @param $(flags) Flags.
|
|---|
| 337 | # @param $(dirdep) Directory creation dependency.
|
|---|
| 338 | # @param $(deps) Other dependencies.
|
|---|
| 339 | # @param $(othersrc) Unhandled sources.
|
|---|
| 340 | # @param $(custom_pre) Custom step invoked before linking.
|
|---|
| 341 | # @param $(custom_post) Custom step invoked after linking.
|
|---|
| 342 | #
|
|---|
| 343 | # @param $(outbase) Output basename (full). Use this for list files and such.
|
|---|
| 344 | TOOL_VCC70_LINK_SYSMOD_OUTPUT = $(outbase).map $(outbase).rsp
|
|---|
| 345 | TOOL_VCC70_LINK_SYSMOD_OUTPUT_MAYBE = $(outbase).lib $(outbase).exp $(outbase).ilk
|
|---|
| 346 | TOOL_VCC70_LINK_SYSMOD_OUTPUT_DEBUG = $(outbase).pdb
|
|---|
| 347 | TOOL_VCC70_LINK_SYSMOD_DEBUG_INSTALL_FN = $(2).pdb=>$(basename $(3)).pdb
|
|---|
| 348 | TOOL_VCC70_LINK_SYSMOD_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc)
|
|---|
| 349 | TOOL_VCC70_LINK_SYSMOD_DEPORD =
|
|---|
| 350 | define TOOL_VCC70_LINK_SYSMOD_CMDS
|
|---|
| 351 | $(QUIET)$(APPEND) -tn $(outbase).rsp \
|
|---|
| 352 | $(foreach arg,\
|
|---|
| 353 | $(subst /,\\,$(objs)) \
|
|---|
| 354 | $(subst /,\\,$(libs)) \
|
|---|
| 355 | ,\"$(arg)\")
|
|---|
| 356 | $(QUIET)$(TOOL_VCC70_LD) $(flags) \
|
|---|
| 357 | /OUT:$(out) \
|
|---|
| 358 | /MAPINFO:EXPORTS /INCREMENTAL:NO /MAPINFO:LINES \
|
|---|
| 359 | /MAP:$(outbase).map \
|
|---|
| 360 | $(foreach def,$(filter %.def,$(othersrc)), /DEF:$(def)) \
|
|---|
| 361 | $(subst /,\\,$(filter %.exp %.res,$(othersrc))) \
|
|---|
| 362 | $(foreach p,$(libpath), /LIBPATH:$(p)) \
|
|---|
| 363 | @$(outbase).rsp
|
|---|
| 364 | endef
|
|---|
| 365 |
|
|---|