Commit 67b43ed8 authored by Felix Paul Kühne's avatar Felix Paul Kühne

ios/build.sh: fixed compilation for the iOS Simulator and the new contribs

plus some cleanup
parent 0f4ce731
...@@ -4,6 +4,7 @@ set -e ...@@ -4,6 +4,7 @@ set -e
PLATFORM=OS PLATFORM=OS
VERBOSE=no VERBOSE=no
SDK_VERSION=5.0 SDK_VERSION=5.0
SDK_MIN=5.0
usage() usage()
{ {
...@@ -45,7 +46,7 @@ do ...@@ -45,7 +46,7 @@ do
;; ;;
s) s)
PLATFORM=Simulator PLATFORM=Simulator
SDK=5.0 SDK=${SDK_MIN}
;; ;;
k) k)
SDK=$OPTARG SDK=$OPTARG
...@@ -71,7 +72,7 @@ fi ...@@ -71,7 +72,7 @@ fi
info "Building libvlc for the iOS" info "Building libvlc for the iOS"
if [ "$PLATFORM" = "Simulator" ]; then if [ "$PLATFORM" = "Simulator" ]; then
TARGET="i686-apple-darwin10" TARGET="i686-apple-darwin11"
ARCH="i386" ARCH="i386"
else else
TARGET="arm-apple-darwin11" TARGET="arm-apple-darwin11"
...@@ -130,7 +131,11 @@ export STRIP="xcrun strip" ...@@ -130,7 +131,11 @@ export STRIP="xcrun strip"
export SDKROOT export SDKROOT
export CFLAGS="-isysroot ${SDKROOT} -arch ${ARCH} -mcpu=cortex-a8 -miphoneos-version-min=5.0 ${OPTIM}" if [ "$PLATFORM" = "OS" ]; then
export CFLAGS="-isysroot ${SDKROOT} -arch ${ARCH} -mcpu=cortex-a8 -miphoneos-version-min=${SDK_MIN} ${OPTIM}"
else
export CFLAGS="-isysroot ${SDKROOT} -arch ${ARCH} -miphoneos-version-min=${SDK_MIN} ${OPTIM}"
fi
export CPPFLAGS="${CFLAGS}" export CPPFLAGS="${CFLAGS}"
export CXXFLAGS="${CFLAGS}" export CXXFLAGS="${CFLAGS}"
export OBJCFLAGS="${CFLAGS}" export OBJCFLAGS="${CFLAGS}"
...@@ -138,13 +143,15 @@ export OBJCFLAGS="${CFLAGS}" ...@@ -138,13 +143,15 @@ export OBJCFLAGS="${CFLAGS}"
export CPP="xcrun cc -E" export CPP="xcrun cc -E"
export CXXCPP="xcrun c++ -E" export CXXCPP="xcrun c++ -E"
export BUILDFORIOS="yes"
if [ "$PLATFORM" = "Simulator" ]; then if [ "$PLATFORM" = "Simulator" ]; then
# Use the new ABI on simulator, else we can't build # Use the new ABI on simulator, else we can't build
export OBJCFLAGS="-fobjc-abi-version=2 -fobjc-legacy-dispatch ${OBJCFLAGS}" export OBJCFLAGS="-fobjc-abi-version=2 -fobjc-legacy-dispatch ${OBJCFLAGS}"
fi fi
if [ "$PLATFORM" = "OS" ]; then if [ "$PLATFORM" = "OS" ]; then
export LDFLAGS="-L${SDKROOT}/usr/lib -arch ${ARCH} -isysroot ${SDKROOT} -miphoneos-version-min=5.0 " export LDFLAGS="-L${SDKROOT}/usr/lib -arch ${ARCH} -isysroot ${SDKROOT} -miphoneos-version-min=${SDK_MIN} "
else else
export LDFLAGS="-syslibroot=${SDKROOT}/ -arch ${ARCH} " export LDFLAGS="-syslibroot=${SDKROOT}/ -arch ${ARCH} "
fi fi
...@@ -193,7 +200,6 @@ fi ...@@ -193,7 +200,6 @@ fi
make make
spopd spopd
if [ "$PLATFORM" = "OS" ]; then if [ "$PLATFORM" = "OS" ]; then
export AS="${IOS_GAS_PREPROCESSOR} ${CC}" export AS="${IOS_GAS_PREPROCESSOR} ${CC}"
export ASCPP="${IOS_GAS_PREPROCESSOR} ${CC}" export ASCPP="${IOS_GAS_PREPROCESSOR} ${CC}"
...@@ -301,7 +307,6 @@ ${VLCROOT}/configure \ ...@@ -301,7 +307,6 @@ ${VLCROOT}/configure \
--disable-faad \ --disable-faad \
--disable-lua \ --disable-lua \
--disable-mad \ --disable-mad \
--enable-a52 \
--disable-mtp \ --disable-mtp \
--disable-ogg \ --disable-ogg \
--disable-speex \ --disable-speex \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment