VirtualBox

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

Last change on this file since 85914 was 85050, checked in by vboxsync, 4 years ago

kBuildTools/VBoxXcode62.kmk: Shut up warnings about duplicate directory creation rules. bugref:9790

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 21.1 KB
Line 
1# $Id: VBoxXcode62.kmk 85050 2020-07-03 09:49:52Z 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/Contents/Info.plist \
141 $(1).dSYM/Contents/Resources/DWARF/$(notdir $(1))
142
143##
144# Calculate the files in the debug bundle.
145# @param 1 The whole linker output filename.
146# @param 2 The linker output filename sans suffix.
147# @param 3 The desired install name (no dir slash).
148# @remarks The Info.plist has some reference to the original name, but gdb
149# does not care and only check for a symbol file in the DWARF
150# directory with the same name as the debugged module.
151TOOL_VBoxXcode62_DEBUG_INSTALL_FN= \
152 $(3).dSYM/ \
153 $(3).dSYM/Contents/ \
154 $(3).dSYM/Contents/Resources/ \
155 $(3).dSYM/Contents/Resources/DWARF/ \
156 $(1).dSYM/Contents/Info.plist=>$(3).dSYM/Contents/Info.plist \
157 $(1).dSYM/Contents/Resources/DWARF/$(notdir $(1))=>$(3).dSYM/Contents/Resources/DWARF/$(notdir $(3))
158
159
160## Compile C source.
161# @param $(target) Normalized main target name.
162# @param $(source) Source filename (relative).
163# @param $(obj) Object file name. This shall be (re)created by the compilation.
164# @param $(dep) Dependcy file. This shall be (re)created by the compilation.
165# @param $(flags) Flags.
166# @param $(defs) Definitions. No -D or something.
167# @param $(incs) Includes. No -I or something.
168# @param $(dirdep) Directory creation dependency.
169# @param $(deps) Other dependencies.
170#
171# @param $(outbase) Output basename (full). Use this for list files and such.
172# @param $(objsuff) Object suffix.
173TOOL_VBoxXcode62_COMPILE_C_DEPEND =
174TOOL_VBoxXcode62_COMPILE_C_DEPORD =
175ifdef KBUILD_USE_KOBJCACHE
176TOOL_VBoxXcode62_COMPILE_C_USES_KOBJCACHE = 1
177TOOL_VBoxXcode62_COMPILE_C_OUTPUT = $(outbase).i
178define TOOL_VBoxXcode62_COMPILE_C_CMDS
179 $(QUIET)$(TOOL_VBoxXcode62_ENV_SETUP) $(KOBJCACHE) -f $(outbase).koc -d $(PATH_OBJCACHE) -t $(bld_trg).$(bld_trg_arch) -p\
180 --kObjCache-cpp $(outbase).i\
181 $(TOOL_VBoxXcode62_CC) -E -o -\
182 $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
183 -Wp,-MD,$(dep) -Wp,-MP\
184 $(abspath $(source))\
185 --kObjCache-cc $(obj)\
186 $(TOOL_VBoxXcode62_CC) -c\
187 $(flags) -x c\
188 -o $(obj)\
189 -
190 %$(QUIET)$(APPEND) -n "$(dep)" "" "$(source):" ""
191endef
192else # !KBUILD_USE_KOBJCACHE
193TOOL_VBoxXcode62_COMPILE_C_OUTPUT =
194define TOOL_VBoxXcode62_COMPILE_C_CMDS
195 $(QUIET)$(TOOL_VBoxXcode62_ENV_SETUP) $(TOOL_VBoxXcode62_CC) -c\
196 $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
197 -Wp,-MD,$(dep) -Wp,-MP\
198 -o $(obj)\
199 $(abspath $(source))
200 %$(QUIET)$(APPEND) -n "$(dep)" "" "$(source):" ""
201endef
202endif # !KUSE_OBJCACHE
203
204
205## Compile C++ source.
206# @param $(target) Normalized main target name.
207# @param $(source) Source filename (relative).
208# @param $(obj) Object file name. This shall be (re)created by the compilation.
209# @param $(dep) Dependcy file. This shall be (re)created by the compilation.
210# @param $(flags) Flags.
211# @param $(defs) Definitions. No -D or something.
212# @param $(incs) Includes. No -I or something.
213# @param $(dirdep) Directory creation dependency.
214# @param $(deps) Other dependencies.
215# @param $(outbase) Output basename (full). Use this for list files and such.
216# @param $(objsuff) Object suffix.
217TOOL_VBoxXcode62_COMPILE_CXX_DEPEND =
218TOOL_VBoxXcode62_COMPILE_CXX_DEPORD =
219ifdef KBUILD_USE_KOBJCACHE
220TOOL_VBoxXcode62_COMPILE_CXX_USES_KOBJCACHE = 1
221TOOL_VBoxXcode62_COMPILE_CXX_OUTPUT = $(outbase).ii
222define TOOL_VBoxXcode62_COMPILE_CXX_CMDS
223 $(QUIET)$(TOOL_VBoxXcode62_ENV_SETUP) $(KOBJCACHE) -f $(outbase).koc -d $(PATH_OBJCACHE) -t $(bld_trg).$(bld_trg_arch) -p\
224 --kObjCache-cpp $(outbase).ii\
225 $(TOOL_VBoxXcode62_CXX) -E -o -\
226 $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
227 -Wp,-MD,$(dep)\
228 -Wp,-MP\
229 $(abspath $(source))\
230 --kObjCache-cc $(obj)\
231 $(TOOL_VBoxXcode62_CXX) -c\
232 $(flags) -x c++\
233 -o $(obj)\
234 -
235 %$(QUIET)$(APPEND) -n "$(dep)" "" "$(source):" ""
236endef
237else # !KBUILD_USE_KOBJCACHE
238TOOL_VBoxXcode62_COMPILE_CXX_OUTPUT =
239define TOOL_VBoxXcode62_COMPILE_CXX_CMDS
240 $(QUIET)$(TOOL_VBoxXcode62_ENV_SETUP) $(TOOL_VBoxXcode62_CXX) -c\
241 $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
242 -Wp,-MD,$(dep)\
243 -Wp,-MP\
244 -o $(obj)\
245 $(abspath $(source))
246 %$(QUIET)$(APPEND) -n "$(dep)" "" "$(source):" ""
247endef
248endif # !KBUILD_USE_KOBJCACHE
249
250
251## Compile Objective-C source.
252# @param $(target) Normalized main target name.
253# @param $(source) Source filename (relative).
254# @param $(obj) Object file name. This shall be (re)created by the compilation.
255# @param $(dep) Dependcy file. This shall be (re)created by the compilation.
256# @param $(flags) Flags.
257# @param $(defs) Definitions. No -D or something.
258# @param $(incs) Includes. No -I or something.
259# @param $(dirdep) Directory creation dependency.
260# @param $(deps) Other dependencies.
261# @param $(outbase) Output basename (full). Use this for list files and such.
262# @param $(objsuff) Object suffix.
263TOOL_VBoxXcode62_COMPILE_OBJC_DEPEND =
264TOOL_VBoxXcode62_COMPILE_OBJC_DEPORD =
265ifdef KBUILD_USE_KOBJCACHE
266TOOL_VBoxXcode62_COMPILE_OBJC_USES_KOBJCACHE = 1
267TOOL_VBoxXcode62_COMPILE_OBJC_OUTPUT = $(outbase).mi
268define TOOL_VBoxXcode62_COMPILE_OBJC_CMDS
269 $(QUIET)$(TOOL_VBoxXcode62_ENV_SETUP) $(KOBJCACHE) -f $(outbase).koc -d $(PATH_OBJCACHE) -t $(bld_trg).$(bld_trg_arch) -p\
270 --kObjCache-cpp $(outbase).ii\
271 $(TOOL_VBoxXcode62_OBJC) -E -o -\
272 $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
273 -Wp,-MD,$(dep) -Wp,-MP\
274 $(abspath $(source))\
275 --kObjCache-cc $(obj)\
276 $(TOOL_VBoxXcode62_OBJC) -c\
277 $(flags) -x objective-c \
278 -o $(obj)\
279 -
280 %$(QUIET)$(APPEND) -n "$(dep)" "" "$(source):" ""
281endef
282else # !KBUILD_USE_KOBJCACHE
283TOOL_VBoxXcode62_COMPILE_OBJC_OUTPUT =
284define TOOL_VBoxXcode62_COMPILE_OBJC_CMDS
285 $(QUIET)$(TOOL_VBoxXcode62_ENV_SETUP) $(TOOL_VBoxXcode62_OBJC) -c\
286 $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
287 -Wp,-MD,$(dep) -Wp,-MP\
288 -o $(obj)\
289 $(abspath $(source))
290 %$(QUIET)$(APPEND) -n "$(dep)" "" "$(source):" ""
291endef
292endif # !KBUILD_USE_KOBJCACHE
293
294
295## Compile Objective-C++ source.
296# @param $(target) Normalized main target name.
297# @param $(source) Source filename (relative).
298# @param $(obj) Object file name. This shall be (re)created by the compilation.
299# @param $(dep) Dependcy file. This shall be (re)created by the compilation.
300# @param $(flags) Flags.
301# @param $(defs) Definitions. No -D or something.
302# @param $(incs) Includes. No -I or something.
303# @param $(dirdep) Directory creation dependency.
304# @param $(deps) Other dependencies.
305# @param $(outbase) Output basename (full). Use this for list files and such.
306# @param $(objsuff) Object suffix.
307TOOL_VBoxXcode62_COMPILE_OBJCXX_DEPEND =
308TOOL_VBoxXcode62_COMPILE_OBJCXX_DEPORD =
309ifdef KBUILD_USE_KOBJCACHE
310TOOL_VBoxXcode62_COMPILE_OBJCXX_USES_KOBJCACHE = 1
311TOOL_VBoxXcode62_COMPILE_OBJCXX_OUTPUT = $(outbase).mii
312define TOOL_VBoxXcode62_COMPILE_OBJCXX_CMDS
313 $(QUIET)$(TOOL_VBoxXcode62_ENV_SETUP) $(KOBJCACHE) -f $(outbase).koc -d $(PATH_OBJCACHE) -t $(bld_trg).$(bld_trg_arch) -p\
314 --kObjCache-cpp $(outbase).mii\
315 $(TOOL_VBoxXcode62_OBJCXX) -E -o -\
316 $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
317 -Wp,-MD,$(dep) -Wp,-MP\
318 $(abspath $(source))\
319 --kObjCache-cc $(obj)\
320 $(TOOL_VBoxXcode62_OBJCXX) -c\
321 $(flags) -x objective-c++ \
322 -o $(obj)\
323 -
324 %$(QUIET)$(APPEND) -n "$(dep)" "" "$(source):" ""
325endef
326else # !KBUILD_USE_KOBJCACHE
327TOOL_VBoxXcode62_COMPILE_OBJCXX_OUTPUT =
328define TOOL_VBoxXcode62_COMPILE_OBJCXX_CMDS
329 $(QUIET)$(TOOL_VBoxXcode62_ENV_SETUP) $(TOOL_VBoxXcode62_OBJCXX) -c\
330 $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
331 -Wp,-MD,$(dep) -Wp,-MP\
332 -o $(obj)\
333 $(abspath $(source))
334 %$(QUIET)$(APPEND) -n "$(dep)" "" "$(source):" ""
335endef
336endif # !KBUILD_USE_KOBJCACHE
337
338
339## Compile Assembly source.
340# @param $(target) Normalized main target name.
341# @param $(source) Source filename (relative).
342# @param $(obj) Object file name. This shall be (re)created by the compilation.
343# @param $(dep) Dependcy file. This shall be (re)created by the compilation.
344# @param $(flags) Flags.
345# @param $(defs) Definitions. No -D or something.
346# @param $(incs) Includes. No -I or something.
347# @param $(dirdep) Directory creation dependency.
348# @param $(deps) Other dependencies.
349# @param $(outbase) Output basename (full). Use this for list files and such.
350# @param $(objsuff) Object suffix.
351#
352TOOL_VBoxXcode62_COMPILE_AS_OUTPUT =
353TOOL_VBoxXcode62_COMPILE_AS_DEPEND =
354TOOL_VBoxXcode62_COMPILE_AS_DEPORD =
355define TOOL_VBoxXcode62_COMPILE_AS_CMDS
356 $(QUIET)$(TOOL_VBoxXcode62_ENV_SETUP) $(TOOL_VBoxXcode62_AS) -c\
357 $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
358 -Wp,-MD,$(dep) -Wp,-MP\
359 -o $(obj)\
360 $(abspath $(source))
361 %$(QUIET)$(APPEND) -n "$(dep)" "" "$(source):" ""
362endef
363
364
365## Link library
366# @param $(target) Normalized main target name.
367# @param $(out) Library name.
368# @param $(objs) Object files to put in the library.
369# @param $(flags) Flags.
370# @param $(dirdep) Directory creation dependency.
371# @param $(deps) Other dependencies.
372# @param $(othersrc) Unhandled sources.
373# @param $(outbase) Output basename (full). Use this for list files and such.
374TOOL_VBoxXcode62_LINK_LIBRARY_OUTPUT =
375TOOL_VBoxXcode62_LINK_LIBRARY_DEPEND = $(othersrc)
376TOOL_VBoxXcode62_LINK_LIBRARY_DEPORD =
377define TOOL_VBoxXcode62_LINK_LIBRARY_CMDS
378 $(if $(strip $(objs)),$(call xargs,$(QUIET)$(TOOL_VBoxXcode62_ENV_SETUP) $(TOOL_VBoxXcode62_AR) $(flags) $(out),$(objs)))
379 $(foreach lib,$(othersrc)\
380 ,$(NL)$(TAB)$(call MSG_AR_MERGE,$(target),$(out),$(lib)) \
381 $(NL)$(TAB)$(QUIET)$(RM_EXT) -f $(dir $(outbase))ar.tmp.dir/* \
382 $(NL)$(TAB)$(QUIET)$(MKDIR) -p $(dir $(outbase))/ar.tmp.dir/ \
383 $(NL)$(TAB)$(QUIET)(cd $(dir $(outbase))ar.tmp.dir/ \
384 && $(TOOL_VBoxXcode62_ENV_SETUP_EXT) $(TOOL_VBoxXcode62_AR) -x $(abspath $(lib)) \
385 && $(RM_EXT) -f ./__.SYMDEF* \
386 && $(TOOL_VBoxXcode62_ENV_SETUP_EXT) $(TOOL_VBoxXcode62_AR) $(flags) $(out) *) \
387 $(NL)$(TAB)$(QUIET)$(RM_EXT) -f $(dir $(outbase))/ar.tmp.dir/* \
388 $(NL)$(TAB)$(QUIET)$(RMDIR) $(dir $(outbase))ar.tmp.dir/)
389endef
390
391
392## Link program
393# @param $(target) Normalized main target name.
394# @param $(out) Program name.
395# @param $(objs) Object files to link together.
396# @param $(libs) Libraries to search.
397# @param $(libpath) Library search paths.
398# @param $(flags) Flags.
399# @param $(dirdep) Directory creation dependency.
400# @param $(deps) Other dependencies.
401# @param $(othersrc) Unhandled sources.
402# @param $(custom_pre) Custom step invoked before linking.
403# @param $(custom_post) Custom step invoked after linking.
404# @param $(outbase) Output basename (full). Use this for list files and such.
405TOOL_VBoxXcode62_LINK_PROGRAM_OUTPUT = $(outbase).rsp
406TOOL_VBoxXcode62_LINK_PROGRAM_OUTPUT_DEBUG = $(call TOOL_VBoxXcode62_DEBUG_BUNDLE_FN,$(out))
407TOOL_VBoxXcode62_LINK_PROGRAM_DEBUG_INSTALL_FN = $(TOOL_VBoxXcode62_DEBUG_INSTALL_FN)
408TOOL_VBoxXcode62_LINK_PROGRAM_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib)))
409TOOL_VBoxXcode62_LINK_PROGRAM_DEPORD =
410define TOOL_VBoxXcode62_LINK_PROGRAM_CMDS
411 $(QUIET)$(APPEND) -n $(outbase).rsp $(objs)
412 $(QUIET)$(TOOL_VBoxXcode62_ENV_SETUP) $(TOOL_VBoxXcode62_LD) $(flags) -o $(out)\
413 -filelist $(outbase).rsp\
414 $(foreach p,$(libpath), -L$(p))\
415 $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))
416 ifeq ($(ld_debug),split)
417 $(QUIET)$(TOOL_VBoxXcode62_ENV_SETUP) $(TOOL_VBoxXcode62_DSYMUTIL) -o $(out).dSYM/ $(out)
418 $(QUIET)$(TOOL_VBoxXcode62_ENV_SETUP) $(TOOL_VBoxXcode62_STRIP_PROGRAM) $(out)
419 endif
420endef
421
422
423## Link DLL
424# @param $(target) Normalized main target name.
425# @param $(out) Program name.
426# @param $(objs) Object files to link together.
427# @param $(libs) Libraries to search.
428# @param $(libpath) Library search paths.
429# @param $(flags) Flags.
430# @param $(dirdep) Directory creation dependency.
431# @param $(deps) Other dependencies.
432# @param $(othersrc) Unhandled sources.
433# @param $(custom_pre) Custom step invoked before linking.
434# @param $(custom_post) Custom step invoked after linking.
435# @param $(outbase) Output basename (full). Use this for list files and such.
436TOOL_VBoxXcode62_LINK_DLL_OUTPUT = $(outbase).rsp
437TOOL_VBoxXcode62_LINK_DLL_OUTPUT_DEBUG = $(call TOOL_VBoxXcode62_DEBUG_BUNDLE_FN,$(out))
438TOOL_VBoxXcode62_LINK_DLL_DEBUG_INSTALL_FN = $(TOOL_VBoxXcode62_DEBUG_INSTALL_FN)
439TOOL_VBoxXcode62_LINK_DLL_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib)))
440TOOL_VBoxXcode62_LINK_DLL_DEPORD =
441define TOOL_VBoxXcode62_LINK_DLL_CMDS
442 $(QUIET)$(APPEND) -n $(outbase).rsp $(objs)
443 $(QUIET)$(TOOL_VBoxXcode62_ENV_SETUP) $(TOOL_VBoxXcode62_LD) $(TOOL_VBoxXcode62_LDFLAGS.dll) $(flags) -o $(out)\
444 $(call TOOL_VBoxXcode62_LD_SONAME,$(target),$(out))\
445 -filelist $(outbase).rsp\
446 $(foreach p,$(libpath), -L$(p))\
447 $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))
448 ifeq ($(ld_debug),split)
449 $(QUIET)$(TOOL_VBoxXcode62_ENV_SETUP) $(TOOL_VBoxXcode62_DSYMUTIL) -o $(out).dSYM/ $(out)
450 $(QUIET)$(TOOL_VBoxXcode62_ENV_SETUP) $(TOOL_VBoxXcode62_STRIP_DLL) $(out)
451 endif
452endef
453
454
455## Link system module (windows aka driver, linux aka kernel module)
456# @param $(target) Normalized main target name.
457# @param $(out) System module name.
458# @param $(objs) Object files to link together.
459# @param $(libs) Libraries to search.
460# @param $(libpath) Library search paths.
461# @param $(flags) Flags.
462# @param $(dirdep) Directory creation dependency.
463# @param $(deps) Other dependencies.
464# @param $(othersrc) Unhandled sources.
465# @param $(custom_pre) Custom step invoked before linking.
466# @param $(custom_post) Custom step invoked after linking.
467# @param $(outbase) Output basename (full). Use this for list files and such.
468TOOL_VBoxXcode62_LINK_SYSMOD_OUTPUT = $(outbase).rsp
469TOOL_VBoxXcode62_LINK_SYSMOD_OUTPUT_DEBUG = $(call TOOL_VBoxXcode62_DEBUG_BUNDLE_FN,$(out))
470TOOL_VBoxXcode62_LINK_SYSMOD_DEBUG_INSTALL_FN = $(TOOL_VBoxXcode62_DEBUG_INSTALL_FN)
471TOOL_VBoxXcode62_LINK_SYSMOD_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib)))
472TOOL_VBoxXcode62_LINK_SYSMOD_DEPORD =
473define TOOL_VBoxXcode62_LINK_SYSMOD_CMDS
474 $(QUIET)$(APPEND) -n $(outbase).rsp $(objs)
475 $(QUIET)$(TOOL_VBoxXcode62_ENV_SETUP) $(TOOL_VBoxXcode62_LD_SYSMOD) $(TOOL_VBoxXcode62_LDFLAGS.sysmod) $(flags) -o $(out)\
476 -filelist $(outbase).rsp\
477 $(foreach p,$(libpath), -L$(p))\
478 $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))
479 ifeq ($(ld_debug),split)
480 $(QUIET)$(TOOL_VBoxXcode62_ENV_SETUP) $(TOOL_VBoxXcode62_DSYMUTIL) -o $(out).dSYM/ $(out)
481 $(QUIET)$(TOOL_VBoxXcode62_ENV_SETUP) $(TOOL_VBoxXcode62_STRIP_SYSMOD) $(out)
482 endif
483endef
484
485
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette