NDK编译ffmpeg的配置文件

仅做记录,未涉及背景相关内容
#!/bin/sh

NDK=/home/ffmpeg/android-ndk-r10d
SYSROOT=$NDK/platforms/android-19/arch-arm/
TOOLCHAIN=$NDK/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64

PREFIX=/home/ffmpeg/ndksdk/ffmpeg
ADDI_CFLAGS="-I/home/ffmpeg/ndksdk/ffmpeg/include -DANDROID -D__thumb__ -mthumb -Wfatal-errors -Wno-deprecated -mfloat-abi=softfp -mfpu=vfpv3-d16 -marm -march=armv7-a"
ADDI_LDFLAGS="-L/home/ffmpeg/ndksdk/ffmpeg/lib -march=armv7-a"

./configure \
    --prefix=$PREFIX \
    --enable-shared \
    --disable-static \
    --enable-cross-compile \
    --enable-runtime-cpudetect \
    --arch=armv7-a \
    --disable-stripping \
    --enable-version3 \
    --disable-everything \
    --enable-gpl \
    --disable-doc \
    --enable-avresample \
    --disable-ffplay \
    --disable-ffserver \
    --enable-ffmpeg \
    --disable-ffprobe \
    --enable-libx264 \
    --enable-encoder=libx264 \
    --enable-decoder=h264 \
    --enable-hwaccels \
    --enable-zlib \
    --disable-devices \
    --disable-avdevice \
    --cross-prefix=$TOOLCHAIN/bin/arm-linux-androideabi- \
    --target-os=linux \
    --sysroot=$SYSROOT \
    --extra-cflags="-Os -fpic $ADDI_CFLAGS" \
    --extra-ldflags="$ADDI_LDFLAGS" \
    $ADDITIONAL_CONFIGURE_FLAG


你可能感兴趣的:(NDK编译ffmpeg的配置文件)