[FFmpeg-devel] [HOWTO] Building FFmpeg for iPhone
Kvikant, Christian Scilla
kvide
Sun Oct 18 19:34:57 CEST 2009
Yoni Levy wrote:
> Did anyone try running this on an iPhone running OS version < 3.0? It
> crashes on runtime when it's not able to find posix_memalign.
>
These settings worked for me when building FFmpeg v0.50 shared libraries
for iPhone v2.1:
mini-me:~ kvide$ cat ~/setenv/setenv-arm-apple-darwin9
export TOOL_DIR="/Developer/Platforms/iPhoneOS.platform/Developer/usr"
export
SYS_DIR="/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.1.sdk"
export
GCC_INC_DIR="/Developer/Platforms/iPhoneOS.platform/Developer/usr/lib/gcc/arm-apple-darwin9/4.0.1/include"
(echo "$PATH" | grep -q "${TOOL_DIR}") || export
PATH="${TOOL_DIR}/bin:${PATH}"
export ARCH=arm-apple-darwin9
export STRIP="strip"
export LD="ld"
export CC="arm-apple-darwin9-gcc-4.0.1"
export CPPFLAGS="-isystem${SYS_DIR}/usr/include"
export RANLIB="ranlib"
export CXX="arm-apple-darwin9-g++-4.0.1"
export PKG_CONFIG_LIBDIR="${SYS_DIR}/usr/lib/pkgconfig"
export PKG_CONFIG_SYSROOT_DIR="${SYS_DIR}"
export PKG_CONFIG="/sw/bin/pkg-config"
export LDFLAGS="-L${SYS_DIR}/usr/lib"
export MAKE="make"
export CFLAGS="-isystem${SYS_DIR}/usr/include -I${GCC_INC_DIR}
-mabi=apcs-gnu -mthumb-interwork -miphoneos-version-min=2.1 -O3"
export CXXFLAGS="-isystem${SYS_DIR}/usr/include"
export AS="as"
export AR="ar"
export NM="nm"
export CPP="arm-apple-darwin9-gcc-4.0.1 -E"
export LIBTOOL="libtool"
export
CODESIGN_ALLOCATE=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate
mini-me:~ kvide$ cat buildit.sh
#!/bin/sh
#
~/gen_source/ffmpeg/ffmpeg-0.5-iphone/configure \
--enable-cross-compile \
--arch=arm \
--nm=${NM} \
--cc=arm-apple-darwin9-gcc-4.0.1 \
--host-cc=arm-apple-darwin9-gcc-4.0.1 \
--cpu=armv6 \
--disable-armvfp \
--disable-iwmmxt \
--disable-neon \
--disable-devices \
--disable-armv5te \
--enable-armv6 \
--disable-armv6t2 \
--disable-ffserver \
--disable-ffplay \
--disable-static \
--enable-shared \
--disable-encoders \
--disable-muxers \
--disable-encoder=flac \
--disable-decoder=cavs \
--disable-protocols \
--disable-devices \
--disable-network \
--enable-pthreads \
--disable-debug \
--prefix=/Users/kvide/target/opt/arm-apple-darwin9-release/scilla/ffmpeg/ffmpeg-0.5
More information about the ffmpeg-devel
mailing list