VirtualBox

source: vbox/trunk/tools/kBuildTools/VBoxXcode62.kmk@ 78203

Last change on this file since 78203 was 68770, checked in by vboxsync, 7 years ago

VBoxXcode62: Build fix for new kmk_builtin_redirect command (REDIRECT defaults to this when supported).

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

© 2023 Oracle
ContactPrivacy policyTerms of Use