forked from green-green-avk/build-proot-android
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig
38 lines (29 loc) · 1.12 KB
/
config
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
32
33
34
35
36
37
38
PROOT_V='0.2_release'
TALLOC_V='2.1.14'
# `pre5' is for Android API < 21 where we can't _FILE_OFFSET_BITS=64 at least
ARCHS='aarch64 aarch64-pre5 armv7a armv7a-pre5 x86_64 x86_64-pre5 i686 i686-pre5'
BASE_DIR="$PWD"
BUILD_DIR="$BASE_DIR/build"
mkdir -p "$BUILD_DIR"
PKG_DIR="$BASE_DIR/packages"
mkdir -p "$PKG_DIR"
NDK="$HOME/Android/Sdk/ndk-bundle"
TOOLCHAIN="$NDK/toolchains/llvm/prebuilt/linux-$(uname -m)"
set-arch() {
MARCH="${1%%-*}"
if [ "$MARCH" != "$1" ]
then SUBARCH="${1#*-}"
else SUBARCH=''
fi
INSTALL_ROOT="$BUILD_DIR/root-$ARCH/root"
STATIC_ROOT="$BUILD_DIR/static-$ARCH/root"
export AR="$TOOLCHAIN/bin/$MARCH-linux-android-ar"
export AS="$TOOLCHAIN/bin/$MARCH-linux-android-as"
export CC="$(echo $TOOLCHAIN/bin/$MARCH-linux-android*21-clang)"
export CXX="$(echo $TOOLCHAIN/bin/$MARCH-linux-android*21-clang++)"
export LD="$TOOLCHAIN/bin/$MARCH-linux-android-ld"
export RANLIB="$TOOLCHAIN/bin/$MARCH-linux-android-ranlib"
export STRIP="$TOOLCHAIN/bin/$MARCH-linux-android-strip"
export OBJCOPY="$TOOLCHAIN/bin/$MARCH-linux-android-objcopy"
export OBJDUMP="$TOOLCHAIN/bin/$MARCH-linux-android-objdump"
}