36 lines
1.0 KiB
Bash
Executable File
36 lines
1.0 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
LOCAL_DIR=`pwd`
|
|
#----------------------------------
|
|
OUTPUT_DIR=${LOCAL_DIR}/output
|
|
INSTALL_DIR=${LOCAL_DIR}/install
|
|
|
|
NDK=${HOME}/Workspaces/ndk/android-ndk-r21e
|
|
|
|
# Only choose one of these, depending on your build machine...
|
|
#export TOOLCHAIN=$NDK/toolchains/llvm/prebuilt/darwin-x86_64
|
|
export TOOLCHAIN=$NDK/toolchains/llvm/prebuilt/linux-x86_64
|
|
|
|
# Only choose one of these, depending on your device...
|
|
export TARGET=aarch64-linux-android
|
|
#export TARGET=armv7a-linux-androideabi
|
|
#export TARGET=i686-linux-android
|
|
#export TARGET=x86_64-linux-android
|
|
|
|
# Set this to your minSdkVersion.
|
|
export API=30
|
|
|
|
# Configure and build.
|
|
export AR=$TOOLCHAIN/bin/llvm-ar
|
|
export CC=$TOOLCHAIN/bin/$TARGET$API-clang
|
|
export AS=$CC
|
|
export CXX=$TOOLCHAIN/bin/$TARGET$API-clang++
|
|
export LD=$TOOLCHAIN/bin/ld
|
|
export RANLIB=$TOOLCHAIN/bin/llvm-ranlib
|
|
export STRIP=$TOOLCHAIN/bin/llvm-strip
|
|
|
|
./configure --host=$TARGET --prefix=${INSTALL_DIR} \
|
|
--disable-ipv6 --disable-tirpc --disable-nfsv4 --disable-gss --disable-uuid --disable-mount;
|
|
|
|
make
|