From 2a5efba76327fa2b4601abaf9a0253db11beee44 Mon Sep 17 00:00:00 2001 From: link2xt Date: Wed, 6 Jul 2022 00:00:00 +0000 Subject: [PATCH] Pass APP_ABI to ndk-build instead of creating temporary Application.mk It's simpler and stores objects inside obj/ in-tree, preventing unnecessary rebuilds. --- ndk-make.sh | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/ndk-make.sh b/ndk-make.sh index a7b1296e7..21de034ef 100755 --- a/ndk-make.sh +++ b/ndk-make.sh @@ -138,22 +138,15 @@ rm -fr "$TMPLIB" echo -- ndk-build -- -cd .. -# Set the right arch in Application.mk: -oldDotMk="$(cat Application.mk)" +cd ../.. -TMP=$(mktemp) if test $1; then - sed "s/APP_ABI.*/APP_ABI := $1/g" Application.mk >"$TMP" + ndk-build APP_ABI="$1" else - # We are compiling for all architectures: - sed "s/APP_ABI.*/APP_ABI := armeabi-v7a arm64-v8a x86 x86_64/g" Application.mk >"$TMP" + # We are compiling for all architectures defined in Application.mk + ndk-build fi -cd .. -ndk-build NDK_APPLICATION_MK=$TMP -rm "$TMP" - if test $1; then echo "NDK_ARCH=$1" >ndkArch else