2021-01-25 18:34:08 +08:00
|
|
|
#!/bin/sh
|
|
|
|
V=r21d
|
|
|
|
O=""
|
|
|
|
case `uname` in
|
|
|
|
Linux)
|
|
|
|
O=linux
|
|
|
|
;;
|
|
|
|
Darwin)
|
|
|
|
O=darwin
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo "Unsupported platform"
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
echo Downloading NDK $V...
|
|
|
|
wget -c -q https://dl.google.com/android/repository/android-ndk-$V-$O-x86_64.zip
|
|
|
|
echo Unzipping in /tmp/ndkzip
|
|
|
|
unzip -q *.zip -d /tmp/ndkzip
|
2021-01-25 19:30:57 +08:00
|
|
|
export NDK=$(ls -d /tmp/ndkzip/* | head -n1)
|
|
|
|
echo NDK=${NDK}
|
|
|
|
echo NDK=${NDK} > $HOME/.r2androidrc
|
2021-01-25 18:34:08 +08:00
|
|
|
python $NDK/build/tools/make_standalone_toolchain.py \
|
|
|
|
--arch arm64 --api 28 --install-dir toolchain
|