#!/bin/bash export TMPDIR=../temp HOST_TAG=linux-x86_64 NDK=/mnt/d/wsl/android-ndk-r20b TOOLCHAIN=$NDK/toolchains/llvm/prebuilt/$HOST_TAG SYSROOT=$TOOLCHAIN/sysroot PLATFORM=$TOOLCHAIN ANDROID_LIB_PATH="$(pwd)/output/android" API=21
OPENSSL_DIR="/mnt/d/wsl/openssl-1.1.1g" OPENSSL_BUILD_DIR=$OPENSSL_DIR/output/lib/arm64 OPENSSL_INCLUDE_DIR=$OPENSSL_DIR/output/include OPENSSL_SRC_DIR=$OPENSSL_DIR
SSL_EXTRA_LDFLAGS="$OPENSSL_BUILD_DIR" SSL_EXTRA_CFLAGS="$OPENSSL_INCLUDE_DIR"
#PREFIX=../os function build { ?? ? ? ?? ?./configure \ ?? ??? ??? ?--prefix=$PREFIX \ ?? ??? ??? ?--target-os=android \ ?? ??? ??? ?--arch=$CPU \ ?? ??? ??? ?--disable-shared \ ?? ??? ??? ?--enable-static \ ?? ??? ??? ?--disable-doc \ ?? ??? ??? ?--disable-ffmpeg \ ?? ??? ??? ?--disable-ffplay \ ?? ??? ??? ?--disable-ffprobe \ ?? ??? ??? ?--disable-avdevice \ ?? ??? ??? ?--disable-symver \ ?? ??? ??? ?--enable-decoder=h264_mediacodec \ ?? ??? ??? ?--enable-jni \ ?? ??? ??? ?--enable-mediacodec \ ?? ??? ??? ?--enable-decoder=h264_mediacodec \ ?? ??? ??? ?--enable-hwaccel=h264_mediacodec \ ?? ??? ??? ?--enable-cross-compile \ ?? ??? ??? ?--sysroot=$SYSROOT \ ?? ??? ??? ?--cross-prefix="$CROSS_PREFIX" \ ?? ??? ??? ?--arch="$ARCH" \ ?? ??? ??? ?--cpu="$CPU" \ ?? ??? ??? ?--cc="$CC" \ ?? ??? ??? ?--cxx="$CXX" \ ?? ??? ??? ?--enable-cross-compile \ ?? ??? ??? ?--extra-cflags="-I$SYSROOT/usr/include -I$SSL_EXTRA_CFLAGS" \ ?? ??? ??? ?--extra-ldflags="-L$SYSROOT/usr/lib -L$SSL_EXTRA_LDFLAGS" ?? ??? ??? ?make clean ?? ??? ? ?make -j4 ?? ??? ??? ?make install } ?? ??? ??? ?#armv8-a ?? ??? ??? ?ARCH=arm64 ?? ??? ??? ?CPU=armv8-a ?? ??? ??? ?CC=$TOOLCHAIN/bin/aarch64-linux-android$API-clang ?? ??? ??? ?CXX=$TOOLCHAIN/bin/aarch64-linux-android$API-clang++ ?? ??? ??? ?CROSS_PREFIX=$TOOLCHAIN/bin/aarch64-linux-android- ?? ??? ??? ?PREFIX=$ANDROID_LIB_PATH/$CPU
?? ??? ??? ?#armv7-a ?? ??? ??? ?#ARCH=arm ?? ??? ??? ?#CPU=armv7-a ?? ??? ??? ?#CC=$TOOLCHAIN/bin/armv7a-linux-androideabi$API-clang ?? ??? ??? ?#CXX=$TOOLCHAIN/bin/armv7a-linux-androideabi$API-clang++ ?? ??? ??? ?#CROSS_PREFIX=$TOOLCHAIN/bin/arm-linux-androideabi- ?? ??? ??? ?#PREFIX=$ANDROID_LIB_PATH/$CPU ?? ??? ??? ?OPTIMIZE_CFLAGS="-mfloat-abi=softfp -mfpu=vfp -marm" ?? ??? ??? ?#OPTIMIZE_CFLAGS="-mfloat-abi=softfp -mfpu=vfp -marm -march=$CPU -Iexternal-lib/lame/include -Iexternal-lib/fdk-aac/include -Iexternal-lib/x264/include" ?? ??? ??? ?build
|