#!/bin/bash
NDK=/home/wang/program/android-ndk-r19c
#ADDI_LDFLAGS="-fPIE -pie"
#ADDI_CFLAGS="-fPIE -pie -march=armv7-a -mfloat-abi=softfp -mfpu=neon"
#CPU=armv7-a
#ARCH=arm
#CPU=x86
ARCH=x86
#HOST=arm-linux
SYSROOT=$NDK/toolchains/llvm/prebuilt/linux-x86_64/sysroot
TOOLCHAIN=$NDK/toolchains/llvm/prebuilt/linux-x86_64/bin
PREFIX=$(pwd)/android/$ARCH
configure()
{
./configure \
--prefix=$PREFIX \
--toolchain=clang-usan \
--enable-cross-compile \
--target-os=android \
--arch=$ARCH \
--sysroot=$SYSROOT \
#--cc=$TOOLCHAIN/armv7a-linux-androideabi21-clang \
#--cxx=$TOOLCHAIN/armv7a-linux-androideabi21-clang++ \
--cc =$TOOLCHAIN/i686-linux-android21-clang \
--cxx=$TOOLCHAIN/i686-linux-android21-clang++ \
# --strip=$TOOLCHAIN/arm-linux-androideabi-strip \
--strip=$TOOLCHAIN/i686-linux-android-strip \
# --extra-cflags="$ADDI_CFLAGS" \
# --extra-ldflags="$ADDI_LDFLAGS" \
--disable-encoders \
--disable-decoders \
--disable-avdevice \
--disable-static \
--disable-doc \
--disable-ffplay \
--disable-network \
--disable-doc \
--disable-symver \
--disable-ffprobe \
--enable-neon \
--enable-shared \
--enable-gpl \
--enable-pic \
--enable-jni \
--enable-pthreads \
--enable-mediacodec \
--enable-encoder=aac \
--enable-encoder=gif \
--enable-encoder=libopenjpeg \
--enable-encoder=libmp3lame \
--enable-encoder=libwavpack \
--enable-encoder=mpeg4 \
--enable-encoder=pcm_s16le \
--enable-encoder=png \
--enable-encoder=mjpeg \
--enable-encoder=srt \
--enable-encoder=subrip \
--enable-encoder=yuv4 \
--enable-encoder=text \
--enable-decoder=aac \
--enable-decoder=aac_latm \
--enable-decoder=libopenjpeg \
--enable-decoder=mp3 \
--enable-decoder=mpeg4_mediacodec \
--enable-decoder=pcm_s16le \
--enable-decoder=flac \
--enable-decoder=flv \
--enable-decoder=gif \
--enable-decoder=png \
--enable-decoder=srt \
--enable-decoder=xsub \
--enable-decoder=yuv4 \
--enable-decoder=vp8_mediacodec \
--enable-decoder=h264_mediacodec \
--enable-decoder=hevc_mediacodec \
--enable-bsf=aac_adtstoasc \
--enable-bsf=h264_mp4toannexb \
--enable-bsf=hevc_mp4toannexb \
--enable-bsf=mpeg4_unpack_bframes
}
build()
{
configure
make clean
make -j4
make install
}
build
相关文章
- 11-21交叉熵
- 11-21ffmpeg结构体以及函数介绍(一)
- 11-21armv7交叉编译rsyslog
- 11-21rust 交叉编译树莓派程序
- 11-21[交叉坐标的星尘]题解
- 11-21[kaggle] 为什么交叉特征能起到作用?
- 11-21NULLIF与ISNULL的交叉使用
- 11-21FFmpeg库视频解码初探(软硬件解码)
- 11-21ffmpeg.mp4.格式资料
- 11-21FFmpeg动效实践与探索(文字方框的同步展开及收缩)