2017-03-07 02:26:12 +01:00
|
|
|
#! /usr/bin/make
|
|
|
|
|
|
|
|
# Designed to be run one level up
|
2017-08-29 06:12:04 +02:00
|
|
|
channeld-wrongdir:
|
2017-03-07 02:26:12 +01:00
|
|
|
$(MAKE) -C ../.. lightningd/channel-all
|
|
|
|
|
2017-08-29 06:12:04 +02:00
|
|
|
default: channeld-all
|
2017-03-07 02:26:12 +01:00
|
|
|
|
2017-08-29 06:12:04 +02:00
|
|
|
channeld-all: lightningd/lightning_channeld
|
2017-03-07 02:26:12 +01:00
|
|
|
|
|
|
|
LIGHTNINGD_CHANNEL_HEADERS_GEN := \
|
2018-02-19 02:06:14 +01:00
|
|
|
channeld/gen_full_channel_error_names.h \
|
2017-08-29 06:12:04 +02:00
|
|
|
channeld/gen_channel_wire.h
|
2017-03-07 02:26:12 +01:00
|
|
|
|
2017-08-28 17:57:01 +02:00
|
|
|
LIGHTNINGD_CHANNEL_HEADERS_NOGEN := \
|
2017-08-29 06:12:04 +02:00
|
|
|
channeld/channeld_htlc.h \
|
|
|
|
channeld/commit_tx.h \
|
2018-02-19 02:06:14 +01:00
|
|
|
channeld/full_channel.h \
|
|
|
|
channeld/full_channel_error.h
|
2017-03-07 02:26:12 +01:00
|
|
|
|
|
|
|
LIGHTNINGD_CHANNEL_HEADERS := $(LIGHTNINGD_CHANNEL_HEADERS_GEN) $(LIGHTNINGD_CHANNEL_HEADERS_NOGEN)
|
|
|
|
|
2017-08-29 06:12:04 +02:00
|
|
|
LIGHTNINGD_CHANNEL_SRC := channeld/channel.c \
|
|
|
|
channeld/commit_tx.c \
|
|
|
|
channeld/full_channel.c \
|
2018-02-19 02:06:14 +01:00
|
|
|
channeld/gen_channel_wire.c
|
2017-03-07 02:26:12 +01:00
|
|
|
LIGHTNINGD_CHANNEL_OBJS := $(LIGHTNINGD_CHANNEL_SRC:.c=.o)
|
|
|
|
|
2017-08-28 18:13:01 +02:00
|
|
|
# Make sure these depend on everything.
|
|
|
|
ALL_OBJS += $(LIGHTNINGD_CHANNEL_OBJS)
|
2017-08-29 06:12:04 +02:00
|
|
|
ALL_PROGRAMS += lightningd/lightning_channeld
|
|
|
|
ALL_GEN_HEADERS += $(LIGHTNINGD_CHANNEL_HEADERS_GEN)
|
2017-08-28 18:13:01 +02:00
|
|
|
|
2017-08-28 18:02:01 +02:00
|
|
|
# Common source we use.
|
|
|
|
CHANNELD_COMMON_OBJS := \
|
2017-11-29 12:09:06 +01:00
|
|
|
common/bip32.o \
|
2017-08-28 18:05:01 +02:00
|
|
|
common/channel_config.o \
|
2017-10-11 11:56:50 +02:00
|
|
|
common/crypto_state.o \
|
2017-08-28 18:05:01 +02:00
|
|
|
common/crypto_sync.o \
|
|
|
|
common/cryptomsg.o \
|
|
|
|
common/daemon_conn.o \
|
2017-08-28 18:02:01 +02:00
|
|
|
common/derive_basepoints.o \
|
2017-08-28 18:05:01 +02:00
|
|
|
common/dev_disconnect.o \
|
2018-02-08 02:25:12 +01:00
|
|
|
common/gen_status_wire.o \
|
2017-08-28 18:04:01 +02:00
|
|
|
common/htlc_state.o \
|
2017-08-28 18:02:01 +02:00
|
|
|
common/htlc_tx.o \
|
2017-08-28 18:05:01 +02:00
|
|
|
common/htlc_wire.o \
|
2017-08-28 18:02:01 +02:00
|
|
|
common/initial_channel.o \
|
|
|
|
common/initial_commit_tx.o \
|
2017-09-28 05:41:00 +02:00
|
|
|
common/io_debug.o \
|
2017-08-28 18:05:01 +02:00
|
|
|
common/keyset.o \
|
|
|
|
common/key_derive.o \
|
2017-12-15 11:22:57 +01:00
|
|
|
common/memleak.o \
|
2017-08-28 18:05:01 +02:00
|
|
|
common/msg_queue.o \
|
|
|
|
common/ping.o \
|
|
|
|
common/peer_failed.o \
|
2017-08-28 18:02:01 +02:00
|
|
|
common/permute_tx.o \
|
2017-08-28 18:04:01 +02:00
|
|
|
common/pseudorand.o \
|
2018-01-31 03:53:42 +01:00
|
|
|
common/read_peer_msg.o \
|
2017-08-28 18:05:01 +02:00
|
|
|
common/sphinx.o \
|
|
|
|
common/status.o \
|
2018-02-08 02:25:12 +01:00
|
|
|
common/status_wire.o \
|
2018-01-08 11:01:09 +01:00
|
|
|
common/subdaemon.o \
|
2017-08-28 18:04:01 +02:00
|
|
|
common/timeout.o \
|
2017-08-28 18:02:01 +02:00
|
|
|
common/type_to_string.o \
|
|
|
|
common/utils.o \
|
2017-12-02 13:00:29 +01:00
|
|
|
common/utxo.o \
|
2017-11-29 04:17:35 +01:00
|
|
|
common/version.o \
|
2017-12-19 01:02:28 +01:00
|
|
|
common/wire_error.o \
|
2017-11-29 04:17:35 +01:00
|
|
|
common/wireaddr.o \
|
|
|
|
gossipd/gen_gossip_wire.o \
|
|
|
|
lightningd/gossip_msg.o \
|
|
|
|
wire/fromwire.o \
|
|
|
|
wire/towire.o
|
2017-08-28 18:02:01 +02:00
|
|
|
|
2018-02-19 02:06:14 +01:00
|
|
|
LIGHTNINGD_CHANNEL_SRC_GEN := $(filter channeld/gen_%, $(LIGHTNINGD_CHANNEL_SRC))
|
|
|
|
|
|
|
|
LIGHTNINGD_CHANNEL_SRC_NOGEN := $(filter-out channeld/gen_%, $(LIGHTNINGD_CHANNEL_SRC))
|
|
|
|
|
2017-03-07 02:26:12 +01:00
|
|
|
# Control daemon uses this:
|
2017-08-28 17:57:01 +02:00
|
|
|
LIGHTNINGD_CHANNEL_CONTROL_HEADERS := $(LIGHTNINGD_CHANNEL_HEADERS_GEN)
|
2018-02-19 02:06:14 +01:00
|
|
|
LIGHTNINGD_CHANNEL_CONTROL_SRC := $(LIGHTNINGD_CHANNEL_SRC_GEN)
|
2017-03-07 02:26:12 +01:00
|
|
|
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 02:06:14 +01:00
|
|
|
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 > $@
|
|
|
|
|
|
|
|
|
2017-03-07 02:26:12 +01:00
|
|
|
$(LIGHTNINGD_CHANNEL_OBJS): $(LIGHTNINGD_HEADERS)
|
|
|
|
|
2017-08-29 06:12:04 +02:00
|
|
|
channeld/gen_channel_wire.h: $(WIRE_GEN) channeld/channel_wire.csv
|
|
|
|
$(WIRE_GEN) --header $@ channel_wire_type < channeld/channel_wire.csv > $@
|
2017-03-07 02:26:12 +01:00
|
|
|
|
2017-08-29 06:12:04 +02:00
|
|
|
channeld/gen_channel_wire.c: $(WIRE_GEN) channeld/channel_wire.csv
|
|
|
|
$(WIRE_GEN) ${@:.c=.h} channel_wire_type < channeld/channel_wire.csv > $@
|
2017-03-07 02:26:12 +01:00
|
|
|
|
2018-02-19 02:06:14 +01:00
|
|
|
LIGHTNINGD_CHANNEL_OBJS := $(LIGHTNINGD_CHANNEL_SRC:.c=.o)
|
2017-03-07 02:26:12 +01:00
|
|
|
|
2017-08-29 06:12:04 +02:00
|
|
|
lightningd/lightning_channeld: $(LIGHTNINGD_CHANNEL_OBJS) $(WIRE_ONION_OBJS) $(CHANNELD_COMMON_OBJS) $(WIRE_OBJS) $(BITCOIN_OBJS) $(LIGHTNINGD_HSM_CLIENT_OBJS)
|
2017-03-07 02:26:12 +01:00
|
|
|
|
|
|
|
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 04:03:07 +01:00
|
|
|
$(RM) $(LIGHTNINGD_CHANNEL_OBJS) channeld/gen_*
|
2017-03-07 02:26:12 +01:00
|
|
|
|
2017-11-29 12:09:06 +01:00
|
|
|
-include channeld/test/Makefile
|