|
|
|
COMMON_SRC := \
|
|
|
|
common/close_tx.c \
|
|
|
|
common/configdir.c \
|
|
|
|
common/derive_basepoints.c \
|
|
|
|
common/funding_tx.c \
|
|
|
|
common/htlc_tx.c \
|
|
|
|
common/htlc_state.c \
|
|
|
|
common/initial_channel.c \
|
|
|
|
common/initial_commit_tx.c \
|
|
|
|
common/json.c \
|
|
|
|
common/permute_tx.c \
|
|
|
|
common/pseudorand.c \
|
|
|
|
common/timeout.c \
|
|
|
|
common/type_to_string.c \
|
|
|
|
common/utils.c \
|
|
|
|
common/version.c \
|
|
|
|
common/withdraw_tx.c
|
|
|
|
|
|
|
|
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)
|
|
|
|
COMMON_OBJS := $(COMMON_SRC:.c=.o)
|
|
|
|
|
|
|
|
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 > $@
|
|
|
|
|
|
|
|
check-makefile: check-common-makefile
|
|
|
|
|
|
|
|
check-common-makefile:
|
|
|
|
@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
|
|
|
|
|
|
|
|
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/%) \
|
|
|
|
$(COMMON_HEADERS_NOGEN:%=check-hdr-include-order/%)
|