TOOLCHAIN=$NDK/toolchains/llvm/prebuilt/$HOST_TAG
ANDROID_LIB_PATH="$(pwd)/android"
echo "Build fdk-aac for android $CPU"
--prefix="$ANDROID_LIB_PATH/$CPU" \
echo "Build fdk-aac for android $CPU completed"
export AR=$TOOLCHAIN/bin/llvm-ar
export AS=$TOOLCHAIN/bin/llvm-as
export LD=$TOOLCHAIN/bin/ld
export RANLIB=$TOOLCHAIN/bin/llvm-ranlib
export STRIP=$TOOLCHAIN/bin/llvm-strip
export CC=$TOOLCHAIN/bin/armv7a-linux-androideabi$API-clang
export CXX=$TOOLCHAIN/bin/armv7a-linux-androideabi$API-clang++
HOST=aarch64-linux-android
export AR=$TOOLCHAIN/bin/llvm-ar
export AS=$TOOLCHAIN/bin/llvm-as
export LD=$TOOLCHAIN/bin/ld
export RANLIB=$TOOLCHAIN/bin/llvm-ranlib
export STRIP=$TOOLCHAIN/bin/llvm-strip
export CC=$TOOLCHAIN/bin/aarch64-linux-android$API-clang
export CXX=$TOOLCHAIN/bin/aarch64-linux-android$API-clang++
- 修改ffmpeg-android-maker/scripts/ffmpeg/build.sh 中 configure部分内容,这里添加了disable-doc,否则会报cc1错误
--prefix=${BUILD_DIR_FFMPEG}/${ANDROID_ABI} \
--arch=${TARGET_TRIPLE_MACHINE_ARCH} \
--sysroot=${SYSROOT_PATH} \
--extra-cflags="-O3 -fPIC $DEP_CFLAGS" \
--extra-ldflags="$DEP_LD_FLAGS" \
--pkg-config=${PKG_CONFIG_EXECUTABLE} \
${EXTRA_BUILD_CONFIGURATION_FLAGS} \
$ADDITIONAL_COMPONENTS || exit 1