2017-08-28 18:02:01 +02:00
|
|
|
COMMON_SRC := \
|
2017-08-28 18:05:01 +02:00
|
|
|
common/bip32.c \
|
|
|
|
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 \
|
|
|
|
common/daemon_conn.c \
|
|
|
|
common/debug.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 \
|
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 \
|
2017-09-28 05:40:58 +02:00
|
|
|
common/io_debug.c \
|
2017-08-28 18:04:01 +02:00
|
|
|
common/json.c \
|
2017-08-28 18:05:01 +02:00
|
|
|
common/key_derive.c \
|
|
|
|
common/keyset.c \
|
|
|
|
common/msg_queue.c \
|
|
|
|
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 \
|
2017-08-28 18:05:01 +02:00
|
|
|
common/sphinx.c \
|
|
|
|
common/status.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 \
|
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
|
|
|
|
|
2017-08-28 18:04:01 +02:00
|
|
|
COMMON_HEADERS_NOGEN := $(COMMON_SRC:.c=.h) common/overflows.h common/htlc.h
|
|
|
|
COMMON_HEADERS_GEN := common/gen_htlc_state_names.h
|
|
|
|
|
|
|
|
COMMON_HEADERS := $(COMMON_HEADERS_GEN) $(COMMON_HEADERS_NOGEN)
|
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 > $@
|
|
|
|
|
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
|
|
|
|
|
|
|
check-source-bolt: $(COMMON_SRC:%=bolt-check/%) $(COMMON_HEADERS:%=bolt-check/%)
|
|
|
|
check-whitespace: $(COMMON_SRC:%=check-whitespace/%) $(COMMON_HEADERS:%=check-whitespace/%)
|
|
|
|
|
|
|
|
check-source: $(COMMON_SRC:%=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
|
|
|
|
|
|
|
include common/test/Makefile
|