From 17f457568a9d4a89b00a8019c615eb38419104bf Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Wed, 30 Sep 2015 10:54:54 +0930 Subject: [PATCH] Makefile: generate libsecpk1 properly. And clean it. Signed-off-by: Rusty Russell --- Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 91b71bbb8..910300ebb 100644 --- a/Makefile +++ b/Makefile @@ -114,7 +114,9 @@ gen_state_names.h: state_types.h ccan/ccan/cdump/tools/cdump-enumstr # We build a static libsecpk1, since we need schnorr for alpha # (and it's not API stable yet!). -libsecp256k1.a: +libsecp256k1.a: secp256k1/libsecp256k1.la + +secp256k1/libsecp256k1.la: cd secp256k1 && ./autogen.sh && ./configure --enable-static=yes --enable-shared=no --enable-tests=no --libdir=`pwd`/.. $(MAKE) -C secp256k1 install-exec @@ -170,10 +172,14 @@ update-ccan: $(RM) -r ccan.old distclean: clean + $(MAKE) -C secp256k1/ distclean || true + $(RM) libsecp256k1.a $(RM) lightning.pb-c.c lightning.pb-c.h ccan/config.h gen_version.h $(RM) doc/deployable-lightning.pdf clean: + $(MAKE) -C secp256k1/ clean || true + $(RM) libsecp256k1.{a,la} $(RM) $(PROGRAMS) test-cli/leak-anchor-sigs $(RM) bitcoin/*.o *.o $(PROGRAMS:=.o) $(CCAN_OBJS) $(CCAN_EXTRA_OBJS) $(RM) doc/deployable-lightning.{aux,bbl,blg,dvi,log,out,tex}