1 $(eval $(call import.MODULE.defs,MACOSX,macosx))
2 $(eval $(call import.GCC,MACOSX))
4 MACOSX.src/ = $(SRC/)macosx/
5 MACOSX.build/ = $(BUILD/)macosx/
7 MACOSX.m4.in = $(wildcard $(MACOSX.src/)*.m4)
8 MACOSX.m4.out = $(MACOSX.m4.in:$(MACOSX.src/)%.m4=$(MACOSX.build/)%)
10 ## optional special command to run post macro processing
11 MACOSX.m4.post.Info.h = $(RM.exe) -f $(MACOSX.build/)HandBrake.build/Preprocessed-Info.plist
13 MACOSX.targs = HandBrakeCLI HandBrake
15 ## configuration pattern: (standard|debug)[.ARCH]
16 ## eg. for native build, no debug --> standard
17 ## eg. for x86_64 build with debug of any level --> debug.x86_64
18 MACOSX.conf = $(MACOSX.map.g.$(MACOSX.GCC.g)).$(BUILD.arch)
20 ## this is a mapping to determine which basename config to use in xcodeproj
21 MACOSX.map.g.none = standard
22 MACOSX.map.g.min = debug
23 MACOSX.map.g.std = debug
24 MACOSX.map.g.max = debug
26 ###############################################################################
28 BUILD.out += $(MACOSX.m4.out)
29 BUILD.out += $(MACOSX.m4.wc.out)
31 ###############################################################################
33 MACOSX.XCODE.exe = xcodebuild
34 MACOSX.XCODE.project = HandBrake.xcodeproj
36 ## launch a build thru xcode; which in turn will do a nested make against
37 ## this build system with normal build rules enabled.
39 ## $(1) = list of targets
40 ## $(2) = list of goals to shunt thru xcodebuild->make
42 XCODE.sysroot = $(foreach sdk,$(GCC.sysroot),-sdk $(sdk))
43 MACOSX.XCODE = $(strip \
44 cd $(MACOSX.src/) && \
46 -project $(MACOSX.XCODE.project) \
47 -configuration $(MACOSX.conf) \
49 $(foreach t,$(1),-target $t) \
50 EXTERNAL_SRC='$(XCODE.external.src)' \
51 EXTERNAL_BUILD='$(XCODE.external.build)' \
52 EXTERNAL_PREFIX='$(XCODE.external.prefix)' \
53 EXTERNAL_JOBS='$(BUILD.jobs)' \
54 EXTERNAL_METHOD='$(CONF.method)' \
55 EXTERNAL_CONFARGS='$(CONF.args)' \
56 EXTERNAL_GOALS='$(3)' \
57 EXTERNAL_VARS='$(-*-command-variables-*-)' \