summaryrefslogtreecommitdiffstats
path: root/make
diff options
context:
space:
mode:
authorkonablend <[email protected]>2013-09-24 00:14:48 +0000
committerkonablend <[email protected]>2013-09-24 00:14:48 +0000
commitc0d3a073e6309939a82b58d9aa693084b088644c (patch)
treec35b319b0a6cf293215a4e9ef9a24bfced92d17f /make
parent203b7a961fca0513ad09c1b9761faeac26d2edd0 (diff)
BuildSystem: initial Xcode5 support
Tested on MacOSX 10.8.5 w/ Xcode 5.0, 4.6.3 and 4.5.2, various builds, including terminal Xcode, terminal no Xcode and Xcode IDE, and permutations with/without mp4v2 and mkv. - push defs for optional static libraries (OSL) to respective modules - adjust make-driven linking to use OSL - adjust Xcode-driven linking to use OSL via ld -filelist option - add Xcode project group for all OSL - set Xcode project to use clang compiler - add osx 10.8 xcconfig files - add "supplemental" xcconfig file where EXTERNAL_CONFIGURE may be used to specify configure-time options - patch mp4v2 to compile with clang Intructions for custom configure-options within Xcode IDE: 1. edit macosx/xcconfig/supplemental.xcconfig 2. save file (unsure how long it takes IDE to see change but it does) 3. build clean 4. build 5. never commit supplemental.xcconfig to repository - it is meant to exist but not effect the build on a clean checkout, and to be used only as a developer transient developer customization file. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5800 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'make')
-rw-r--r--make/include/function.defs5
-rwxr-xr-xmake/xcodemake22
2 files changed, 23 insertions, 4 deletions
diff --git a/make/include/function.defs b/make/include/function.defs
index 5bf5aaa89..3be6a73e5 100644
--- a/make/include/function.defs
+++ b/make/include/function.defs
@@ -17,3 +17,8 @@ fn.ARGS = $(strip $(foreach a,$(2), \
fn.VARS = $(foreach v,$($(1).vars),$(v)="$($(1).vars.$(v))")
fn.TARGET = $(TARGET.$(2).prefix)$(1)$(TARGET.$(2).suffix)$(TARGET.$(2).ext)
+
+define fn.PRINTLN
+$(1)
+
+endef
diff --git a/make/xcodemake b/make/xcodemake
index a5950811b..f3aa4e6ae 100755
--- a/make/xcodemake
+++ b/make/xcodemake
@@ -106,15 +106,21 @@ if [ -n "$reconfigure" ]; then
driver="--xcode-driver=$EXTERNAL_DRIVER"
fi
+ ## determine which compiler to use based on Xcode environment (project).
case "$GCC_VERSION" in
com.apple.compilers.llvmgcc42)
- gcc="--gcc=$DEVELOPER_BIN_DIR/llvm-gcc-4.2"
+ gcc="--gcc=`$DEVELOPER_BIN_DIR/xcodebuild -find-executable llvm-gcc-4.2`"
;;
com.apple.compilers.llvm.clang.1_0)
- gcc="--gcc=$DEVELOPER_BIN_DIR/clang"
+ gcc="--gcc=`$DEVELOPER_BIN_DIR/xcodebuild -find-executable clang`"
;;
*)
- gcc=
+ echo "*********************************************************************"
+ echo "***"
+ echo "*** ERROR: unexpected value for GCC_VERSION: $GCC_VERSION"
+ echo "***"
+ echo "*********************************************************************"
+ exit 1
;;
esac
@@ -145,6 +151,14 @@ if [ -n "$reconfigure" ]; then
minver=
fi
+ ## pickup user setting from Xcode IDE and avoid recursion
+ if [ -n "$EXTERNAL_CONFIGURE" ]; then
+ extconf="$EXTERNAL_CONFIGURE"
+ else
+ extconf=
+ fi
+ EXTERNAL_CONFIGURE=
+
## invoke configure with (hidden) option which indicates conf performed by xcode
(set -ex; $EXTERNAL_SRC/configure --force \
$EXTERNAL_CONF_ARGS \
@@ -152,7 +166,7 @@ if [ -n "$reconfigure" ]; then
$driver \
--xcode-symroot="$SYMROOT" \
--xcode-config="$EXTERNAL_XCCONFIG" \
- $gcc $arch $debug $sysroot $minver)
+ $gcc $arch $debug $sysroot $minver $extconf)
[ $? -ne 0 ] && exit 1
fi