2017-03-07 11:56:12 +10:30
|
|
|
#! /usr/bin/make
|
|
|
|
|
|
|
|
# Designed to be run one level up
|
2017-08-29 13:42:04 +09:30
|
|
|
channeld-wrongdir:
|
2017-03-07 11:56:12 +10:30
|
|
|
$(MAKE) -C ../.. lightningd/channel-all
|
|
|
|
|
2017-08-29 13:42:04 +09:30
|
|
|
default: channeld-all
|
2017-03-07 11:56:12 +10:30
|
|
|
|
2017-08-29 13:42:04 +09:30
|
|
|
channeld-all: lightningd/lightning_channeld
|
2017-03-07 11:56:12 +10:30
|
|
|
|
|
|
|
LIGHTNINGD_CHANNEL_HEADERS_GEN := \
|
2018-02-19 11:36:14 +10:30
|
|
|
channeld/gen_full_channel_error_names.h \
|
2017-08-29 13:42:04 +09:30
|
|
|
channeld/gen_channel_wire.h
|
2017-03-07 11:56:12 +10:30
|
|
|
|
2017-08-29 01:27:01 +09:30
|
|
|
LIGHTNINGD_CHANNEL_HEADERS_NOGEN := \
|
2017-08-29 13:42:04 +09:30
|
|
|
channeld/channeld_htlc.h \
|
|
|
|
channeld/commit_tx.h \
|
2018-02-19 11:36:14 +10:30
|
|
|
channeld/full_channel.h \
|
|
|
|
channeld/full_channel_error.h
|
2017-03-07 11:56:12 +10:30
|
|
|
|
|
|
|
LIGHTNINGD_CHANNEL_HEADERS := $(LIGHTNINGD_CHANNEL_HEADERS_GEN) $(LIGHTNINGD_CHANNEL_HEADERS_NOGEN)
|
|
|
|
|
2018-09-03 13:10:00 +09:30
|
|
|
LIGHTNINGD_CHANNEL_SRC := channeld/channeld.c \
|
2017-08-29 13:42:04 +09:30
|
|
|
channeld/commit_tx.c \
|
|
|
|
channeld/full_channel.c \
|
2018-02-19 11:36:14 +10:30
|
|
|
channeld/gen_channel_wire.c
|
2017-03-07 11:56:12 +10:30
|
|
|
LIGHTNINGD_CHANNEL_OBJS := $(LIGHTNINGD_CHANNEL_SRC:.c=.o)
|
|
|
|
|
2017-08-29 01:43:01 +09:30
|
|
|
# Make sure these depend on everything.
|
|
|
|
ALL_OBJS += $(LIGHTNINGD_CHANNEL_OBJS)
|
2017-08-29 13:42:04 +09:30
|
|
|
ALL_PROGRAMS += lightningd/lightning_channeld
|
|
|
|
ALL_GEN_HEADERS += $(LIGHTNINGD_CHANNEL_HEADERS_GEN)
|
2017-08-29 01:43:01 +09:30
|
|
|
|
2017-08-29 01:32:01 +09:30
|
|
|
# Common source we use.
|
|
|
|
CHANNELD_COMMON_OBJS := \
|
2019-02-20 22:01:48 +10:30
|
|
|
common/amount.o \
|
2018-05-10 08:48:19 +09:30
|
|
|
common/base32.o \
|
2019-07-30 14:55:03 +09:30
|
|
|
common/bigsize.o \
|
2019-02-20 22:01:48 +10:30
|
|
|
common/bip32.o \
|
2017-08-29 01:35:01 +09:30
|
|
|
common/channel_config.o \
|
2017-10-11 20:26:50 +10:30
|
|
|
common/crypto_state.o \
|
2017-08-29 01:35:01 +09:30
|
|
|
common/crypto_sync.o \
|
|
|
|
common/cryptomsg.o \
|
2018-03-29 12:36:45 +10:30
|
|
|
common/daemon.o \
|
2017-08-29 01:35:01 +09:30
|
|
|
common/daemon_conn.o \
|
2017-08-29 01:32:01 +09:30
|
|
|
common/derive_basepoints.o \
|
2017-08-29 01:35:01 +09:30
|
|
|
common/dev_disconnect.o \
|
2018-12-10 11:33:42 +10:30
|
|
|
common/features.o \
|
2019-12-13 00:34:53 +10:30
|
|
|
common/fee_states.o \
|
2018-02-08 11:55:12 +10:30
|
|
|
common/gen_status_wire.o \
|
2018-02-19 11:36:15 +10:30
|
|
|
common/gen_peer_status_wire.o \
|
2019-09-06 15:39:36 +09:30
|
|
|
common/gossip_rcvd_filter.o \
|
2019-05-06 11:30:06 +09:30
|
|
|
common/gossip_store.o \
|
2020-03-20 11:59:24 +10:30
|
|
|
common/hmac.o \
|
2017-08-29 01:34:01 +09:30
|
|
|
common/htlc_state.o \
|
2019-05-31 17:00:32 +09:30
|
|
|
common/htlc_trim.o \
|
2017-08-29 01:32:01 +09:30
|
|
|
common/htlc_tx.o \
|
2017-08-29 01:35:01 +09:30
|
|
|
common/htlc_wire.o \
|
2017-08-29 01:32:01 +09:30
|
|
|
common/initial_channel.o \
|
|
|
|
common/initial_commit_tx.o \
|
2017-08-29 01:35:01 +09:30
|
|
|
common/keyset.o \
|
|
|
|
common/key_derive.o \
|
2017-12-15 20:52:57 +10:30
|
|
|
common/memleak.o \
|
2017-08-29 01:35:01 +09:30
|
|
|
common/msg_queue.o \
|
2019-04-08 19:28:32 +09:30
|
|
|
common/node_id.o \
|
2019-12-05 20:36:28 +10:30
|
|
|
common/onion.o \
|
2020-01-23 10:08:04 +10:30
|
|
|
common/onionreply.o \
|
2018-02-23 16:23:47 +10:30
|
|
|
common/peer_billboard.o \
|
2017-08-29 01:35:01 +09:30
|
|
|
common/peer_failed.o \
|
2019-06-04 03:41:25 +09:30
|
|
|
common/per_peer_state.o \
|
2017-08-29 01:32:01 +09:30
|
|
|
common/permute_tx.o \
|
2018-08-09 12:23:17 +09:30
|
|
|
common/ping.o \
|
2017-08-29 01:34:01 +09:30
|
|
|
common/pseudorand.o \
|
2018-01-31 13:23:42 +10:30
|
|
|
common/read_peer_msg.o \
|
2017-08-29 01:35:01 +09:30
|
|
|
common/sphinx.o \
|
|
|
|
common/status.o \
|
2018-02-08 11:55:12 +10:30
|
|
|
common/status_wire.o \
|
2018-01-08 20:31:09 +10:30
|
|
|
common/subdaemon.o \
|
2017-08-29 01:34:01 +09:30
|
|
|
common/timeout.o \
|
2017-08-29 01:32:01 +09:30
|
|
|
common/type_to_string.o \
|
|
|
|
common/utils.o \
|
2017-12-02 13:00:29 +01:00
|
|
|
common/utxo.o \
|
2017-11-29 13:47:35 +10:30
|
|
|
common/version.o \
|
2017-12-19 10:32:28 +10:30
|
|
|
common/wire_error.o \
|
2017-11-29 13:47:35 +10:30
|
|
|
common/wireaddr.o \
|
2018-11-13 14:33:51 +10:30
|
|
|
gossipd/gen_gossip_peerd_wire.o \
|
2018-09-20 12:36:42 +09:30
|
|
|
hsmd/gen_hsm_wire.o \
|
2017-11-29 13:47:35 +10:30
|
|
|
lightningd/gossip_msg.o \
|
|
|
|
wire/fromwire.o \
|
|
|
|
wire/towire.o
|
2017-08-29 01:32:01 +09:30
|
|
|
|
2018-02-19 11:36:14 +10:30
|
|
|
LIGHTNINGD_CHANNEL_SRC_GEN := $(filter channeld/gen_%, $(LIGHTNINGD_CHANNEL_SRC))
|
|
|
|
|
|
|
|
LIGHTNINGD_CHANNEL_SRC_NOGEN := $(filter-out channeld/gen_%, $(LIGHTNINGD_CHANNEL_SRC))
|
|
|
|
|
2017-03-07 11:56:12 +10:30
|
|
|
# Control daemon uses this:
|
2017-08-29 01:27:01 +09:30
|
|
|
LIGHTNINGD_CHANNEL_CONTROL_HEADERS := $(LIGHTNINGD_CHANNEL_HEADERS_GEN)
|
2018-02-19 11:36:14 +10:30
|
|
|
LIGHTNINGD_CHANNEL_CONTROL_SRC := $(LIGHTNINGD_CHANNEL_SRC_GEN)
|
2017-03-07 11:56:12 +10:30
|
|
|
LIGHTNINGD_CHANNEL_CONTROL_OBJS := $(LIGHTNINGD_CHANNEL_CONTROL_SRC:.c=.o)
|
|
|
|
|
|
|
|
# Add to headers which any object might need.
|
|
|
|
LIGHTNINGD_HEADERS_GEN += $(LIGHTNINGD_CHANNEL_HEADERS_GEN)
|
|
|
|
LIGHTNINGD_HEADERS_NOGEN += $(LIGHTNINGD_CHANNEL_HEADERS_NOGEN)
|
|
|
|
|
2018-02-19 11:36:14 +10:30
|
|
|
channeld/gen_full_channel_error_names.h: channeld/full_channel_error.h ccan/ccan/cdump/tools/cdump-enumstr
|
|
|
|
ccan/ccan/cdump/tools/cdump-enumstr channeld/full_channel_error.h > $@
|
|
|
|
|
|
|
|
|
2018-05-17 14:38:11 +09:30
|
|
|
$(LIGHTNINGD_CHANNEL_OBJS): $(LIGHTNINGD_HEADERS) $(LIGHTNINGD_GOSSIP_CONTROL_HEADERS)
|
2017-03-07 11:56:12 +10:30
|
|
|
|
2017-08-29 13:42:04 +09:30
|
|
|
channeld/gen_channel_wire.h: $(WIRE_GEN) channeld/channel_wire.csv
|
2019-07-23 17:51:11 -05:00
|
|
|
$(WIRE_GEN) --page header $@ channel_wire_type < channeld/channel_wire.csv > $@
|
2017-03-07 11:56:12 +10:30
|
|
|
|
2017-08-29 13:42:04 +09:30
|
|
|
channeld/gen_channel_wire.c: $(WIRE_GEN) channeld/channel_wire.csv
|
2019-07-23 17:51:11 -05:00
|
|
|
$(WIRE_GEN) --page impl ${@:.c=.h} channel_wire_type < channeld/channel_wire.csv > $@
|
2017-03-07 11:56:12 +10:30
|
|
|
|
2018-02-19 11:36:14 +10:30
|
|
|
LIGHTNINGD_CHANNEL_OBJS := $(LIGHTNINGD_CHANNEL_SRC:.c=.o)
|
2017-03-07 11:56:12 +10:30
|
|
|
|
2017-08-29 13:42:04 +09:30
|
|
|
lightningd/lightning_channeld: $(LIGHTNINGD_CHANNEL_OBJS) $(WIRE_ONION_OBJS) $(CHANNELD_COMMON_OBJS) $(WIRE_OBJS) $(BITCOIN_OBJS) $(LIGHTNINGD_HSM_CLIENT_OBJS)
|
2017-03-07 11:56:12 +10:30
|
|
|
|
|
|
|
check-source: $(LIGHTNINGD_CHANNEL_SRC_NOGEN:%=check-src-include-order/%)
|
|
|
|
check-source-bolt: $(LIGHTNINGD_CHANNEL_SRC:%=bolt-check/%) $(LIGHTNINGD_CHANNEL_HEADERS:%=bolt-check/%)
|
|
|
|
|
|
|
|
check-whitespace: $(LIGHTNINGD_CHANNEL_SRC_NOGEN:%=check-whitespace/%) $(LIGHTNINGD_CHANNEL_HEADERS_NOGEN:%=check-whitespace/%)
|
|
|
|
|
|
|
|
clean: lightningd/channel-clean
|
|
|
|
|
|
|
|
lightningd/channel-clean:
|
2017-11-23 13:33:07 +10:30
|
|
|
$(RM) $(LIGHTNINGD_CHANNEL_OBJS) channeld/gen_*
|
2017-03-07 11:56:12 +10:30
|
|
|
|
2017-11-29 12:09:06 +01:00
|
|
|
-include channeld/test/Makefile
|