X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=genbindings.sh;h=e2a6ca7c75ec107ae403709410504ced37738932;hb=ecf12ebc7a74f5fa1726e0316bf77efd65c1c82d;hp=128a3afbe481147d0a5df19b4a0df7ed164f7446;hpb=0e664466ed5f4d91bea291a7b64bb916e90ef472;p=ldk-java diff --git a/genbindings.sh b/genbindings.sh index 128a3afb..e2a6ca7c 100755 --- a/genbindings.sh +++ b/genbindings.sh @@ -6,6 +6,7 @@ usage() { echo "debug should either be true, false, or leaks" echo "debug of leaks turns on leak tracking on an optimized release bianry" echo "android_web should either be true or false and indicates if we build for android (Java) or web (WASM)" + echo "Note that web currently generates the same results as !web (ie Node.JS)" exit 1 } [ "$1" = "" ] && usage @@ -157,7 +158,7 @@ if [ "$2" != "wasm" ]; then popd LDK_LIB="tmp/libldk.bc tmp/libldk.a" fi - $COMPILE -o liblightningjni_release$LDK_TARGET_SUFFIX.so -flto -O3 -I"$1"/lightning-c-bindings/include/ $2 src/main/jni/bindings.c $LDK_LIB + $COMPILE -o liblightningjni_release$LDK_TARGET_SUFFIX.so -flto -O3 -I"$1"/lightning-c-bindings/include/ $2 src/main/jni/bindings.c $LDK_LIB -lm if [ "$IS_MAC" = "false" -a "$4" = "false" ]; then GLIBC_SYMBS="$(objdump -T liblightningjni_release$LDK_TARGET_SUFFIX.so | grep GLIBC_ | grep -v "GLIBC_2\.2\." | grep -v "GLIBC_2\.3\(\.\| \)" | grep -v "GLIBC_2.\(14\|17\) " || echo)" if [ "$GLIBC_SYMBS" != "" ]; then @@ -219,17 +220,14 @@ else mv $F.tmp $F done rm imports.mts.part - if [ "$4" = "true" ]; then - tsc - else - tsc --types node --typeRoots . - cp ../$WASM_FILE liblightningjs.wasm - echo Ready to publish! - if [ -x "$(which node)" ]; then - NODE_V="$(node --version)" - if [ "${NODE_V:1:2}" -gt 14 ]; then - node test/node.mjs - fi + tsc --types node --typeRoots . + cp ../$WASM_FILE liblightningjs.wasm + cp ../README.md README.md + echo Ready to publish! + if [ -x "$(which node)" ]; then + NODE_V="$(node --version)" + if [ "${NODE_V:1:2}" -gt 14 ]; then + node test/node.mjs fi fi fi