From e40509c6c3c4f0dcaffcd65cfca6fb749f52a970 Mon Sep 17 00:00:00 2001 From: Christian Decker Date: Wed, 30 Nov 2016 14:43:26 +0100 Subject: [PATCH] wire: Linking against wire objs --- Makefile | 5 +++-- daemon/Makefile | 4 ++-- wire/Makefile | 4 +++- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 461fa5560..86d2183fb 100644 --- a/Makefile +++ b/Makefile @@ -44,6 +44,7 @@ CORE_SRC := \ protobuf_convert.c \ utils.c \ version.c + CORE_OBJS := $(CORE_SRC:.c=.o) CCAN_OBJS := \ @@ -254,7 +255,7 @@ secp256k1/libsecp256k1.la: lightning.pb-c.c lightning.pb-c.h: lightning.proto @if $(CHANGED_FROM_GIT); then echo $(PROTOCC) lightning.proto --c_out=.; $(PROTOCC) lightning.proto --c_out=.; else touch $@; fi -$(TEST_PROGRAMS): % : %.o $(BITCOIN_OBJS) $(CCAN_OBJS) utils.o version.o libsecp256k1.a +$(TEST_PROGRAMS): % : %.o $(BITCOIN_OBJS) $(WIRE_OBJS) $(CCAN_OBJS) utils.o version.o libsecp256k1.a ccan/config.h: ccan/tools/configurator/configurator if $< > $@.new; then mv $@.new $@; else rm $@.new; exit 1; fi @@ -317,7 +318,7 @@ maintainer-clean: distclean $(RM) doc/deployable-lightning.pdf $(RM) $(MANPAGES) -clean: daemon-clean +clean: daemon-clean wire-clean $(MAKE) -C secp256k1/ clean || true $(RM) libsecp256k1.{a,la} $(RM) $(PROGRAMS) diff --git a/daemon/Makefile b/daemon/Makefile index 3f3582255..06cced233 100644 --- a/daemon/Makefile +++ b/daemon/Makefile @@ -130,9 +130,9 @@ daemon/jsmn/jsmn.c: daemon/jsmn/jsmn.h daemon/jsmn.o: daemon/jsmn/jsmn.c $(COMPILE.c) -DJSMN_STRICT=1 $(OUTPUT_OPTION) $< -daemon/lightningd: $(DAEMON_OBJS) $(DAEMON_LIB_OBJS) $(DAEMON_JSMN_OBJS) $(CORE_OBJS) $(BITCOIN_OBJS) $(CCAN_OBJS) libsecp256k1.a +daemon/lightningd: $(DAEMON_OBJS) $(DAEMON_LIB_OBJS) $(DAEMON_JSMN_OBJS) $(CORE_OBJS) $(BITCOIN_OBJS) $(WIRE_OBJS) $(CCAN_OBJS) libsecp256k1.a -daemon/lightning-cli: $(DAEMON_CLI_OBJS) $(DAEMON_LIB_OBJS) $(DAEMON_JSMN_OBJS) $(CORE_OBJS) $(BITCOIN_OBJS) $(CCAN_OBJS) libsecp256k1.a +daemon/lightning-cli: $(DAEMON_CLI_OBJS) $(DAEMON_LIB_OBJS) $(DAEMON_JSMN_OBJS) $(CORE_OBJS) $(BITCOIN_OBJS) $(WIRE_OBJS) $(CCAN_OBJS) libsecp256k1.a daemon-clean: $(RM) $(DAEMON_OBJS) $(DAEMON_LIB_OBJS) $(DAEMON_CLI_OBJS) $(DAEMON_JSMN_OBJS) $(DAEMON_GEN_HEADERS) diff --git a/wire/Makefile b/wire/Makefile index 12842110c..79802219a 100644 --- a/wire/Makefile +++ b/wire/Makefile @@ -27,7 +27,9 @@ wire/gen_wire.o: wire/gen_wire.h clean: wire-clean +wire-all: wire/gen_wire.o wire/fromwire.o wire/towire.o + wire-clean: - $(RM) $(WIRE_OBJS) $(WIRE_GEN_SRC) $(WIRE_GEN_HEADERS) + $(RM) $(WIRE_OBJS) $(WIRE_GEN_SRC) $(WIRE_GEN_HEADERS) towire.c fromwire.c include wire/test/Makefile