forked from gabriel/ffmpeg-iphone-build
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild-i386
executable file
·36 lines (25 loc) · 1.35 KB
/
build-i386
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/sh
trap exit ERR
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
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"
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
make && make install
echo "Installed: $FFMPEG_DIR/dist"