From: Matt Corallo Date: Wed, 23 Jun 2021 14:41:29 +0000 (+0000) Subject: Set a library suffix for all platforms, useful for android builds X-Git-Tag: v0.0.98.4~4 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=342ef4ad607f8ced0bdd88d8157084e524a33fe8;p=ldk-java Set a library suffix for all platforms, useful for android builds --- 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