forked from blokadaorg/blokada
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·31 lines (24 loc) · 916 Bytes
/
install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/sh
JNI_LIBS=../app/src/tun-blocka/jniLibs
export PATH=$PATH:$NDK_STANDALONE/arm64/bin
cd boringtun
rm -rf $JNI_LIBS
mkdir $JNI_LIBS
mkdir $JNI_LIBS/arm64-v8a
mkdir $JNI_LIBS/armeabi-v7a
mkdir $JNI_LIBS/x86
echo "Building for armv7..."
cargo build --lib --release --target armv7-linux-androideabi
cp target/armv7-linux-androideabi/release/libboringtun.so $JNI_LIBS/armeabi-v7a/libboringtun.so
echo "Building for aarch64..."
export CC=aarch64-linux-android-gcc
export CXX=aarch64-linux-android-g++
cargo build --lib --release --target aarch64-linux-android
cp target/aarch64-linux-android/release/libboringtun.so $JNI_LIBS/arm64-v8a/libboringtun.so
echo "Building for i686..."
export CC=i686-linux-android-gcc
export CXX=i686-linux-android-g++
cargo build --lib --release --target i686-linux-android
cp target/i686-linux-android/release/libboringtun.so $JNI_LIBS/x86/libboringtun.so
cd ../
./gradlew iFD