[60968] | 1 | # $Id: VBoxXcode62.kmk 98443 2023-02-02 13:03:05Z vboxsync $
|
---|
| 2 | ## @file
|
---|
| 3 | # kBuild Tool Config - Xcode 6.2 from tools, dmg or similar.
|
---|
| 4 | #
|
---|
| 5 |
|
---|
| 6 | #
|
---|
[98108] | 7 | # Copyright (C) 2016-2023 Oracle and/or its affiliates.
|
---|
[60968] | 8 | #
|
---|
[96416] | 9 | # This file is part of VirtualBox base platform packages, as
|
---|
| 10 | # available from https://www.virtualbox.org.
|
---|
[60968] | 11 | #
|
---|
[96416] | 12 | # This program is free software; you can redistribute it and/or
|
---|
| 13 | # modify it under the terms of the GNU General Public License
|
---|
| 14 | # as published by the Free Software Foundation, in version 3 of the
|
---|
| 15 | # License.
|
---|
| 16 | #
|
---|
| 17 | # This program is distributed in the hope that it will be useful, but
|
---|
| 18 | # WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
| 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
| 20 | # General Public License for more details.
|
---|
| 21 | #
|
---|
| 22 | # You should have received a copy of the GNU General Public License
|
---|
| 23 | # along with this program; if not, see <https://www.gnu.org/licenses>.
|
---|
| 24 | #
|
---|
| 25 | # SPDX-License-Identifier: GPL-3.0-only
|
---|
| 26 | #
|
---|
[60968] | 27 |
|
---|
| 28 | TOOL_VBoxXcode62 := Xcode 6.2 from tools, dmg or similar
|
---|
| 29 |
|
---|
| 30 | # Figure out the path of the Xcode.app/Contents/Developer/.
|
---|
| 31 | ifndef PATH_TOOL_VBoxXcode62
|
---|
| 32 | PATH_TOOL_VBoxXcode62 := $(wildcard $(KBUILD_DEVTOOLS_TRG)/xcode/v6.2*/*.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk)
|
---|
| 33 | ifeq ($(PATH_TOOL_VBoxXcode62),)
|
---|
| 34 | PATH_TOOL_VBoxXcode62 := $(wildcard $(KBUILD_DEVTOOLS)/darwin.amd64/xcode/v6.2*/*.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk)
|
---|
| 35 | ifeq ($(PATH_TOOL_VBoxXcode62),)
|
---|
| 36 | PATH_TOOL_VBoxXcode62 := $(wildcard $(KBUILD_DEVTOOLS)/darwin.x86/xcode/v6.2*/*.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk)
|
---|
| 37 | ifeq ($(PATH_TOOL_VBoxXcode62),)
|
---|
| 38 | PATH_TOOL_VBoxXcode62 := $(wildcard $(KBUILD_DEVTOOLS)/darwin.x86/xcode/v6.2*/*.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk)
|
---|
| 39 | ifeq ($(PATH_TOOL_VBoxXcode62),)
|
---|
| 40 | PATH_TOOL_VBoxXcode62 := $(wildcard /Applications/*Xcode*.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk)
|
---|
| 41 | ifeq ($(PATH_TOOL_VBoxXcode62),)
|
---|
| 42 | PATH_TOOL_VBoxXcode62 := $(wildcard /Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk)
|
---|
| 43 | endif
|
---|
| 44 | endif
|
---|
| 45 | endif
|
---|
| 46 | endif
|
---|
| 47 | endif
|
---|
| 48 | ifneq ($(PATH_TOOL_VBoxXcode62),)
|
---|
| 49 | PATH_TOOL_VBoxXcode62 := $(patsubst %/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk,%,$(firstword $(rsort $(PATH_TOOL_VBoxXcode62))))
|
---|
| 50 | endif
|
---|
| 51 | else
|
---|
| 52 | # Resolve any fance stuff once and for all.
|
---|
| 53 | PATH_TOOL_VBoxXcode62 := $(PATH_TOOL_VBoxXcode62)
|
---|
| 54 | endif
|
---|
| 55 |
|
---|
| 56 | # Additional paths derived from the above (external usage as well as tool internal).
|
---|
| 57 | PATH_TOOL_VBoxXcode62_SDKS ?= $(PATH_TOOL_VBoxXcode62)/Platforms/MacOSX.platform/Developer/SDKs
|
---|
| 58 | PATH_TOOL_VBoxXcode62_TOOLCHAIN ?= $(PATH_TOOL_VBoxXcode62)/Toolchains/XcodeDefault.xctoolchain
|
---|
| 59 | PATH_TOOL_VBoxXcode62_TOOLCHAIN_BIN_SLASH ?= $(PATH_TOOL_VBoxXcode62_TOOLCHAIN)/usr/bin/
|
---|
| 60 |
|
---|
| 61 | # Tools macros.
|
---|
| 62 | TOOL_VBoxXcode62_CC ?= $(PATH_TOOL_VBoxXcode62_TOOLCHAIN_BIN_SLASH)clang$(HOSTSUFF_EXE)
|
---|
| 63 | TOOL_VBoxXcode62_CXX ?= $(PATH_TOOL_VBoxXcode62_TOOLCHAIN_BIN_SLASH)clang++$(HOSTSUFF_EXE)
|
---|
| 64 | TOOL_VBoxXcode62_OBJC ?= $(PATH_TOOL_VBoxXcode62_TOOLCHAIN_BIN_SLASH)clang$(HOSTSUFF_EXE)
|
---|
| 65 | TOOL_VBoxXcode62_OBJCXX ?= $(PATH_TOOL_VBoxXcode62_TOOLCHAIN_BIN_SLASH)clang$(HOSTSUFF_EXE)
|
---|
| 66 | TOOL_VBoxXcode62_AS ?= $(PATH_TOOL_VBoxXcode62_TOOLCHAIN_BIN_SLASH)clang$(HOSTSUFF_EXE)
|
---|
| 67 | TOOL_VBoxXcode62_LD ?= $(PATH_TOOL_VBoxXcode62_TOOLCHAIN_BIN_SLASH)clang++$(HOSTSUFF_EXE)
|
---|
| 68 | TOOL_VBoxXcode62_LD_SYSMOD ?= $(PATH_TOOL_VBoxXcode62_TOOLCHAIN_BIN_SLASH)clang++$(HOSTSUFF_EXE)
|
---|
| 69 | ifndef TOOL_VBoxXcode62_LDFLAGS.$(KBUILD_TARGET)
|
---|
[98443] | 70 | TOOL_VBoxXcode62_LDFLAGS.dll ?= -dynamiclib
|
---|
[60968] | 71 | else
|
---|
[98443] | 72 | TOOL_VBoxXcode62_LDFLAGS.dll ?= $(TOOL_VBoxXcode62_LDFLAGS.$(KBUILD_TARGET))
|
---|
[60968] | 73 | endif
|
---|
| 74 | TOOL_VBoxXcode62_LDFLAGS.sysmod ?= -r
|
---|
| 75 | TOOL_VBoxXcode62_DSYMUTIL ?= $(PATH_TOOL_VBoxXcode62_TOOLCHAIN_BIN_SLASH)dsymutil$(HOSTSUFF_EXE)
|
---|
| 76 |
|
---|
| 77 | ifdef SLKRUNS
|
---|
[98443] | 78 | TOOL_VBoxXcode62_CC += -fmessage-length=0
|
---|
| 79 | TOOL_VBoxXcode62_CXX += -fmessage-length=0
|
---|
| 80 | TOOL_VBoxXcode62_OBJC += -fmessage-length=0
|
---|
| 81 | TOOL_VBoxXcode62_OBJCXX += -fmessage-length=0
|
---|
[60968] | 82 | endif
|
---|
| 83 |
|
---|
[68770] | 84 | # Set up environment macros.
|
---|
[60968] | 85 | TOOL_VBoxXcode62_ENV_SETUP ?= $(REDIRECT) \
|
---|
| 86 | -E 'DEVELOPER_DIR=$(PATH_TOOL_VBoxXcode62)' \
|
---|
| 87 | -E 'PATH=$(PATH_TOOL_VBoxXcode62)/usr/bin/:$(PATH_TOOL_VBoxXcode62)/Toolchains/XcodeDefault.xctoolchain/usr/bin:$(PATH)' \
|
---|
[98443] | 88 | --
|
---|
[68770] | 89 | TOOL_VBoxXcode62_ENV_SETUP_EXT ?= $(REDIRECT_EXT) \
|
---|
| 90 | -E 'DEVELOPER_DIR=$(PATH_TOOL_VBoxXcode62)' \
|
---|
| 91 | -E 'PATH=$(PATH_TOOL_VBoxXcode62)/usr/bin/:$(PATH_TOOL_VBoxXcode62)/Toolchains/XcodeDefault.xctoolchain/usr/bin:$(PATH)' \
|
---|
[98443] | 92 | --
|
---|
[60968] | 93 |
|
---|
| 94 | # General Properties used by kBuild
|
---|
| 95 | TOOL_VBoxXcode62_COBJSUFF ?= .o
|
---|
| 96 | TOOL_VBoxXcode62_CFLAGS ?=
|
---|
| 97 | TOOL_VBoxXcode62_CFLAGS.debug ?= -g
|
---|
| 98 | TOOL_VBoxXcode62_CFLAGS.profile ?= -O2 #-g -pg
|
---|
| 99 | TOOL_VBoxXcode62_CFLAGS.release ?= -O2
|
---|
| 100 | TOOL_VBoxXcode62_CINCS ?=
|
---|
| 101 | TOOL_VBoxXcode62_CDEFS ?=
|
---|
| 102 |
|
---|
| 103 | TOOL_VBoxXcode62_CXXOBJSUFF ?= .o
|
---|
| 104 | TOOL_VBoxXcode62_CXXFLAGS ?=
|
---|
| 105 | TOOL_VBoxXcode62_CXXFLAGS.debug ?= -g
|
---|
| 106 | TOOL_VBoxXcode62_CXXFLAGS.profile ?= -O2 #-g -pg
|
---|
| 107 | TOOL_VBoxXcode62_CXXFLAGS.release ?= -O2
|
---|
| 108 | TOOL_VBoxXcode62_CXXINCS ?=
|
---|
| 109 | TOOL_VBoxXcode62_CXXDEFS ?=
|
---|
| 110 |
|
---|
| 111 | TOOL_VBoxXcode62_OBJCOBJSUFF ?= .o
|
---|
| 112 | TOOL_VBoxXcode62_OBJCFLAGS ?=
|
---|
| 113 | TOOL_VBoxXcode62_OBJCFLAGS.debug ?= -g
|
---|
[98443] | 114 | TOOL_VBoxXcode62_OBJCFLAGS.profile ?= -O2 #-g -pg
|
---|
| 115 | TOOL_VBoxXcode62_OBJCFLAGS.release ?= -O2
|
---|
[60968] | 116 | TOOL_VBoxXcode62_OBJCINCS ?=
|
---|
| 117 | TOOL_VBoxXcode62_OBJCDEFS ?=
|
---|
| 118 |
|
---|
| 119 | TOOL_VBoxXcode62_OBJCXXOBJSUFF ?= .o
|
---|
| 120 | TOOL_VBoxXcode62_OBJCXXFLAGS ?=
|
---|
| 121 | TOOL_VBoxXcode62_OBJCXXFLAGS.debug ?= -g
|
---|
| 122 | TOOL_VBoxXcode62_OBJCXXFLAGS.profile ?= -O2 #-g -pg
|
---|
| 123 | TOOL_VBoxXcode62_OBJCXXFLAGS.release ?= -O2
|
---|
| 124 | TOOL_VBoxXcode62_OBJCXXINCS ?=
|
---|
| 125 | TOOL_VBoxXcode62_OBJCXXDEFS ?=
|
---|
| 126 |
|
---|
| 127 | TOOL_VBoxXcode62_ASFLAGS ?= -x assembler-with-cpp
|
---|
| 128 | TOOL_VBoxXcode62_ASFLAGS.debug ?= -g
|
---|
| 129 | TOOL_VBoxXcode62_ASFLAGS.profile ?= -g
|
---|
| 130 | TOOL_VBoxXcode62_ASOBJSUFF ?= .o
|
---|
| 131 |
|
---|
| 132 | TOOL_VBoxXcode62_AR ?= $(PATH_TOOL_VBoxXcode62_TOOLCHAIN_BIN_SLASH)ar$(HOSTSUFF_EXE)
|
---|
| 133 | TOOL_VBoxXcode62_ARFLAGS ?= -c -rs
|
---|
| 134 | TOOL_VBoxXcode62_ARLIBSUFF ?= .a
|
---|
| 135 |
|
---|
| 136 | TOOL_VBoxXcode62_LDFLAGS ?=
|
---|
| 137 | TOOL_VBoxXcode62_LDFLAGS.debug ?= -g
|
---|
| 138 | TOOL_VBoxXcode62_LDFLAGS.profile ?= -g
|
---|
| 139 |
|
---|
| 140 | TOOL_VBoxXcode62_STRIP_PROGRAM ?= $(PATH_TOOL_VBoxXcode62_TOOLCHAIN_BIN_SLASH)strip -SXxru
|
---|
| 141 | TOOL_VBoxXcode62_STRIP_DLL ?= $(PATH_TOOL_VBoxXcode62_TOOLCHAIN_BIN_SLASH)strip -Sxru
|
---|
| 142 | TOOL_VBoxXcode62_STRIP_SYSMOD ?= $(PATH_TOOL_VBoxXcode62_TOOLCHAIN_BIN_SLASH)strip -Sru
|
---|
| 143 |
|
---|
| 144 |
|
---|
| 145 | ##
|
---|
| 146 | # Calculate the files in the debug bundle.
|
---|
| 147 | # @param 1 The whole output filename.
|
---|
| 148 | # @param 2 The output filename sans suffix.
|
---|
| 149 | TOOL_VBoxXcode62_DEBUG_BUNDLE_FN = \
|
---|
[98443] | 150 | $(1).dSYM/Contents/Info.plist \
|
---|
| 151 | $(1).dSYM/Contents/Resources/DWARF/$(notdir $(1))
|
---|
[60968] | 152 |
|
---|
| 153 | ##
|
---|
| 154 | # Calculate the files in the debug bundle.
|
---|
| 155 | # @param 1 The whole linker output filename.
|
---|
| 156 | # @param 2 The linker output filename sans suffix.
|
---|
| 157 | # @param 3 The desired install name (no dir slash).
|
---|
| 158 | # @remarks The Info.plist has some reference to the original name, but gdb
|
---|
| 159 | # does not care and only check for a symbol file in the DWARF
|
---|
| 160 | # directory with the same name as the debugged module.
|
---|
[98443] | 161 | TOOL_VBoxXcode62_DEBUG_INSTALL_FN = \
|
---|
| 162 | $(3).dSYM/ \
|
---|
| 163 | $(3).dSYM/Contents/ \
|
---|
| 164 | $(3).dSYM/Contents/Resources/ \
|
---|
| 165 | $(3).dSYM/Contents/Resources/DWARF/ \
|
---|
| 166 | $(1).dSYM/Contents/Info.plist=>$(3).dSYM/Contents/Info.plist \
|
---|
| 167 | $(1).dSYM/Contents/Resources/DWARF/$(notdir $(1))=>$(3).dSYM/Contents/Resources/DWARF/$(notdir $(3))
|
---|
[60968] | 168 |
|
---|
| 169 |
|
---|
| 170 | ## Compile C 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_VBoxXcode62_COMPILE_C_DEPEND =
|
---|
| 184 | TOOL_VBoxXcode62_COMPILE_C_DEPORD =
|
---|
| 185 | ifdef KBUILD_USE_KOBJCACHE
|
---|
[98443] | 186 | TOOL_VBoxXcode62_COMPILE_C_USES_KOBJCACHE = 1
|
---|
| 187 | TOOL_VBoxXcode62_COMPILE_C_OUTPUT = $(outbase).i
|
---|
| 188 | define TOOL_VBoxXcode62_COMPILE_C_CMDS
|
---|
[60968] | 189 | $(QUIET)$(TOOL_VBoxXcode62_ENV_SETUP) $(KOBJCACHE) -f $(outbase).koc -d $(PATH_OBJCACHE) -t $(bld_trg).$(bld_trg_arch) -p\
|
---|
| 190 | --kObjCache-cpp $(outbase).i\
|
---|
| 191 | $(TOOL_VBoxXcode62_CC) -E -o -\
|
---|
[97991] | 192 | $(flags) $(qaddprefix sh,-I, $(incs)) $(qaddprefix sh,-D, $(defs))\
|
---|
[63437] | 193 | -Wp,-MD,$(dep) -Wp,-MP\
|
---|
[60968] | 194 | $(abspath $(source))\
|
---|
| 195 | --kObjCache-cc $(obj)\
|
---|
| 196 | $(TOOL_VBoxXcode62_CC) -c\
|
---|
| 197 | $(flags) -x c\
|
---|
| 198 | -o $(obj)\
|
---|
| 199 | -
|
---|
[63437] | 200 | %$(QUIET)$(APPEND) -n "$(dep)" "" "$(source):" ""
|
---|
[98443] | 201 | endef
|
---|
[60968] | 202 | else # !KBUILD_USE_KOBJCACHE
|
---|
[98443] | 203 | TOOL_VBoxXcode62_COMPILE_C_OUTPUT =
|
---|
| 204 | define TOOL_VBoxXcode62_COMPILE_C_CMDS
|
---|
[60968] | 205 | $(QUIET)$(TOOL_VBoxXcode62_ENV_SETUP) $(TOOL_VBoxXcode62_CC) -c\
|
---|
[97991] | 206 | $(flags) $(qaddprefix sh,-I, $(incs)) $(qaddprefix sh,-D, $(defs))\
|
---|
[63437] | 207 | -Wp,-MD,$(dep) -Wp,-MP\
|
---|
[60968] | 208 | -o $(obj)\
|
---|
| 209 | $(abspath $(source))
|
---|
[63437] | 210 | %$(QUIET)$(APPEND) -n "$(dep)" "" "$(source):" ""
|
---|
[98443] | 211 | endef
|
---|
[60968] | 212 | endif # !KUSE_OBJCACHE
|
---|
| 213 |
|
---|
| 214 |
|
---|
| 215 | ## Compile C++ source.
|
---|
| 216 | # @param $(target) Normalized main target name.
|
---|
| 217 | # @param $(source) Source filename (relative).
|
---|
| 218 | # @param $(obj) Object file name. This shall be (re)created by the compilation.
|
---|
| 219 | # @param $(dep) Dependcy file. This shall be (re)created by the compilation.
|
---|
| 220 | # @param $(flags) Flags.
|
---|
| 221 | # @param $(defs) Definitions. No -D or something.
|
---|
| 222 | # @param $(incs) Includes. No -I or something.
|
---|
| 223 | # @param $(dirdep) Directory creation dependency.
|
---|
| 224 | # @param $(deps) Other dependencies.
|
---|
| 225 | # @param $(outbase) Output basename (full). Use this for list files and such.
|
---|
| 226 | # @param $(objsuff) Object suffix.
|
---|
| 227 | TOOL_VBoxXcode62_COMPILE_CXX_DEPEND =
|
---|
| 228 | TOOL_VBoxXcode62_COMPILE_CXX_DEPORD =
|
---|
| 229 | ifdef KBUILD_USE_KOBJCACHE
|
---|
[98443] | 230 | TOOL_VBoxXcode62_COMPILE_CXX_USES_KOBJCACHE = 1
|
---|
| 231 | TOOL_VBoxXcode62_COMPILE_CXX_OUTPUT = $(outbase).ii
|
---|
| 232 | define TOOL_VBoxXcode62_COMPILE_CXX_CMDS
|
---|
[60968] | 233 | $(QUIET)$(TOOL_VBoxXcode62_ENV_SETUP) $(KOBJCACHE) -f $(outbase).koc -d $(PATH_OBJCACHE) -t $(bld_trg).$(bld_trg_arch) -p\
|
---|
| 234 | --kObjCache-cpp $(outbase).ii\
|
---|
| 235 | $(TOOL_VBoxXcode62_CXX) -E -o -\
|
---|
[97991] | 236 | $(flags) $(qaddprefix sh,-I, $(incs)) $(qaddprefix sh,-D, $(defs))\
|
---|
[63437] | 237 | -Wp,-MD,$(dep)\
|
---|
| 238 | -Wp,-MP\
|
---|
[60968] | 239 | $(abspath $(source))\
|
---|
| 240 | --kObjCache-cc $(obj)\
|
---|
| 241 | $(TOOL_VBoxXcode62_CXX) -c\
|
---|
| 242 | $(flags) -x c++\
|
---|
| 243 | -o $(obj)\
|
---|
| 244 | -
|
---|
[63437] | 245 | %$(QUIET)$(APPEND) -n "$(dep)" "" "$(source):" ""
|
---|
[98443] | 246 | endef
|
---|
[60968] | 247 | else # !KBUILD_USE_KOBJCACHE
|
---|
[98443] | 248 | TOOL_VBoxXcode62_COMPILE_CXX_OUTPUT =
|
---|
| 249 | define TOOL_VBoxXcode62_COMPILE_CXX_CMDS
|
---|
[60968] | 250 | $(QUIET)$(TOOL_VBoxXcode62_ENV_SETUP) $(TOOL_VBoxXcode62_CXX) -c\
|
---|
[97991] | 251 | $(flags) $(qaddprefix sh,-I, $(incs)) $(qaddprefix sh,-D, $(defs))\
|
---|
[63437] | 252 | -Wp,-MD,$(dep)\
|
---|
| 253 | -Wp,-MP\
|
---|
[60968] | 254 | -o $(obj)\
|
---|
| 255 | $(abspath $(source))
|
---|
[63437] | 256 | %$(QUIET)$(APPEND) -n "$(dep)" "" "$(source):" ""
|
---|
[98443] | 257 | endef
|
---|
[60968] | 258 | endif # !KBUILD_USE_KOBJCACHE
|
---|
| 259 |
|
---|
| 260 |
|
---|
| 261 | ## Compile Objective-C source.
|
---|
| 262 | # @param $(target) Normalized main target name.
|
---|
| 263 | # @param $(source) Source filename (relative).
|
---|
| 264 | # @param $(obj) Object file name. This shall be (re)created by the compilation.
|
---|
| 265 | # @param $(dep) Dependcy file. This shall be (re)created by the compilation.
|
---|
| 266 | # @param $(flags) Flags.
|
---|
| 267 | # @param $(defs) Definitions. No -D or something.
|
---|
| 268 | # @param $(incs) Includes. No -I or something.
|
---|
| 269 | # @param $(dirdep) Directory creation dependency.
|
---|
| 270 | # @param $(deps) Other dependencies.
|
---|
| 271 | # @param $(outbase) Output basename (full). Use this for list files and such.
|
---|
| 272 | # @param $(objsuff) Object suffix.
|
---|
| 273 | TOOL_VBoxXcode62_COMPILE_OBJC_DEPEND =
|
---|
| 274 | TOOL_VBoxXcode62_COMPILE_OBJC_DEPORD =
|
---|
| 275 | ifdef KBUILD_USE_KOBJCACHE
|
---|
[98443] | 276 | TOOL_VBoxXcode62_COMPILE_OBJC_USES_KOBJCACHE = 1
|
---|
| 277 | TOOL_VBoxXcode62_COMPILE_OBJC_OUTPUT = $(outbase).mi
|
---|
| 278 | define TOOL_VBoxXcode62_COMPILE_OBJC_CMDS
|
---|
[60968] | 279 | $(QUIET)$(TOOL_VBoxXcode62_ENV_SETUP) $(KOBJCACHE) -f $(outbase).koc -d $(PATH_OBJCACHE) -t $(bld_trg).$(bld_trg_arch) -p\
|
---|
| 280 | --kObjCache-cpp $(outbase).ii\
|
---|
| 281 | $(TOOL_VBoxXcode62_OBJC) -E -o -\
|
---|
[97991] | 282 | $(flags) $(qaddprefix sh,-I, $(incs)) $(qaddprefix sh,-D, $(defs))\
|
---|
[63437] | 283 | -Wp,-MD,$(dep) -Wp,-MP\
|
---|
[60968] | 284 | $(abspath $(source))\
|
---|
| 285 | --kObjCache-cc $(obj)\
|
---|
| 286 | $(TOOL_VBoxXcode62_OBJC) -c\
|
---|
| 287 | $(flags) -x objective-c \
|
---|
| 288 | -o $(obj)\
|
---|
| 289 | -
|
---|
[63437] | 290 | %$(QUIET)$(APPEND) -n "$(dep)" "" "$(source):" ""
|
---|
[98443] | 291 | endef
|
---|
[60968] | 292 | else # !KBUILD_USE_KOBJCACHE
|
---|
[98443] | 293 | TOOL_VBoxXcode62_COMPILE_OBJC_OUTPUT =
|
---|
| 294 | define TOOL_VBoxXcode62_COMPILE_OBJC_CMDS
|
---|
[60968] | 295 | $(QUIET)$(TOOL_VBoxXcode62_ENV_SETUP) $(TOOL_VBoxXcode62_OBJC) -c\
|
---|
[97991] | 296 | $(flags) $(qaddprefix sh,-I, $(incs)) $(qaddprefix sh,-D, $(defs))\
|
---|
[63437] | 297 | -Wp,-MD,$(dep) -Wp,-MP\
|
---|
[60968] | 298 | -o $(obj)\
|
---|
| 299 | $(abspath $(source))
|
---|
[63437] | 300 | %$(QUIET)$(APPEND) -n "$(dep)" "" "$(source):" ""
|
---|
[98443] | 301 | endef
|
---|
[60968] | 302 | endif # !KBUILD_USE_KOBJCACHE
|
---|
| 303 |
|
---|
| 304 |
|
---|
| 305 | ## Compile Objective-C++ source.
|
---|
| 306 | # @param $(target) Normalized main target name.
|
---|
| 307 | # @param $(source) Source filename (relative).
|
---|
| 308 | # @param $(obj) Object file name. This shall be (re)created by the compilation.
|
---|
| 309 | # @param $(dep) Dependcy file. This shall be (re)created by the compilation.
|
---|
| 310 | # @param $(flags) Flags.
|
---|
| 311 | # @param $(defs) Definitions. No -D or something.
|
---|
| 312 | # @param $(incs) Includes. No -I or something.
|
---|
| 313 | # @param $(dirdep) Directory creation dependency.
|
---|
| 314 | # @param $(deps) Other dependencies.
|
---|
| 315 | # @param $(outbase) Output basename (full). Use this for list files and such.
|
---|
| 316 | # @param $(objsuff) Object suffix.
|
---|
| 317 | TOOL_VBoxXcode62_COMPILE_OBJCXX_DEPEND =
|
---|
| 318 | TOOL_VBoxXcode62_COMPILE_OBJCXX_DEPORD =
|
---|
| 319 | ifdef KBUILD_USE_KOBJCACHE
|
---|
[98443] | 320 | TOOL_VBoxXcode62_COMPILE_OBJCXX_USES_KOBJCACHE = 1
|
---|
| 321 | TOOL_VBoxXcode62_COMPILE_OBJCXX_OUTPUT = $(outbase).mii
|
---|
| 322 | define TOOL_VBoxXcode62_COMPILE_OBJCXX_CMDS
|
---|
[60968] | 323 | $(QUIET)$(TOOL_VBoxXcode62_ENV_SETUP) $(KOBJCACHE) -f $(outbase).koc -d $(PATH_OBJCACHE) -t $(bld_trg).$(bld_trg_arch) -p\
|
---|
| 324 | --kObjCache-cpp $(outbase).mii\
|
---|
| 325 | $(TOOL_VBoxXcode62_OBJCXX) -E -o -\
|
---|
[97991] | 326 | $(flags) $(qaddprefix sh,-I, $(incs)) $(qaddprefix sh,-D, $(defs))\
|
---|
[63437] | 327 | -Wp,-MD,$(dep) -Wp,-MP\
|
---|
[60968] | 328 | $(abspath $(source))\
|
---|
| 329 | --kObjCache-cc $(obj)\
|
---|
| 330 | $(TOOL_VBoxXcode62_OBJCXX) -c\
|
---|
| 331 | $(flags) -x objective-c++ \
|
---|
| 332 | -o $(obj)\
|
---|
| 333 | -
|
---|
[63437] | 334 | %$(QUIET)$(APPEND) -n "$(dep)" "" "$(source):" ""
|
---|
[98443] | 335 | endef
|
---|
[60968] | 336 | else # !KBUILD_USE_KOBJCACHE
|
---|
[98443] | 337 | TOOL_VBoxXcode62_COMPILE_OBJCXX_OUTPUT =
|
---|
| 338 | define TOOL_VBoxXcode62_COMPILE_OBJCXX_CMDS
|
---|
[60968] | 339 | $(QUIET)$(TOOL_VBoxXcode62_ENV_SETUP) $(TOOL_VBoxXcode62_OBJCXX) -c\
|
---|
[97991] | 340 | $(flags) $(qaddprefix sh,-I, $(incs)) $(qaddprefix sh,-D, $(defs))\
|
---|
[63437] | 341 | -Wp,-MD,$(dep) -Wp,-MP\
|
---|
[60968] | 342 | -o $(obj)\
|
---|
| 343 | $(abspath $(source))
|
---|
[63437] | 344 | %$(QUIET)$(APPEND) -n "$(dep)" "" "$(source):" ""
|
---|
[98443] | 345 | endef
|
---|
[60968] | 346 | endif # !KBUILD_USE_KOBJCACHE
|
---|
| 347 |
|
---|
| 348 |
|
---|
| 349 | ## Compile Assembly source.
|
---|
| 350 | # @param $(target) Normalized main target name.
|
---|
| 351 | # @param $(source) Source filename (relative).
|
---|
| 352 | # @param $(obj) Object file name. This shall be (re)created by the compilation.
|
---|
| 353 | # @param $(dep) Dependcy file. This shall be (re)created by the compilation.
|
---|
| 354 | # @param $(flags) Flags.
|
---|
| 355 | # @param $(defs) Definitions. No -D or something.
|
---|
| 356 | # @param $(incs) Includes. No -I or something.
|
---|
| 357 | # @param $(dirdep) Directory creation dependency.
|
---|
| 358 | # @param $(deps) Other dependencies.
|
---|
| 359 | # @param $(outbase) Output basename (full). Use this for list files and such.
|
---|
| 360 | # @param $(objsuff) Object suffix.
|
---|
| 361 | #
|
---|
| 362 | TOOL_VBoxXcode62_COMPILE_AS_OUTPUT =
|
---|
| 363 | TOOL_VBoxXcode62_COMPILE_AS_DEPEND =
|
---|
| 364 | TOOL_VBoxXcode62_COMPILE_AS_DEPORD =
|
---|
| 365 | define TOOL_VBoxXcode62_COMPILE_AS_CMDS
|
---|
| 366 | $(QUIET)$(TOOL_VBoxXcode62_ENV_SETUP) $(TOOL_VBoxXcode62_AS) -c\
|
---|
[97991] | 367 | $(flags) $(qaddprefix sh,-I, $(incs)) $(qaddprefix sh,-D, $(defs))\
|
---|
[63437] | 368 | -Wp,-MD,$(dep) -Wp,-MP\
|
---|
[60968] | 369 | -o $(obj)\
|
---|
| 370 | $(abspath $(source))
|
---|
[63437] | 371 | %$(QUIET)$(APPEND) -n "$(dep)" "" "$(source):" ""
|
---|
[60968] | 372 | endef
|
---|
| 373 |
|
---|
| 374 |
|
---|
| 375 | ## Link library
|
---|
| 376 | # @param $(target) Normalized main target name.
|
---|
| 377 | # @param $(out) Library name.
|
---|
| 378 | # @param $(objs) Object files to put in the library.
|
---|
| 379 | # @param $(flags) Flags.
|
---|
| 380 | # @param $(dirdep) Directory creation dependency.
|
---|
| 381 | # @param $(deps) Other dependencies.
|
---|
| 382 | # @param $(othersrc) Unhandled sources.
|
---|
| 383 | # @param $(outbase) Output basename (full). Use this for list files and such.
|
---|
| 384 | TOOL_VBoxXcode62_LINK_LIBRARY_OUTPUT =
|
---|
| 385 | TOOL_VBoxXcode62_LINK_LIBRARY_DEPEND = $(othersrc)
|
---|
| 386 | TOOL_VBoxXcode62_LINK_LIBRARY_DEPORD =
|
---|
| 387 | define TOOL_VBoxXcode62_LINK_LIBRARY_CMDS
|
---|
| 388 | $(if $(strip $(objs)),$(call xargs,$(QUIET)$(TOOL_VBoxXcode62_ENV_SETUP) $(TOOL_VBoxXcode62_AR) $(flags) $(out),$(objs)))
|
---|
| 389 | $(foreach lib,$(othersrc)\
|
---|
| 390 | ,$(NL)$(TAB)$(call MSG_AR_MERGE,$(target),$(out),$(lib)) \
|
---|
| 391 | $(NL)$(TAB)$(QUIET)$(RM_EXT) -f $(dir $(outbase))ar.tmp.dir/* \
|
---|
| 392 | $(NL)$(TAB)$(QUIET)$(MKDIR) -p $(dir $(outbase))/ar.tmp.dir/ \
|
---|
| 393 | $(NL)$(TAB)$(QUIET)(cd $(dir $(outbase))ar.tmp.dir/ \
|
---|
[68770] | 394 | && $(TOOL_VBoxXcode62_ENV_SETUP_EXT) $(TOOL_VBoxXcode62_AR) -x $(abspath $(lib)) \
|
---|
[60968] | 395 | && $(RM_EXT) -f ./__.SYMDEF* \
|
---|
[68770] | 396 | && $(TOOL_VBoxXcode62_ENV_SETUP_EXT) $(TOOL_VBoxXcode62_AR) $(flags) $(out) *) \
|
---|
[60968] | 397 | $(NL)$(TAB)$(QUIET)$(RM_EXT) -f $(dir $(outbase))/ar.tmp.dir/* \
|
---|
| 398 | $(NL)$(TAB)$(QUIET)$(RMDIR) $(dir $(outbase))ar.tmp.dir/)
|
---|
| 399 | endef
|
---|
| 400 |
|
---|
| 401 |
|
---|
| 402 | ## Link program
|
---|
| 403 | # @param $(target) Normalized main target name.
|
---|
| 404 | # @param $(out) Program name.
|
---|
| 405 | # @param $(objs) Object files to link together.
|
---|
| 406 | # @param $(libs) Libraries to search.
|
---|
| 407 | # @param $(libpath) Library search paths.
|
---|
| 408 | # @param $(flags) Flags.
|
---|
| 409 | # @param $(dirdep) Directory creation dependency.
|
---|
| 410 | # @param $(deps) Other dependencies.
|
---|
| 411 | # @param $(othersrc) Unhandled sources.
|
---|
| 412 | # @param $(custom_pre) Custom step invoked before linking.
|
---|
| 413 | # @param $(custom_post) Custom step invoked after linking.
|
---|
| 414 | # @param $(outbase) Output basename (full). Use this for list files and such.
|
---|
| 415 | TOOL_VBoxXcode62_LINK_PROGRAM_OUTPUT = $(outbase).rsp
|
---|
| 416 | TOOL_VBoxXcode62_LINK_PROGRAM_OUTPUT_DEBUG = $(call TOOL_VBoxXcode62_DEBUG_BUNDLE_FN,$(out))
|
---|
| 417 | TOOL_VBoxXcode62_LINK_PROGRAM_DEBUG_INSTALL_FN = $(TOOL_VBoxXcode62_DEBUG_INSTALL_FN)
|
---|
| 418 | TOOL_VBoxXcode62_LINK_PROGRAM_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib)))
|
---|
| 419 | TOOL_VBoxXcode62_LINK_PROGRAM_DEPORD =
|
---|
| 420 | define TOOL_VBoxXcode62_LINK_PROGRAM_CMDS
|
---|
| 421 | $(QUIET)$(APPEND) -n $(outbase).rsp $(objs)
|
---|
| 422 | $(QUIET)$(TOOL_VBoxXcode62_ENV_SETUP) $(TOOL_VBoxXcode62_LD) $(flags) -o $(out)\
|
---|
| 423 | -filelist $(outbase).rsp\
|
---|
| 424 | $(foreach p,$(libpath), -L$(p))\
|
---|
| 425 | $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))
|
---|
| 426 | ifeq ($(ld_debug),split)
|
---|
| 427 | $(QUIET)$(TOOL_VBoxXcode62_ENV_SETUP) $(TOOL_VBoxXcode62_DSYMUTIL) -o $(out).dSYM/ $(out)
|
---|
| 428 | $(QUIET)$(TOOL_VBoxXcode62_ENV_SETUP) $(TOOL_VBoxXcode62_STRIP_PROGRAM) $(out)
|
---|
| 429 | endif
|
---|
| 430 | endef
|
---|
| 431 |
|
---|
| 432 |
|
---|
| 433 | ## Link DLL
|
---|
| 434 | # @param $(target) Normalized main target name.
|
---|
| 435 | # @param $(out) Program name.
|
---|
| 436 | # @param $(objs) Object files to link together.
|
---|
| 437 | # @param $(libs) Libraries to search.
|
---|
| 438 | # @param $(libpath) Library search paths.
|
---|
| 439 | # @param $(flags) Flags.
|
---|
| 440 | # @param $(dirdep) Directory creation dependency.
|
---|
| 441 | # @param $(deps) Other dependencies.
|
---|
| 442 | # @param $(othersrc) Unhandled sources.
|
---|
| 443 | # @param $(custom_pre) Custom step invoked before linking.
|
---|
| 444 | # @param $(custom_post) Custom step invoked after linking.
|
---|
| 445 | # @param $(outbase) Output basename (full). Use this for list files and such.
|
---|
| 446 | TOOL_VBoxXcode62_LINK_DLL_OUTPUT = $(outbase).rsp
|
---|
| 447 | TOOL_VBoxXcode62_LINK_DLL_OUTPUT_DEBUG = $(call TOOL_VBoxXcode62_DEBUG_BUNDLE_FN,$(out))
|
---|
| 448 | TOOL_VBoxXcode62_LINK_DLL_DEBUG_INSTALL_FN = $(TOOL_VBoxXcode62_DEBUG_INSTALL_FN)
|
---|
| 449 | TOOL_VBoxXcode62_LINK_DLL_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib)))
|
---|
| 450 | TOOL_VBoxXcode62_LINK_DLL_DEPORD =
|
---|
| 451 | define TOOL_VBoxXcode62_LINK_DLL_CMDS
|
---|
| 452 | $(QUIET)$(APPEND) -n $(outbase).rsp $(objs)
|
---|
| 453 | $(QUIET)$(TOOL_VBoxXcode62_ENV_SETUP) $(TOOL_VBoxXcode62_LD) $(TOOL_VBoxXcode62_LDFLAGS.dll) $(flags) -o $(out)\
|
---|
| 454 | $(call TOOL_VBoxXcode62_LD_SONAME,$(target),$(out))\
|
---|
| 455 | -filelist $(outbase).rsp\
|
---|
| 456 | $(foreach p,$(libpath), -L$(p))\
|
---|
| 457 | $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))
|
---|
| 458 | ifeq ($(ld_debug),split)
|
---|
| 459 | $(QUIET)$(TOOL_VBoxXcode62_ENV_SETUP) $(TOOL_VBoxXcode62_DSYMUTIL) -o $(out).dSYM/ $(out)
|
---|
| 460 | $(QUIET)$(TOOL_VBoxXcode62_ENV_SETUP) $(TOOL_VBoxXcode62_STRIP_DLL) $(out)
|
---|
| 461 | endif
|
---|
| 462 | endef
|
---|
| 463 |
|
---|
| 464 |
|
---|
| 465 | ## Link system module (windows aka driver, linux aka kernel module)
|
---|
| 466 | # @param $(target) Normalized main target name.
|
---|
| 467 | # @param $(out) System module name.
|
---|
| 468 | # @param $(objs) Object files to link together.
|
---|
| 469 | # @param $(libs) Libraries to search.
|
---|
| 470 | # @param $(libpath) Library search paths.
|
---|
| 471 | # @param $(flags) Flags.
|
---|
| 472 | # @param $(dirdep) Directory creation dependency.
|
---|
| 473 | # @param $(deps) Other dependencies.
|
---|
| 474 | # @param $(othersrc) Unhandled sources.
|
---|
| 475 | # @param $(custom_pre) Custom step invoked before linking.
|
---|
| 476 | # @param $(custom_post) Custom step invoked after linking.
|
---|
| 477 | # @param $(outbase) Output basename (full). Use this for list files and such.
|
---|
| 478 | TOOL_VBoxXcode62_LINK_SYSMOD_OUTPUT = $(outbase).rsp
|
---|
| 479 | TOOL_VBoxXcode62_LINK_SYSMOD_OUTPUT_DEBUG = $(call TOOL_VBoxXcode62_DEBUG_BUNDLE_FN,$(out))
|
---|
| 480 | TOOL_VBoxXcode62_LINK_SYSMOD_DEBUG_INSTALL_FN = $(TOOL_VBoxXcode62_DEBUG_INSTALL_FN)
|
---|
| 481 | TOOL_VBoxXcode62_LINK_SYSMOD_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib)))
|
---|
| 482 | TOOL_VBoxXcode62_LINK_SYSMOD_DEPORD =
|
---|
| 483 | define TOOL_VBoxXcode62_LINK_SYSMOD_CMDS
|
---|
| 484 | $(QUIET)$(APPEND) -n $(outbase).rsp $(objs)
|
---|
| 485 | $(QUIET)$(TOOL_VBoxXcode62_ENV_SETUP) $(TOOL_VBoxXcode62_LD_SYSMOD) $(TOOL_VBoxXcode62_LDFLAGS.sysmod) $(flags) -o $(out)\
|
---|
| 486 | -filelist $(outbase).rsp\
|
---|
| 487 | $(foreach p,$(libpath), -L$(p))\
|
---|
| 488 | $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))
|
---|
| 489 | ifeq ($(ld_debug),split)
|
---|
| 490 | $(QUIET)$(TOOL_VBoxXcode62_ENV_SETUP) $(TOOL_VBoxXcode62_DSYMUTIL) -o $(out).dSYM/ $(out)
|
---|
| 491 | $(QUIET)$(TOOL_VBoxXcode62_ENV_SETUP) $(TOOL_VBoxXcode62_STRIP_SYSMOD) $(out)
|
---|
| 492 | endif
|
---|
| 493 | endef
|
---|
| 494 |
|
---|