2018-02-08 02:25:12 +01:00
|
|
|
COMMON_SRC_NOGEN := \
|
2019-02-20 12:31:48 +01:00
|
|
|
common/amount.c \
|
2018-05-10 01:18:19 +02:00
|
|
|
common/base32.c \
|
2017-11-22 01:25:01 +01:00
|
|
|
common/bech32.c \
|
2018-04-23 16:20:55 +02:00
|
|
|
common/bech32_util.c \
|
2017-08-28 18:05:01 +02:00
|
|
|
common/bip32.c \
|
2017-11-22 01:25:39 +01:00
|
|
|
common/bolt11.c \
|
2017-08-28 18:05:01 +02:00
|
|
|
common/channel_config.c \
|
2017-08-28 18:02:01 +02:00
|
|
|
common/close_tx.c \
|
2017-08-28 18:04:01 +02:00
|
|
|
common/configdir.c \
|
2017-10-11 11:56:50 +02:00
|
|
|
common/crypto_state.c \
|
2017-08-28 18:05:01 +02:00
|
|
|
common/crypto_sync.c \
|
|
|
|
common/cryptomsg.c \
|
2018-03-29 04:06:45 +02:00
|
|
|
common/daemon.c \
|
2017-08-28 18:05:01 +02:00
|
|
|
common/daemon_conn.c \
|
2018-06-28 03:34:47 +02:00
|
|
|
common/decode_short_channel_ids.c \
|
2017-08-28 18:02:01 +02:00
|
|
|
common/derive_basepoints.c \
|
2017-08-28 18:05:01 +02:00
|
|
|
common/dev_disconnect.c \
|
2018-01-12 14:35:52 +01:00
|
|
|
common/features.c \
|
2017-08-28 18:02:01 +02:00
|
|
|
common/funding_tx.c \
|
2017-10-26 05:00:19 +02:00
|
|
|
common/hash_u5.c \
|
2017-08-28 18:04:01 +02:00
|
|
|
common/htlc_state.c \
|
2017-08-28 18:05:01 +02:00
|
|
|
common/htlc_tx.c \
|
|
|
|
common/htlc_wire.c \
|
2017-08-28 18:02:01 +02:00
|
|
|
common/initial_channel.c \
|
|
|
|
common/initial_commit_tx.c \
|
2018-09-26 20:33:28 +02:00
|
|
|
common/io_lock.c \
|
2017-08-28 18:04:01 +02:00
|
|
|
common/json.c \
|
2018-12-08 01:39:28 +01:00
|
|
|
common/json_escaped.c \
|
2019-01-15 04:54:27 +01:00
|
|
|
common/json_helpers.c \
|
2018-12-08 01:39:28 +01:00
|
|
|
common/json_tok.c \
|
2017-08-28 18:05:01 +02:00
|
|
|
common/key_derive.c \
|
|
|
|
common/keyset.c \
|
2017-12-15 11:17:54 +01:00
|
|
|
common/memleak.c \
|
2017-08-28 18:05:01 +02:00
|
|
|
common/msg_queue.c \
|
2018-12-08 01:39:28 +01:00
|
|
|
common/param.c \
|
2018-02-23 06:53:47 +01:00
|
|
|
common/peer_billboard.c \
|
2017-08-28 18:05:01 +02:00
|
|
|
common/peer_failed.c \
|
2017-08-28 18:02:01 +02:00
|
|
|
common/permute_tx.c \
|
2017-08-28 18:05:01 +02:00
|
|
|
common/ping.c \
|
2017-08-28 18:04:01 +02:00
|
|
|
common/pseudorand.c \
|
2018-01-31 03:53:35 +01:00
|
|
|
common/read_peer_msg.c \
|
2018-05-05 06:57:58 +02:00
|
|
|
common/socket_close.c \
|
2017-08-28 18:05:01 +02:00
|
|
|
common/sphinx.c \
|
|
|
|
common/status.c \
|
2018-02-08 02:25:12 +01:00
|
|
|
common/status_wire.c \
|
2018-01-08 11:01:09 +01:00
|
|
|
common/subdaemon.c \
|
2017-08-28 18:04:01 +02:00
|
|
|
common/timeout.c \
|
2017-08-28 18:02:01 +02:00
|
|
|
common/type_to_string.c \
|
|
|
|
common/utils.c \
|
2017-08-28 18:05:01 +02:00
|
|
|
common/utxo.c \
|
2017-08-28 18:02:01 +02:00
|
|
|
common/version.c \
|
2018-04-05 21:19:47 +02:00
|
|
|
common/wallet_tx.c \
|
2017-10-23 06:17:38 +02:00
|
|
|
common/wireaddr.c \
|
2017-10-11 12:01:50 +02:00
|
|
|
common/wire_error.c \
|
2017-08-28 18:02:01 +02:00
|
|
|
common/withdraw_tx.c
|
|
|
|
|
2018-02-19 02:06:15 +01:00
|
|
|
COMMON_SRC_GEN := common/gen_status_wire.c common/gen_peer_status_wire.c
|
2018-02-08 02:25:12 +01:00
|
|
|
|
2018-12-08 01:39:28 +01:00
|
|
|
COMMON_HEADERS_NOGEN := $(COMMON_SRC_NOGEN:.c=.h) common/overflows.h common/htlc.h common/status_levels.h common/json_command.h common/jsonrpc_errors.h
|
2018-02-19 02:06:15 +01:00
|
|
|
COMMON_HEADERS_GEN := common/gen_htlc_state_names.h common/gen_status_wire.h common/gen_peer_status_wire.h
|
2017-08-28 18:04:01 +02:00
|
|
|
|
|
|
|
COMMON_HEADERS := $(COMMON_HEADERS_GEN) $(COMMON_HEADERS_NOGEN)
|
2018-02-08 02:25:12 +01:00
|
|
|
COMMON_SRC := $(COMMON_SRC_NOGEN) $(COMMON_SRC_GEN)
|
|
|
|
|
2017-08-28 18:02:01 +02:00
|
|
|
COMMON_OBJS := $(COMMON_SRC:.c=.o)
|
|
|
|
|
2017-08-28 18:13:01 +02:00
|
|
|
# Common objects depends on bitcoin/ external/ and ccan
|
|
|
|
$(COMMON_OBJS): $(CCAN_HEADERS) $(BITCOIN_HEADERS) $(EXTERNAL_HEADERS) $(COMMON_HEADERS_GEN)
|
|
|
|
|
2017-08-29 06:12:04 +02:00
|
|
|
ALL_GEN_HEADERS += $(COMMON_HEADERS_GEN)
|
|
|
|
ALL_OBJS += $(COMMON_OBJS)
|
|
|
|
|
2017-08-28 18:04:01 +02:00
|
|
|
common/gen_htlc_state_names.h: common/htlc_state.h ccan/ccan/cdump/tools/cdump-enumstr
|
|
|
|
ccan/ccan/cdump/tools/cdump-enumstr common/htlc_state.h > $@
|
|
|
|
|
2018-02-08 02:25:12 +01:00
|
|
|
common/gen_status_wire.h: $(WIRE_GEN) common/status_wire.csv
|
|
|
|
$(WIRE_GEN) --header $@ status < common/status_wire.csv > $@
|
|
|
|
|
|
|
|
common/gen_status_wire.c: $(WIRE_GEN) common/status_wire.csv
|
|
|
|
$(WIRE_GEN) ${@:.c=.h} status < common/status_wire.csv > $@
|
|
|
|
|
2018-02-19 02:06:15 +01:00
|
|
|
common/gen_peer_status_wire.h: $(WIRE_GEN) common/peer_status_wire.csv
|
|
|
|
$(WIRE_GEN) --header $@ peer_status < common/peer_status_wire.csv > $@
|
|
|
|
|
|
|
|
common/gen_peer_status_wire.c: $(WIRE_GEN) common/peer_status_wire.csv
|
|
|
|
$(WIRE_GEN) ${@:.c=.h} peer_status < common/peer_status_wire.csv > $@
|
|
|
|
|
2017-08-28 18:02:01 +02:00
|
|
|
check-makefile: check-common-makefile
|
|
|
|
|
|
|
|
check-common-makefile:
|
2017-10-26 05:00:19 +02:00
|
|
|
if [ x"`LC_ALL=C ls common/*.h | grep -v ^common/gen_`" != x"`echo $(COMMON_HEADERS_NOGEN) | tr ' ' '\n' | LC_ALL=C sort`" ]; then echo COMMON_HEADERS_NOGEN incorrect; exit 1; fi
|
2017-08-28 18:02:01 +02:00
|
|
|
|
2018-02-08 02:25:12 +01:00
|
|
|
check-source-bolt: $(COMMON_SRC_NOGEN:%=bolt-check/%) $(COMMON_HEADERS:%=bolt-check/%)
|
|
|
|
check-whitespace: $(COMMON_SRC_NOGEN:%=check-whitespace/%) $(COMMON_HEADERS:%=check-whitespace/%)
|
2017-08-28 18:02:01 +02:00
|
|
|
|
2018-02-08 02:25:12 +01:00
|
|
|
check-source: $(COMMON_SRC_NOGEN:%=check-src-include-order/%) \
|
2017-08-28 18:04:01 +02:00
|
|
|
$(COMMON_HEADERS_NOGEN:%=check-hdr-include-order/%)
|
2017-08-28 18:13:01 +02:00
|
|
|
|
2017-11-23 04:03:07 +01:00
|
|
|
clean: common-clean
|
|
|
|
|
|
|
|
common-clean:
|
|
|
|
$(RM) common/gen*
|
|
|
|
|
2017-08-28 18:13:01 +02:00
|
|
|
include common/test/Makefile
|