From cb848729578c2fb22509ee52ea024fe159cd8909 Mon Sep 17 00:00:00 2001 From: Simon Laux Date: Tue, 23 Nov 2021 11:37:51 +0100 Subject: [PATCH] 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 --- ndk-make.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ndk-make.sh b/ndk-make.sh index 68582da0f..f5fc09b13 100755 --- a/ndk-make.sh +++ b/ndk-make.sh @@ -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 --