[compiler]
ARM64 GNU compiler 4.8.2 for Coretex-A

[dependencies]
none

[build]
export FFMPEG_EXT_PATH="$(pwd)/ffmpeg/src/main"
export HOST_PLATFORM="linux-x86_64"
export NDK_PATH=<ANDROID_NDK_PATH>
cd "${FFMPEG_EXT_PATH}"
COMMON_OPTIONS="\
    --target-os=android \
    --disable-static \
    --enable-shared \
    --disable-doc \
    --disable-programs \
    --disable-everything \
    --disable-avdevice \
    --disable-avformat \
    --disable-swscale \
    --disable-postproc \
    --disable-avfilter \
    --disable-symver \
    --disable-swresample \
    --disable-avresample \
    --disable-decoder=vorbis \
    --disable-decoder=opus \
    --disable-decoder=flac \
    --enable-decoder=ac3 \
    --enable-decoder=eac3 \
    --enable-decoder=mp3 \
    --enable-decoder=aac \
    --enable-decoder=aac_latm \
    --enable-decoder=aac_fixed \
    "
cd "${FFMPEG_EXT_PATH}/jni"
cd "ffmpeg"
./configure \
    --libdir=android-libs/armeabi-v7a \
    --arch=arm \
    --cpu=armv7-a \
    --cross-prefix="${NDK_PATH}/toolchains/arm-linux-androideabi-4.9/prebuilt/${HOST_PLATFORM}/bin/arm-linux-androideabi-" \
    --sysroot="${NDK_PATH}/platforms/android-9/arch-arm/" \
    --extra-cflags="-march=armv7-a -mfloat-abi=softfp" \
    --extra-ldflags="-Wl,--fix-cortex-a8" \
    --extra-ldexeflags=-pie \
    ${COMMON_OPTIONS}
make -j4 && make install-libs
