summaryrefslogtreecommitdiffstats
path: root/macosx/module.defs
blob: d92160f93d9b028b1a8218e910a55d2a8c923db8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
$(eval $(call import.MODULE.defs,MACOSX,macosx))
$(eval $(call import.GCC,MACOSX))

MACOSX.src/   = $(SRC/)macosx/
MACOSX.build/ = $(BUILD/)macosx/

MACOSX.m4.in  = $(wildcard $(MACOSX.src/)*.m4)
MACOSX.m4.out = $(MACOSX.m4.in:$(MACOSX.src/)%.m4=$(MACOSX.build/)%)

## optional special command to run post macro processing
MACOSX.m4.post.Info.h = $(RM.exe) -f $(MACOSX.build/)HandBrake.build/Preprocessed-Info.plist

MACOSX.targs = HandBrakeCLI HandBrake

## configuration pattern: (standard|debug)[.ARCH]
## eg. for native build, no debug --> standard
## eg. for x86_64 build with debug of any level --> debug.x86_64
MACOSX.conf  = $(MACOSX.map.g.$(MACOSX.GCC.g)).$(BUILD.arch)

## this is a mapping to determine which basename config to use in xcodeproj
MACOSX.map.g.none = standard
MACOSX.map.g.min  = debug
MACOSX.map.g.std  = debug
MACOSX.map.g.max  = debug

###############################################################################

BUILD.out += $(MACOSX.m4.out)
BUILD.out += $(MACOSX.m4.wc.out)

###############################################################################

MACOSX.XCODE.exe     = xcodebuild
MACOSX.XCODE.project = HandBrake.xcodeproj

## launch a build thru xcode; which in turn will do a nested make against
## this build system with normal build rules enabled.
##
## $(1) = list of targets
## $(2) = list of goals to shunt thru xcodebuild->make
##
XCODE.sysroot = $(foreach sdk,$(GCC.sysroot),-sdk $(sdk))
MACOSX.XCODE = $(strip \
    cd $(MACOSX.src/) && \
	$(MACOSX.XCODE.exe) \
        -project $(MACOSX.XCODE.project) \
        -configuration $(MACOSX.conf) \
	$(XCODE.sysroot) \
        $(foreach t,$(1),-target $t) \
        EXTERNAL_SRC='$(XCODE.external.src)' \
        EXTERNAL_BUILD='$(XCODE.external.build)' \
        EXTERNAL_PREFIX='$(XCODE.external.prefix)' \
        EXTERNAL_JOBS='$(BUILD.jobs)' \
        EXTERNAL_METHOD='$(CONF.method)' \
        EXTERNAL_CONFARGS='$(CONF.args)' \
        EXTERNAL_GOALS='$(3)' \
        EXTERNAL_VARS='$(-*-command-variables-*-)' \
        $(2) )