5 ## 1. Perform a build (let us call it arch-X).
6 ## 2. cd into arch-X's build/ driectory.
7 ## 3. Launch builds of the remaining architectures.
8 ## We compute $(UB.archs.other) to be the remaining archs to build.
9 ## The entire list is defined $(UB.archs) .
10 ## 4. Combine other architectures into arch-X's binaries.
12 ## EXAMPLE: serial method, archs: i386,x86_64,ppc,ppc64
14 ## ./configure --launch
16 ## make ub.build.serial
19 ## EXAMPLE: parallel method, archs: i386,x86_64,ppc,ppc64
21 ## ./configure --launch
23 ## make ub.build.parallel
26 ## EXAMPLE: serial, archs: i386,x86_64 (assuming i386 is native)
28 ## ./configure --launch
30 ## make ub.build.parallel UB.archs="i386 x86_64"
31 ## make ub.combine UB.archs="i386 x86_64"
33 UB.archs = i386 x86_64 ppc ppc64
34 UB.archs.other = $(filter-out $(BUILD.arch),$(UB.archs))
35 UB.builds = $(wildcard $(foreach n,$(UB.archs.other),$(PROJECT/)build.$n))
37 UB.BUILD = $(PROJECT/)configure --launch --launch-dir=ub.$(1) --arch=$(1)
39 ## linefeed is important
45 define UB.BUILD.SERIAL
46 $(foreach n,$(UB.archs.other),$(call UB.BUILD.item,$n))
49 define UB.BUILD.PARALLEL
50 $(call UB.BUILD,$(1)) 2>&1 > ub.$(1).log
54 $(RM.exe) -fr ub.combine
55 $(MKDIR.exe) -p ub.combine
56 $(CP.exe) -R HandBrake.app ub.combine/.
57 lipo $(1) $(foreach n,$(UB.archs.other),ub.$n/$(1)) -create -output ub.combine/$(1)
59 @sync; lipo -info ub.combine/$(1)
60 @du -sh ub.combine/$(1)