ANDROID_NDK_HOME=${HOME}/Android/SDK/ndk/22.0.7026061 ANDROID_NDK_HOME=${HOME}/Android/SDK/ndk/25.1.8937393 PATH=${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin:$PATH export CC=aarch64-linux-android-gcc export CXX=aarch64-linux-android-g++ export AR=${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar export OPT_LEVEL=2 export CC_aarch64_linux_android="${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android30-clang" export CFLAGS="-fPIC -fPIE -L ${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/30" export CFLAGS_aarch64_linux_android="-fPIE -fPIC -O2" export LDFLAGS_aarch64_linux_android="-L ${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/30" export CARGO_TARGET_AARCH64_LINUX_ANDROID_LINKER=${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android30-clang export CARGO_TARGET_AARCH64_LINUX_ANDROID_LINKER=${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android-ld.gold export CARGO_TARGET_AARCH64_LINUX_ANDROID_LDFLAGS="-L ${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/30" export RUSTFLAGS="-L ${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/30 -L ${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/aarch64-linux-android/4.9.x/" # for cross-compiling ac_ffmpeg crate. We obtain the libs and includes thanks to the cross-compilation # scripts at https://github.com/Javernaut/ffmpeg-android-maker export FFMPEG_INCLUDE_DIR=${HOME}/Sync/src/francetv/ftv/include/arm64-v8a export FFMPEG_LIB_DIR=${HOME}/Sync/src/francetv/ftv/lib/arm64-v8a cargo build --target aarch64-linux-android --release