2018-07-24 08:18:58 +02:00
|
|
|
#! /usr/bin/make
|
|
|
|
|
|
|
|
# Designed to be run one level up
|
|
|
|
connectd-wrongdir:
|
|
|
|
$(MAKE) -C .. connectd-all
|
|
|
|
|
|
|
|
default: connectd-all
|
|
|
|
|
|
|
|
# Control daemon uses this:
|
|
|
|
LIGHTNINGD_CONNECT_CONTROL_HEADERS := connectd/gen_connect_wire.h connectd/gen_connect_gossip_wire.h
|
|
|
|
LIGHTNINGD_CONNECT_CONTROL_SRC := connectd/gen_connect_wire.c connectd/gen_connect_gossip_wire.c
|
|
|
|
LIGHTNINGD_CONNECT_CONTROL_OBJS := $(LIGHTNINGD_CONNECT_CONTROL_SRC:.c=.o)
|
|
|
|
|
|
|
|
# connectd needs these:
|
|
|
|
LIGHTNINGD_CONNECT_HEADERS := connectd/gen_connect_wire.h \
|
|
|
|
connectd/gen_connect_gossip_wire.h \
|
2018-09-03 05:40:00 +02:00
|
|
|
connectd/connectd.h \
|
2018-09-27 23:04:19 +02:00
|
|
|
connectd/peer_exchange_initmsg.h \
|
2018-07-24 08:18:58 +02:00
|
|
|
connectd/handshake.h \
|
|
|
|
connectd/netaddress.h \
|
|
|
|
connectd/tor_autoservice.h \
|
|
|
|
connectd/tor.h
|
2018-07-24 08:18:58 +02:00
|
|
|
LIGHTNINGD_CONNECT_SRC := $(LIGHTNINGD_CONNECT_HEADERS:.h=.c)
|
|
|
|
LIGHTNINGD_CONNECT_OBJS := $(LIGHTNINGD_CONNECT_SRC:.c=.o)
|
|
|
|
|
|
|
|
# Make sure these depend on everything.
|
|
|
|
ALL_OBJS += $(LIGHTNINGD_CONNECT_OBJS)
|
|
|
|
ALL_PROGRAMS += lightningd/lightning_connectd
|
|
|
|
ALL_GEN_HEADERS += connectd/gen_connect_wire.h connectd/gen_connect_gossip_wire.h
|
|
|
|
|
|
|
|
# For checking
|
|
|
|
LIGHTNINGD_CONNECT_ALLSRC_NOGEN := $(filter-out connectd/gen_%, $(LIGHTNINGD_CONNECT_CLIENT_SRC) $(LIGHTNINGD_CONNECT_SRC))
|
|
|
|
LIGHTNINGD_CONNECT_ALLHEADERS_NOGEN := $(filter-out connectd/gen_%, $(LIGHTNINGD_CONNECT_CLIENT_HEADERS) $(LIGHTNINGD_CONNECT_HEADERS))
|
|
|
|
|
|
|
|
# Add to headers which any object might need.
|
|
|
|
LIGHTNINGD_HEADERS_GEN += $(LIGHTNINGD_CONNECT_HEADERS)
|
|
|
|
|
|
|
|
# Common source we use.
|
|
|
|
CONNECTD_COMMON_OBJS := \
|
2019-02-20 12:31:48 +01:00
|
|
|
common/amount.o \
|
2018-07-24 08:18:58 +02:00
|
|
|
common/base32.o \
|
|
|
|
common/bech32.o \
|
|
|
|
common/bech32_util.o \
|
2019-07-30 07:25:12 +02:00
|
|
|
common/bigsize.o \
|
2018-07-24 08:18:58 +02:00
|
|
|
common/bip32.o \
|
|
|
|
common/crypto_state.o \
|
|
|
|
common/cryptomsg.o \
|
|
|
|
common/daemon.o \
|
|
|
|
common/daemon_conn.o \
|
|
|
|
common/derive_basepoints.o \
|
|
|
|
common/dev_disconnect.o \
|
|
|
|
common/features.o \
|
|
|
|
common/gen_status_wire.o \
|
2018-12-03 00:02:11 +01:00
|
|
|
common/key_derive.o \
|
2018-11-21 22:45:37 +01:00
|
|
|
common/memleak.o \
|
2018-07-24 08:18:58 +02:00
|
|
|
common/msg_queue.o \
|
2019-04-08 11:58:32 +02:00
|
|
|
common/node_id.o \
|
2019-06-03 20:11:25 +02:00
|
|
|
common/per_peer_state.o \
|
2018-07-24 08:18:58 +02:00
|
|
|
common/pseudorand.o \
|
|
|
|
common/status.o \
|
|
|
|
common/status_wire.o \
|
|
|
|
common/subdaemon.o \
|
|
|
|
common/timeout.o \
|
|
|
|
common/type_to_string.o \
|
|
|
|
common/utils.o \
|
|
|
|
common/utxo.o \
|
|
|
|
common/version.o \
|
|
|
|
common/wireaddr.o \
|
|
|
|
common/wire_error.o \
|
|
|
|
gossipd/gen_gossip_wire.o \
|
2018-09-20 05:06:42 +02:00
|
|
|
hsmd/gen_hsm_wire.o \
|
2018-07-24 08:18:58 +02:00
|
|
|
lightningd/gossip_msg.o \
|
|
|
|
wire/gen_onion_wire.o
|
|
|
|
|
|
|
|
$(LIGHTNINGD_CONNECT_OBJS): $(LIGHTNINGD_HEADERS) $(LIGHTNINGD_CONNECT_HEADERS)
|
|
|
|
|
|
|
|
$(LIGHTNINGD_CONNECT_CONTROL_OBJS) : $(LIGHTNINGD_CONNECT_CONTROL_HEADERS)
|
|
|
|
|
|
|
|
connectd-all: lightningd/lightning_connectd
|
|
|
|
|
|
|
|
lightningd/lightning_connectd: $(LIGHTNINGD_CONNECT_OBJS) $(CONNECTD_COMMON_OBJS) $(BITCOIN_OBJS) $(WIRE_OBJS)
|
|
|
|
|
|
|
|
connectd/gen_connect_wire.h: $(WIRE_GEN) connectd/connect_wire.csv
|
2019-07-24 00:51:11 +02:00
|
|
|
$(WIRE_GEN) --page header $@ connect_wire_type < connectd/connect_wire.csv > $@
|
2018-07-24 08:18:58 +02:00
|
|
|
|
|
|
|
connectd/gen_connect_wire.c: $(WIRE_GEN) connectd/connect_wire.csv
|
2019-07-24 00:51:11 +02:00
|
|
|
$(WIRE_GEN) --page impl ${@:.c=.h} connect_wire_type < connectd/connect_wire.csv > $@
|
2018-07-24 08:18:58 +02:00
|
|
|
|
|
|
|
connectd/gen_connect_gossip_wire.h: $(WIRE_GEN) connectd/connect_gossip_wire.csv
|
2019-07-24 00:51:11 +02:00
|
|
|
$(WIRE_GEN) --page header $@ connect_gossip_wire_type < connectd/connect_gossip_wire.csv > $@
|
2018-07-24 08:18:58 +02:00
|
|
|
|
|
|
|
connectd/gen_connect_gossip_wire.c: $(WIRE_GEN) connectd/connect_gossip_wire.csv
|
2019-07-24 00:51:11 +02:00
|
|
|
$(WIRE_GEN) --page impl ${@:.c=.h} connect_gossip_wire_type < connectd/connect_gossip_wire.csv > $@
|
2018-07-24 08:18:58 +02:00
|
|
|
|
|
|
|
check-source: $(LIGHTNINGD_CONNECT_ALLSRC_NOGEN:%=check-src-include-order/%) $(LIGHTNINGD_CONNECT_ALLHEADERS_NOGEN:%=check-hdr-include-order/%)
|
|
|
|
check-source-bolt: $(LIGHTNINGD_CONNECT_SRC:%=bolt-check/%) $(LIGHTNINGD_CONNECT_HEADERS:%=bolt-check/%)
|
|
|
|
check-whitespace: $(LIGHTNINGD_CONNECT_ALLSRC_NOGEN:%=check-whitespace/%) $(LIGHTNINGD_CONNECT_ALLHEADERS_NOGEN:%=check-whitespace/%)
|
|
|
|
|
|
|
|
clean: connectd-clean
|
|
|
|
|
|
|
|
connectd-clean:
|
|
|
|
$(RM) $(LIGHTNINGD_CONNECT_OBJS) connectd/gen_*
|
|
|
|
|
|
|
|
-include connectd/test/Makefile
|