1 UB.archs = i386 x86_64 ppc ppc64
2 UB.builds = $(wildcard $(foreach n,$(UB.archs),$(SRC/)build.$n))
3 UB.first = $(word 1,$(UB.archs))
4 UB.other = $(wordlist 2,999,$(UB.archs))
6 UB.BUILD = $(SRC/)configure --force --build=ub.$(1) --arch=$(1) --launch --launch-quiet
8 ## linefeed is important
10 $(call UB.BUILD,$(1)) --launch-jobs=0
14 define UB.BUILD.SERIAL
15 $(foreach n,$(UB.archs),$(call UB.BUILD.item,$n))
18 define UB.BUILD.PARALLEL
19 $(call UB.BUILD,$(1)) >/dev/null 2>&1
23 $(RM.exe) -fr ub.combine
24 $(MKDIR.exe) -p ub.combine
25 $(CP.exe) ub.$(UB.first)/HandBrakeCLI ub.combine/.
26 $(LIPO.exe) $(foreach n,$(UB.archs),ub.$n/HandBrakeCLI) -create -output ub.combine/HandBrakeCLI
27 $(CP.exe) -R ub.$(UB.first)/HandBrake.app ub.combine/.
28 $(LIPO.exe) $(foreach n,$(UB.archs),ub.$n/$(1)) -create -output ub.combine/$(1)
29 @lipo -info ub.combine/$(1)
32 @echo "$@: { $(UB.archs) } combined -> ub.combine/HandBrakeCLI"
33 @echo "$@: UB executable size: `du -sh ub.combine/HandBrakeCLI | awk '{ print $$1 }'`"
35 @echo "$@: { $(UB.archs) } combined -> ub.combine/HandBrake.app"
36 @echo "$@: UB executable size: `du -sh ub.combine/$(1) | awk '{ print $$1 }'`"