fix that ndk make didn't work with symlinked core (#2139)

* fix that ndk make didn't work with symlinked core

* Use $PWD instead of $(pwd)

Co-authored-by: Hocuri <hocuri@gmx.de>
This commit is contained in:
Simon Laux
2021-11-23 11:37:51 +01:00
committed by GitHub
parent 206929a63c
commit cb84872957
+5 -4
View File
@@ -56,6 +56,7 @@ if test $1 && echo "armeabi-v7a arm64-v8a x86 x86_64" | grep -vwq $1; then
fi
cd jni
jnidir=$PWD
rm -f armeabi-v7a/*
rm -f arm64-v8a/*
rm -f x86/*
@@ -90,7 +91,7 @@ if test -z $1 || test $1 = armeabi-v7a; then
export CFLAGS=-D__ANDROID_API__=16
TARGET_CC=armv7a-linux-androideabi16-clang \
cargo +`cat rust-toolchain` build $RELEASEFLAG --target armv7-linux-androideabi -p deltachat_ffi
cp target/armv7-linux-androideabi/$RELEASE/libdeltachat.a ../armeabi-v7a
cp target/armv7-linux-androideabi/$RELEASE/libdeltachat.a $jnidir/armeabi-v7a
fi
if test -z $1 || test $1 = arm64-v8a; then
@@ -98,7 +99,7 @@ if test -z $1 || test $1 = arm64-v8a; then
export CFLAGS=-D__ANDROID_API__=21
TARGET_CC=aarch64-linux-android21-clang \
cargo +`cat rust-toolchain` build $RELEASEFLAG --target aarch64-linux-android -p deltachat_ffi
cp target/aarch64-linux-android/$RELEASE/libdeltachat.a ../arm64-v8a
cp target/aarch64-linux-android/$RELEASE/libdeltachat.a $jnidir/arm64-v8a
fi
if test -z $1 || test $1 = x86; then
@@ -106,7 +107,7 @@ if test -z $1 || test $1 = x86; then
export CFLAGS=-D__ANDROID_API__=16
TARGET_CC=i686-linux-android16-clang \
cargo +`cat rust-toolchain` build $RELEASEFLAG --target i686-linux-android -p deltachat_ffi
cp target/i686-linux-android/$RELEASE/libdeltachat.a ../x86
cp target/i686-linux-android/$RELEASE/libdeltachat.a $jnidir/x86
fi
if test -z $1 || test $1 = x86_64; then
@@ -114,7 +115,7 @@ if test -z $1 || test $1 = x86_64; then
export CFLAGS=-D__ANDROID_API__=21
TARGET_CC=x86_64-linux-android21-clang \
cargo +`cat rust-toolchain` build $RELEASEFLAG --target x86_64-linux-android -p deltachat_ffi
cp target/x86_64-linux-android/$RELEASE/libdeltachat.a ../x86_64
cp target/x86_64-linux-android/$RELEASE/libdeltachat.a $jnidir/x86_64
fi
echo -- ndk-build --