From 342ef4ad607f8ced0bdd88d8157084e524a33fe8 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Wed, 23 Jun 2021 14:41:29 +0000 Subject: [PATCH] Set a library suffix for all platforms, useful for android builds --- genbindings.sh | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/genbindings.sh b/genbindings.sh index 30af22a9..7ecbdeba 100755 --- a/genbindings.sh +++ b/genbindings.sh @@ -26,13 +26,19 @@ if [ "$TARGET_STRING" = "" ]; then fi case "$TARGET_STRING" in "x86_64-pc-linux"*) - LDK_TARGET_SUFFIX="_Linux-amd64" ;; + LDK_TARGET_SUFFIX="_Linux-amd64" + LDK_JAR_TARGET=true + ;; "x86_64-apple-darwin"*) - LDK_TARGET_SUFFIX="_MacOSX-x86_64" ;; + LDK_TARGET_SUFFIX="_MacOSX-x86_64" + LDK_JAR_TARGET=true + ;; "aarch64-apple-darwin"*) - LDK_TARGET_SUFFIX="_MacOSX-aarch64" ;; + LDK_TARGET_SUFFIX="_MacOSX-aarch64" + LDK_JAR_TARGET=true + ;; *) - LDK_TARGET_SUFFIX="" + LDK_TARGET_SUFFIX="_${TARGET_STRING}" esac if [ "$LDK_TARGET_CPU" = "" ]; then LDK_TARGET_CPU="sandybridge" @@ -96,7 +102,7 @@ else exit 1 fi fi - if [ "$LDK_TARGET_SUFFIX" != "" ]; then + if [ "$LDK_JAR_TARGET" = "true" ]; then # Copy to JNI native directory for inclusion in JARs cp liblightningjni_release$LDK_TARGET_SUFFIX.so src/main/resources/liblightningjni$LDK_TARGET_SUFFIX.nativelib fi -- 2.39.5