lnsocket

A minimal C library for connecting to the lightning network
git clone git://jb55.com/lnsocket
Log | Files | Refs | Submodules | README | LICENSE

commit 35e8d296845d33949c0ee1b5c53965cf927cc859
parent 49bf1736e06e1da5218ba0ab125d6907e3d43097
Author: William Casarin <jb55@jb55.com>
Date:   Mon, 14 Mar 2022 10:56:55 -0700

make: add install steps

Diffstat:
MMakefile | 15+++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile @@ -10,7 +10,7 @@ SIM_SDK=$(XCODEDIR)/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimu IOS_SDK=$(XCODEDIR)/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk HEADERS=config.h deps/secp256k1/include/secp256k1.h deps/libsodium/src/libsodium/include/sodium/crypto_aead_chacha20poly1305.h -ARS=libsecp256k1.a libsodium.a +ARS=libsecp256k1.a libsodium.a lnsocket.a WASM_ARS=target/wasm/libsecp256k1.a target/wasm/libsodium.a target/wasm/lnsocket.a OBJS=sha256.o hkdf.o hmac.o sha512.o lnsocket.o error.o handshake.o crypto.o bigsize.o commando.o bech32.o ARM64_OBJS=$(OBJS:.o=-arm64.o) @@ -20,7 +20,7 @@ BINS=test lnrpc DEPS=$(OBJS) $(ARS) $(HEADERS) -all: $(BINS) lnsocket.a +all: $(BINS) $(ARS) ios: target/ios/lnsocket.a target/ios/libsodium.a target/ios/libsecp256k1.a @@ -147,6 +147,17 @@ deps/libsodium/src/libsodium/.libs/libsodium.a: deps/libsodium/config.log cd deps/libsodium/src/libsodium; \ make -j libsodium.la +install: $(DEPS) + mkdir -p $(PREFIX)/lib $(PREFIX)/include + cp lnsocket.h $(PREFIX)/include + cp lnsocket.a libsecp256k1.a libsodium.a $(PREFIX)/lib + +install-js: wasm + mkdir -p $(PREFIX)/share/lnsocket + cp target/wasm/lnsocket.wasm target/wasm/lnsocket.js $(PREFIX)/share/lnsocket + +install-all: install install-js + check: test @./test