Browse files

Updated build scripts for xvid

  • Loading branch information...
1 parent 62310a5 commit 3eb628644ca2092eb0550970dffac987e4ccf79c @gabriel committed Apr 9, 2010
Showing with 87 additions and 3 deletions.
  1. +3 −0 README.md
  2. +8 −1 build-armv6
  3. +9 −2 build-armv7
  4. +7 −0 build-i386
  5. +20 −0 build-xvid-armv6
  6. +20 −0 build-xvid-armv7
  7. +20 −0 build-xvid-i386
View
3 README.md
@@ -8,6 +8,9 @@ Build scripts for ffmpeg on iPhone SDK 3.0 (and iPhone Simulator SDK).
- `build-x264-[arch]`: x264 build scripts for each arch; Run these before normal build script to include x264 support
- `combine-x264-libs`: Creates universal binaries; Runs lipo -create on each of the x264 static libs
+- `build-xvid-[arch]`: xvid build scripts for each arch; Run these before normal build script to include xvid support
+
+
## Revision
The current ffmpeg trunk doesn't build with arm, so had to go back to r22404 in order to build arm targets. The i386 build does work on trunk (r22610) when I tried last.
View
9 build-armv6
@@ -5,6 +5,7 @@ trap exit ERR
FFMPEG_DIR=ffmpeg-armv6
SCRIPT_DIR=$( (cd -P $(dirname $0) && pwd) )
+echo "Pulling r22403..."
svn co -r22403 svn://svn.ffmpeg.org/ffmpeg/trunk $FFMPEG_DIR
cd $FFMPEG_DIR
@@ -19,9 +20,15 @@ if [ -d "$X264_DIST" ]; then
CONFIGURE_OPTIONS="$CONFIGURE_OPTIONS --enable-libx264 --extra-ldflags=-L$X264_DIST/lib --extra-cflags=-I$X264_DIST/include"
fi
+# Add xvid if exists
+XVID_DIST="$SCRIPT_DIR/xvid-armv6"
+if [ -d "$XVID_DIST" ]; then
+ CONFIGURE_OPTIONS="$CONFIGURE_OPTIONS --enable-libxvid --extra-ldflags=-L$XVID_DIST/lib --extra-cflags=-I$XVID_DIST/include"
+fi
+
echo "Configure options: $CONFIGURE_OPTIONS"
-./configure --cc=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 --as='gas-preprocessor.pl /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2' --sysroot=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk --prefix="dist" --enable-cross-compile --target-os=darwin --arch=arm --cpu=arm1176jzf-s --extra-cflags='-arch armv6' --extra-ldflags='-arch armv6' $CONFIGURE_OPTIONS
+./configure --cc=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 --as="$SCRIPT_DIR/gas-preprocessor.pl /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2" --sysroot=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk --prefix="dist" --enable-cross-compile --target-os=darwin --arch=arm --cpu=arm1176jzf-s --extra-cflags='-arch armv6' --extra-ldflags='-arch armv6' $CONFIGURE_OPTIONS
make && make install
View
11 build-armv7
@@ -5,6 +5,7 @@ trap exit ERR
FFMPEG_DIR=ffmpeg-armv7
SCRIPT_DIR=$( (cd -P $(dirname $0) && pwd) )
+echo "Pulling r22403..."
svn co -r22403 svn://svn.ffmpeg.org/ffmpeg/trunk $FFMPEG_DIR
cd $FFMPEG_DIR
@@ -13,12 +14,18 @@ mkdir -p dist
# Default configure options
CONFIGURE_OPTIONS="--enable-gpl --enable-postproc --enable-swscale --enable-avfilter"
-# Add x264 if we built that
-X264_DIST="$SCRIPT_DIR/x264-i386/dist"
+# Add x264 if exists
+X264_DIST="$SCRIPT_DIR/x264-armv7/dist"
if [ -d "$X264_DIST" ]; then
CONFIGURE_OPTIONS="$CONFIGURE_OPTIONS --enable-libx264 --extra-ldflags=-L$X264_DIST/lib --extra-cflags=-I$X264_DIST/include"
fi
+# Add xvid if exists
+XVID_DIST="$SCRIPT_DIR/xvid-armv7"
+if [ -d "$XVID_DIST" ]; then
+ CONFIGURE_OPTIONS="$CONFIGURE_OPTIONS --enable-libxvid --extra-ldflags=-L$XVID_DIST/lib --extra-cflags=-I$XVID_DIST/include"
+fi
+
echo "Configure options: $CONFIGURE_OPTIONS"
./configure --cc=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 --as="$SCRIPT_DIR/gas-preprocessor.pl /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2" --sysroot=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk --prefix="dist" --enable-cross-compile --target-os=darwin --arch=arm --cpu=cortex-a8 --extra-cflags="-arch armv7" --extra-ldflags="-arch armv7" --enable-pic $CONFIGURE_OPTIONS
View
7 build-i386
@@ -6,6 +6,7 @@ FFMPEG_DIR=ffmpeg-i386
SCRIPT_DIR=$( (cd -P $(dirname $0) && pwd) )
# Build at 22403 to be consistent with arm builds, tho also works at trunk when I tested (r22610)
+echo "Pulling r22403..."
svn co -r22403 svn://svn.ffmpeg.org/ffmpeg/trunk $FFMPEG_DIR
cd $FFMPEG_DIR
@@ -20,6 +21,12 @@ if [ -d "$X264_DIST" ]; then
CONFIGURE_OPTIONS="$CONFIGURE_OPTIONS --enable-libx264 --extra-ldflags=-L$X264_DIST/lib --extra-cflags=-I$X264_DIST/include"
fi
+# Add xvid if exists
+XVID_DIST="$SCRIPT_DIR/xvid-i386"
+if [ -d "$XVID_DIST" ]; then
+ CONFIGURE_OPTIONS="$CONFIGURE_OPTIONS --enable-libxvid --extra-ldflags=-L$XVID_DIST/lib --extra-cflags=-I$XVID_DIST/include"
+fi
+
echo "Configure options: $CONFIGURE_OPTIONS"
./configure --cc=/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/i686-apple-darwin10-gcc-4.2.1 --as="$SCRIPT_DIR/gas-preprocessor.pl /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/i686-apple-darwin10-gcc-4.2.1" --sysroot=/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk --extra-cflags="-mdynamic-no-pic" --prefix="dist" $CONFIGURE_OPTIONS
View
20 build-xvid-armv6
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+trap exit ERR
+
+DIR=xvidcore
+SCRIPT_DIR=$( (cd -P $(dirname $0) && pwd) )
+DIST_DIR="$SCRIPT_DIR/xvid-armv6"
+
+cd $SCRIPT_DIR/$DIR
+mkdir -p $DIST_DIR
+
+cd build/generic/
+
+FLAGS="-arch armv6 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk"
+
+CC=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 LDFLAGS=$FLAGS CFLAGS=$FLAGS ./configure --host=arm-apple-darwin --prefix="$DIST_DIR"
+
+make && make install
+
+echo "Installed: $DIST_DIR"
View
20 build-xvid-armv7
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+trap exit ERR
+
+DIR=xvidcore
+SCRIPT_DIR=$( (cd -P $(dirname $0) && pwd) )
+DIST_DIR="$SCRIPT_DIR/xvid-armv7"
+
+cd $SCRIPT_DIR/$DIR
+mkdir -p $DIST_DIR
+
+cd build/generic/
+
+FLAGS="-arch armv7 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk"
+
+CC=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 LDFLAGS=$FLAGS CFLAGS=$FLAGS ./configure --host=arm-apple-darwin --prefix="$DIST_DIR" --enable-pic
+
+make && make install
+
+echo "Installed: $DIST_DIR"
View
20 build-xvid-i386
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+trap exit ERR
+
+DIR=xvidcore
+SCRIPT_DIR=$( (cd -P $(dirname $0) && pwd) )
+DIST_DIR="$SCRIPT_DIR/xvid-i386"
+
+cd $SCRIPT_DIR/$DIR
+mkdir -p $DIST_DIR
+
+cd build/generic/
+
+FLAGS="-isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk"
+
+CC=/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/i686-apple-darwin10-gcc-4.0.1 CFLAGS=$FLAGS LDFLAGS=$FLAGS ./configure --prefix="$DIST_DIR"
+
+make && make install
+
+echo "Installed: $DIST_DIR"

0 comments on commit 3eb6286

Please sign in to comment.