summaryrefslogtreecommitdiffstats
path: root/make/variant
diff options
context:
space:
mode:
authorkonablend <[email protected]>2009-03-01 17:03:11 +0000
committerkonablend <[email protected]>2009-03-01 17:03:11 +0000
commit4dbce6b69967c1e14092637aa95b6c31855a81fc (patch)
tree516c17095967698eeb419c70ce72dbd2c11bf754 /make/variant
parentc47939541ccec1e5e57753b16b28baed2613f586 (diff)
BuildSystem: conversion from jam-based to make-based system.
KNOWN ISSUES: 1. OSX + Xcode builds do not support parallel builds; attempting to use them may cause unbounded number of jobs. However, disabling via configure --disable-xcode avoids the issue. 2. OSX ppc binary produces binary which has audio-scan problems. 3. OSX ppc64 binary has not been runtime tested. ADDED: 00-BuildUserGuide.txt contrib/*/module.* doc/ make/ libhb/module.* test/module.* macos/module.* gtk/module.* DROPPED: BUILD BuildContribDarwin.sh DownloadMacOsXContribBinaries.sh Jamfile Jamrules MacOsXContribBinariesVersion.txt Makefile Makefile.config jam libhb/Jamefile libhb/Makefile test/BUILDSHARED test/Makefile contrib/Jamfile contrib/Makefile contrib/patch-ffmpeg.patch contrib/patch-x264-idr.patch contrib/patch-x264-linux.patch RENAMED: contrib/*.patch -> contrib/MODULE/[AP]??-*.patch macosx/HandBrake.plist -> macosx/Info.plist MODIFIED: libhb/decavcodec.c Patched to use cleaner include "libavcodec/audioconvert". Second part to support this cleanup is ffmpeg A02-audioconvert.patch . MODIFIED: libhb/hb.c MODIFIED: libhb/hb.h MODIFIED: libhb/muxmkv.c MODIFIED: libhb/muxmp4.c MODIFIED: libhb/update.c Patched to use "project.h" for project metadata. Renamed HB_BUILD -> HB_PROJECT_BUILD. Renamed HB_VERSION -> HB_PROJECT_VERSION. MODIFIED: test/test.c: Patched HandBrakeCLI to support I/O on Mac OS X ZFS filesystems. Reference r1803 as similar patch for HandBrake.app . Unpatched behavior is crash/buserror when using ZFS. MODIFIED: macosx/Growl.framework/ Upgraded 0.7.6 (i386,ppc) -> 1.1.2 (i386,x86_64,ppc,ppc64). New architectures facilitate x86_64 and ppc64 builds. MODIFIED: macosx/HandBrake.xcodeproj/ Bumped compatibilty mode from 2.4 -> 3.1 . Dumped old configurations Deployment, Developer. Added configurations standard, sebug as replacements. Added standard.i386, standard.x86_64, standard.ppc, standard.ppc64 . for explicit architecture build. All configurations settings cleaned up and normalized. Build output directories adjusted to support new build system. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2180 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'make/variant')
-rw-r--r--make/variant/cygwin.defs8
-rw-r--r--make/variant/darwin.defs61
-rw-r--r--make/variant/darwin.rules20
-rw-r--r--make/variant/darwin.x86_64.defs3
-rw-r--r--make/variant/freebsd.defs4
-rw-r--r--make/variant/linux.defs11
6 files changed, 107 insertions, 0 deletions
diff --git a/make/variant/cygwin.defs b/make/variant/cygwin.defs
new file mode 100644
index 000000000..bab73c6ca
--- /dev/null
+++ b/make/variant/cygwin.defs
@@ -0,0 +1,8 @@
+GCC.muldefs = 1
+GCC.start = 1
+GCC.end = 1
+
+GCC.args.g.none = -g0
+GCC.args.g.min = -g1
+GCC.args.g.default = -g2
+GCC.args.g.max = -g3
diff --git a/make/variant/darwin.defs b/make/variant/darwin.defs
new file mode 100644
index 000000000..6f8f6729d
--- /dev/null
+++ b/make/variant/darwin.defs
@@ -0,0 +1,61 @@
+## UB build support
+##
+## PROCEDURE:
+##
+## 1. Perform a build (let us call it arch-X).
+## 2. cd into arch-X's build/ driectory.
+## 3. Launch builds of the remaining architectures.
+## We compute $(UB.archs.other) to be the remaining archs to build.
+## The entire list is defined $(UB.archs) .
+## 4. Combine other architectures into arch-X's binaries.
+##
+## EXAMPLE: serial method, archs: i386,x86_64,ppc,ppc64
+##
+## ./configure --launch
+## cd build/
+## make ub.build.serial
+## make ub.combine
+##
+## EXAMPLE: parallel method, archs: i386,x86_64,ppc,ppc64
+##
+## ./configure --launch
+## cd build/
+## make ub.build.parallel
+## make ub.combine
+##
+## EXAMPLE: serial, archs: i386,x86_64 (assuming i386 is native)
+##
+## ./configure --launch
+## cd build/
+## make ub.build.parallel UB.archs="i386 x86_64"
+## make ub.combine UB.archs="i386 x86_64"
+##
+UB.archs = i386 x86_64 ppc ppc64
+UB.archs.other = $(filter-out $(BUILD.arch),$(UB.archs))
+UB.builds = $(wildcard $(foreach n,$(UB.archs.other),$(PROJECT/)build.$n))
+
+UB.BUILD = $(PROJECT/)configure --launch --launch-dir=ub.$(1) --arch=$(1)
+
+## linefeed is important
+define UB.BUILD.item
+ $(call UB.BUILD,$(1))
+
+endef
+
+define UB.BUILD.SERIAL
+ $(foreach n,$(UB.archs.other),$(call UB.BUILD.item,$n))
+endef
+
+define UB.BUILD.PARALLEL
+ $(call UB.BUILD,$(1)) 2>&1 > ub.$(1).log
+endef
+
+define UB.COMBINE
+ $(RM.exe) -fr ub.combine
+ $(MKDIR.exe) -p ub.combine
+ $(CP.exe) -R HandBrake.app ub.combine/.
+ lipo $(1) $(foreach n,$(UB.archs.other),ub.$n/$(1)) -create -output ub.combine/$(1)
+ @echo ""
+ @sync; lipo -info ub.combine/$(1)
+ @du -sh ub.combine/$(1)
+endef
diff --git a/make/variant/darwin.rules b/make/variant/darwin.rules
new file mode 100644
index 000000000..c4f4f97a4
--- /dev/null
+++ b/make/variant/darwin.rules
@@ -0,0 +1,20 @@
+.PHONY: ub.build ub.combine ub.clean
+
+ub.build.serial:
+ @$(UB.BUILD.SERIAL)
+
+ub.build.parallel:
+ @set -e; \
+ for arch in $(UB.archs.other); do \
+ $(call UB.BUILD.PARALLEL,$$arch) & \
+ children="$$children $$!"; \
+ echo "pid $$!: $(call UB.BUILD.PARALLEL,$$arch)"; \
+ done; \
+ echo "waiting for background jobs to complete:$$children"; \
+ wait
+
+ub.combine:
+ $(call UB.COMBINE,HandBrake.app/Contents/MacOS/HandBrake)
+
+ub.clean:
+ $(RM.EXE) -fr $(foreach n,$(UB.archs.other),ub.$n)
diff --git a/make/variant/darwin.x86_64.defs b/make/variant/darwin.x86_64.defs
new file mode 100644
index 000000000..c6e856476
--- /dev/null
+++ b/make/variant/darwin.x86_64.defs
@@ -0,0 +1,3 @@
+## can enable asm if we replace .rept pseudo op with standard pre-processor macros
+## since darwin's as doesn't support them. for now just disable.
+LIBTHEORA.CONFIGURE.extra += --disable-asm
diff --git a/make/variant/freebsd.defs b/make/variant/freebsd.defs
new file mode 100644
index 000000000..c58706ba1
--- /dev/null
+++ b/make/variant/freebsd.defs
@@ -0,0 +1,4 @@
+TARGET.dylib.ext = .so
+
+GCC.args.dylib = -shared
+GCC.args.pic = 1
diff --git a/make/variant/linux.defs b/make/variant/linux.defs
new file mode 100644
index 000000000..f0babe87c
--- /dev/null
+++ b/make/variant/linux.defs
@@ -0,0 +1,11 @@
+TARGET.dylib.ext = .so
+
+GCC.start = 1
+GCC.end = 1
+GCC.args.dylib = -shared
+GCC.args.pic = 1
+
+GCC.args.g.none = -g0
+GCC.args.g.min = -g1
+GCC.args.g.default = -g2
+GCC.args.g.max = -g3