2017-02-21 05:45:29 +01:00
|
|
|
#! /usr/bin/make
|
|
|
|
|
|
|
|
# Designed to be run one level up
|
2017-08-29 06:12:04 +02:00
|
|
|
opening-wrongdir:
|
|
|
|
$(MAKE) -C ../.. opening-all
|
2017-02-21 05:45:29 +01:00
|
|
|
|
2017-08-29 06:12:04 +02:00
|
|
|
default: opening-all
|
2017-02-21 05:45:29 +01:00
|
|
|
|
2017-08-29 06:12:04 +02:00
|
|
|
opening-all: lightningd/lightning_openingd
|
2017-02-21 05:45:29 +01:00
|
|
|
|
2017-08-29 06:12:04 +02:00
|
|
|
# opening needs these:
|
2017-02-21 05:45:29 +01:00
|
|
|
LIGHTNINGD_OPENING_HEADERS_GEN := \
|
2020-08-25 04:12:18 +02:00
|
|
|
openingd/openingd_wiregen.h
|
2017-02-21 05:45:29 +01:00
|
|
|
|
|
|
|
LIGHTNINGD_OPENING_HEADERS_NOGEN :=
|
|
|
|
|
|
|
|
LIGHTNINGD_OPENING_HEADERS := $(LIGHTNINGD_OPENING_HEADERS_GEN) $(LIGHTNINGD_OPENING_HEADERS_NOGEN)
|
|
|
|
|
2018-09-03 05:40:00 +02:00
|
|
|
LIGHTNINGD_OPENING_SRC := openingd/openingd.c \
|
2017-02-21 05:45:29 +01:00
|
|
|
$(LIGHTNINGD_OPENING_HEADERS:.h=.c)
|
|
|
|
LIGHTNINGD_OPENING_OBJS := $(LIGHTNINGD_OPENING_SRC:.c=.o)
|
|
|
|
|
|
|
|
# Control daemon uses this:
|
|
|
|
LIGHTNINGD_OPENING_CONTROL_HEADERS := $(LIGHTNINGD_OPENING_HEADERS)
|
|
|
|
LIGHTNINGD_OPENING_CONTROL_SRC := $(LIGHTNINGD_OPENING_HEADERS:.h=.c)
|
|
|
|
LIGHTNINGD_OPENING_CONTROL_OBJS := $(LIGHTNINGD_OPENING_CONTROL_SRC:.c=.o)
|
|
|
|
|
2020-08-25 04:12:18 +02:00
|
|
|
LIGHTNINGD_OPENING_GEN_SRC := $(filter openingd/%wiregen.c, $(LIGHTNINGD_OPENING_SRC) $(LIGHTNINGD_OPENING_CONTROL_SRC))
|
2017-02-21 05:45:29 +01:00
|
|
|
|
2020-08-25 04:12:18 +02:00
|
|
|
LIGHTNINGD_OPENING_SRC_NOGEN := $(filter-out openingd/%wiregen.c, $(LIGHTNINGD_OPENING_SRC))
|
2017-02-21 05:45:29 +01:00
|
|
|
|
|
|
|
# Add to headers which any object might need.
|
|
|
|
LIGHTNINGD_HEADERS_GEN += $(LIGHTNINGD_OPENING_HEADERS_GEN)
|
|
|
|
LIGHTNINGD_HEADERS_NOGEN += $(LIGHTNINGD_OPENING_HEADERS_NOGEN)
|
|
|
|
|
2017-08-28 18:02:01 +02:00
|
|
|
# Common source we use.
|
|
|
|
OPENINGD_COMMON_OBJS := \
|
2019-02-20 12:31:48 +01:00
|
|
|
common/amount.o \
|
2018-05-10 01:18:19 +02:00
|
|
|
common/base32.o \
|
2019-07-30 07:25:12 +02:00
|
|
|
common/bigsize.o \
|
2017-08-28 18:05:01 +02:00
|
|
|
common/bip32.o \
|
|
|
|
common/channel_config.o \
|
2020-05-15 12:29:53 +02:00
|
|
|
common/channel_id.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 \
|
2018-03-29 04:06:45 +02:00
|
|
|
common/daemon.o \
|
2017-08-28 18:05:01 +02:00
|
|
|
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 \
|
2019-05-01 00:58:09 +02:00
|
|
|
common/features.o \
|
2019-12-12 15:04:53 +01:00
|
|
|
common/fee_states.o \
|
2017-08-28 18:02:01 +02:00
|
|
|
common/funding_tx.o \
|
2020-08-25 04:19:38 +02:00
|
|
|
common/status_wiregen.o \
|
|
|
|
common/peer_status_wiregen.o \
|
2019-09-06 08:09:36 +02:00
|
|
|
common/gossip_rcvd_filter.o \
|
2019-05-06 04:00:06 +02:00
|
|
|
common/gossip_store.o \
|
2019-12-12 15:04:53 +01:00
|
|
|
common/htlc_state.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-08-28 18:05:01 +02:00
|
|
|
common/key_derive.o \
|
|
|
|
common/keyset.o \
|
2017-12-15 11:22:57 +01:00
|
|
|
common/memleak.o \
|
2017-08-28 18:05:01 +02:00
|
|
|
common/msg_queue.o \
|
2020-05-16 03:29:05 +02:00
|
|
|
common/node_id.o \
|
2020-01-23 00:38:04 +01:00
|
|
|
common/onionreply.o \
|
2020-05-07 02:43:42 +02:00
|
|
|
common/penalty_base.o \
|
2019-06-03 20:11:25 +02:00
|
|
|
common/per_peer_state.o \
|
2018-02-23 06:53:47 +01:00
|
|
|
common/peer_billboard.o \
|
2017-08-28 18:05:01 +02:00
|
|
|
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 \
|
2020-05-16 00:13:22 +02:00
|
|
|
common/setup.o \
|
2017-08-28 18:05:01 +02:00
|
|
|
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:02:01 +02:00
|
|
|
common/type_to_string.o \
|
|
|
|
common/utils.o \
|
2017-08-28 18:05:01 +02:00
|
|
|
common/utxo.o \
|
2017-12-06 04:22:35 +01:00
|
|
|
common/version.o \
|
2018-04-26 06:51:01 +02:00
|
|
|
common/wire_error.o \
|
|
|
|
common/wireaddr.o \
|
2020-08-25 04:05:45 +02:00
|
|
|
gossipd/gossipd_peerd_wiregen.o \
|
2018-04-26 06:51:01 +02:00
|
|
|
lightningd/gossip_msg.o
|
2017-08-28 18:02:01 +02:00
|
|
|
|
2017-02-21 05:45:29 +01:00
|
|
|
$(LIGHTNINGD_OPENING_OBJS): $(LIGHTNINGD_HEADERS)
|
|
|
|
|
|
|
|
LIGHTNINGD_OPENING_OBJS := $(LIGHTNINGD_OPENING_SRC:.c=.o) $(LIGHTNINGD_OPENING_GEN_SRC:.c=.o)
|
|
|
|
|
2017-08-28 18:13:01 +02:00
|
|
|
# Make sure these depend on everything.
|
|
|
|
ALL_OBJS += $(LIGHTNINGD_OPENING_OBJS)
|
2017-08-29 06:12:04 +02:00
|
|
|
ALL_PROGRAMS += lightningd/lightning_openingd
|
|
|
|
ALL_GEN_HEADERS += $(LIGHTNINGD_OPENING_HEADERS_GEN)
|
2017-08-28 18:13:01 +02:00
|
|
|
|
2017-08-29 06:12:04 +02:00
|
|
|
lightningd/lightning_openingd: $(LIGHTNINGD_OPENING_OBJS) $(OPENINGD_COMMON_OBJS) $(WIRE_OBJS) $(BITCOIN_OBJS) $(LIGHTNINGD_HSM_CLIENT_OBJS)
|
2017-02-21 05:45:29 +01:00
|
|
|
|
|
|
|
check-source: $(LIGHTNINGD_OPENING_SRC_NOGEN:%=check-src-include-order/%)
|
|
|
|
check-source-bolt: $(LIGHTNINGD_OPENING_SRC:%=bolt-check/%) $(LIGHTNINGD_OPENING_HEADERS:%=bolt-check/%)
|
|
|
|
|
|
|
|
check-whitespace: $(LIGHTNINGD_OPENING_SRC_NOGEN:%=check-whitespace/%) $(LIGHTNINGD_OPENING_HEADERS_NOGEN:%=check-whitespace/%)
|
|
|
|
|
2017-08-29 06:12:04 +02:00
|
|
|
clean: opening-clean
|
2017-02-21 05:45:29 +01:00
|
|
|
|
2017-08-29 06:12:04 +02:00
|
|
|
opening-clean:
|
2020-08-31 03:13:25 +02:00
|
|
|
$(RM) $(LIGHTNINGD_OPENING_OBJS)
|
2017-02-21 05:45:29 +01:00
|
|
|
|
2017-12-10 13:41:10 +01:00
|
|
|
-include openingd/test/Makefile
|