mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-20 02:27:51 +01:00
3af081aded
Christian reported that we weren't generating some gen_ files. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
59 lines
3.0 KiB
Makefile
59 lines
3.0 KiB
Makefile
#! /usr/bin/make
|
|
|
|
# Designed to be run one level up
|
|
lightningd/gossip-wrongdir:
|
|
$(MAKE) -C .. lightningd/gossip-all
|
|
|
|
default: lightningd/gossip-all
|
|
|
|
# Control daemon uses this:
|
|
LIGHTNINGD_GOSSIP_CONTROL_HEADERS := lightningd/gossip/gen_gossip_control_wire.h \
|
|
lightningd/gossip/gen_gossip_status_wire.h
|
|
LIGHTNINGD_GOSSIP_CONTROL_SRC := lightningd/gossip/gen_gossip_control_wire.c \
|
|
lightningd/gossip/gen_gossip_status_wire.c
|
|
LIGHTNINGD_GOSSIP_CONTROL_OBJS := $(LIGHTNINGD_GOSSIP_CONTROL_SRC:.c=.o)
|
|
|
|
# lightningd/gossip needs these:
|
|
LIGHTNINGD_GOSSIP_HEADERS := lightningd/gossip/gen_gossip_control_wire.h \
|
|
lightningd/gossip/gen_gossip_status_wire.h
|
|
LIGHTNINGD_GOSSIP_SRC := lightningd/gossip/gossip.c \
|
|
$(LIGHTNINGD_GOSSIP_HEADERS:.h=.c)
|
|
LIGHTNINGD_GOSSIP_OBJS := $(LIGHTNINGD_GOSSIP_SRC:.c=.o)
|
|
|
|
# For checking
|
|
LIGHTNINGD_GOSSIP_ALLSRC_NOGEN := $(filter-out lightningd/gossip/gen_%, $(LIGHTNINGD_GOSSIP_CLIENT_SRC) $(LIGHTNINGD_GOSSIP_SRC))
|
|
LIGHTNINGD_GOSSIP_ALLHEADERS_NOGEN := $(filter-out lightningd/gossip/gen_%, $(LIGHTNINGD_GOSSIP_CLIENT_HEADERS) $(LIGHTNINGD_GOSSIP_HEADERS))
|
|
|
|
# Add to headers which any object might need.
|
|
LIGHTNINGD_HEADERS += $(LIGHTNINGD_GOSSIP_HEADERS)
|
|
|
|
$(LIGHTNINGD_GOSSIP_OBJS) $(LIGHTNINGD_GOSSIP_CLIENT_OBJS): $(CCAN_HEADERS) $(CORE_HEADERS) $(BITCOIN_HEADERS) $(GEN_HEADERS) $(WIRE_HEADERS) $(LIGHTNINGD_GOSSIP_HEADERS) $(LIGHTNINGD_GOSSIP_GEN_HEADERS) $(LIGHTNINGD_LIB_HEADERS) $(LIBBASE58_HEADERS) $(LIGHTNINGD_HEADERS)
|
|
|
|
lightningd/gossip-all: lightningd/lightningd_gossip $(LIGHTNINGD_GOSSIP_CLIENT_OBJS)
|
|
|
|
lightningd/lightningd_gossip: $(LIGHTNINGD_GOSSIP_OBJS) $(CORE_OBJS) $(BITCOIN_OBJS) $(WIRE_OBJS) $(CCAN_OBJS) $(LIGHTNINGD_LIB_OBJS) $(LIBBASE58_OBJS) libsecp256k1.a
|
|
$(CC) $(CFLAGS) -o $@ $^ $(LDLIBS)
|
|
|
|
lightningd/gossip/gen_gossip_control_wire.h: $(WIRE_GEN) lightningd/gossip/gossip_control_wire_csv
|
|
$(WIRE_GEN) --header $@ gossip_control_wire_type < lightningd/gossip/gossip_control_wire_csv > $@
|
|
|
|
lightningd/gossip/gen_gossip_control_wire.c: $(WIRE_GEN) lightningd/gossip/gossip_control_wire_csv
|
|
$(WIRE_GEN) ${@:.c=.h} gossip_control_wire_type < lightningd/gossip/gossip_control_wire_csv > $@
|
|
|
|
lightningd/gossip/gen_gossip_status_wire.h: $(WIRE_GEN) lightningd/gossip/gossip_status_wire_csv
|
|
$(WIRE_GEN) --header $@ gossip_status_wire_type < lightningd/gossip/gossip_status_wire_csv > $@
|
|
|
|
lightningd/gossip/gen_gossip_status_wire.c: $(WIRE_GEN) lightningd/gossip/gossip_status_wire_csv
|
|
$(WIRE_GEN) ${@:.c=.h} gossip_status_wire_type < lightningd/gossip/gossip_status_wire_csv > $@
|
|
|
|
check-source: $(LIGHTNINGD_GOSSIP_ALLSRC_NOGEN:%=check-src-include-order/%) $(LIGHTNINGD_GOSSIP_ALLHEADERS_NOGEN:%=check-hdr-include-order/%)
|
|
check-source-bolt: $(LIGHTNINGD_GOSSIP_SRC:%=bolt-check/%) $(LIGHTNINGD_GOSSIP_HEADERS:%=bolt-check/%)
|
|
check-whitespace: $(LIGHTNINGD_GOSSIP_ALLSRC_NOGEN:%=check-whitespace/%) $(LIGHTNINGD_GOSSIP_ALLHEADERS_NOGEN:%=check-whitespace/%)
|
|
|
|
clean: lightningd/gossip-clean
|
|
|
|
lightningd/gossip-clean:
|
|
$(RM) $(LIGHTNINGD_GOSSIP_OBJS) gen_*
|
|
|
|
-include lightningd/gossip/test/Makefile
|