ffmpeg-2.3.3 configure for android

#! /bin/sh
NDK=/usr/local/android-ndk-r10
PREBUILT=${NDK}/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64
PLATFORM=${NDK}/platforms/android-L/arch-arm

# -mcpu=cortex-a9
#—extra-cxxflags=" -O3 -fPIC -DANDROID"

./configure --target-os=linux --arch=armv7-a --enable-cross-compile --extra-libs="-lgcc" \
--cpu=cortex-a9 \
--cc=$PREBUILT/bin/arm-linux-androideabi-gcc \
--cxx=$PREBUILT/bin/arm-linux-androideabi-g++ \
--nm=$PREBUILT/bin/arm-linux-androideabi-nm \
--ar=$PREBUILT/bin/arm-linux-androideabi-ar \
--as=$PREBUILT/bin/arm-linux-androideabi-as \
--ld=/usr/local/android-ndk-r10/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/arm-linux-androideabi/bin/ld \
--cross-prefix=$PREBUILT/bin/arm-linux-androideabi- \
--nm=$PREBUILT/bin/arm-linux-androideabi-nm \
--extra-cflags=" -O3 -fPIC -DANDROID -D__STDC_CONSTANT_MACROS -DHAVE_SYS_UIO_H=1 -Dipv6mr_interface=ipv6mr_ifindex -fasm -Wno-psabi -fno-short-enums -fno-strict-aliasing -finline-limit=300 $OPTIMIZE_CFLAGS " \
--extra-cxxflags=" -O3 -fPIC -DANDROID -fpermissive " \
--enable-shared --enable-gpl --disable-asm --sysroot=$PLATFORM \
--sysinclude=$PLATFORM/usr/include --disable-armv6 --disable-armv6t2 --disable-yasm --disable-ffplay --disable-ffserver \
--disable-manpages --enable-avfilter --enable-gpl --enable-swscale --enable-postproc --enable-gpl --enable-pthreads \
--disable-podpages \
--prefix=/usr/local/ffmpeg-android --extra-ldflags="-nostdlib -rpath-link=$PLATFORM/usr/lib \
-L$PLATFORM/usr/lib -L${PREBUILT}/lib/gcc/arm-linux-androideabi/4.9"
#-lc -lm -ldl -llog \
#$PREBUILT/lib/gcc/arm-linux-androideabi/4.9/crtbegin.o \
#$PREBUILT/lib/gcc/arm-linux-androideabi/4.9/crtend.o"
#/usr/local/android-ndk-r10/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/lib/gcc/arm-linux-androideabi/4.9/armv7-a


你可能感兴趣的:(android)