mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-12-29 10:04:41 +01:00
1746406e41
We create ALL_PROGRAMS, ALL_TEST_PROGRAMS, ALL_C_SOURCES and ALL_C_HEADERS. Then the toplevel Makefile knows which are autogenerated (by wildcard), so it can have all the rules to clean them or check the source as necessary. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
38 lines
999 B
Makefile
38 lines
999 B
Makefile
WALLET_TEST_SRC := $(wildcard wallet/test/run-*.c)
|
|
WALLET_TEST_OBJS := $(WALLET_TEST_SRC:.c=.o)
|
|
WALLET_TEST_PROGRAMS := $(WALLET_TEST_OBJS:.o=)
|
|
|
|
ALL_C_SOURCES += $(WALLET_TEST_SRC)
|
|
ALL_TEST_PROGRAMS += $(WALLET_TEST_PROGRAMS)
|
|
|
|
WALLET_TEST_COMMON_OBJS := \
|
|
common/amount.o \
|
|
common/base32.o \
|
|
common/derive_basepoints.o \
|
|
common/htlc_state.o \
|
|
common/htlc_wire.o \
|
|
common/fee_states.o \
|
|
common/type_to_string.o \
|
|
common/memleak.o \
|
|
common/node_id.o \
|
|
common/onionreply.o \
|
|
common/key_derive.o \
|
|
common/pseudorand.o \
|
|
common/setup.o \
|
|
common/timeout.o \
|
|
common/utils.o \
|
|
common/wireaddr.o \
|
|
common/version.o \
|
|
wallet/db_sqlite3.o \
|
|
wire/towire.o \
|
|
wire/fromwire.o
|
|
|
|
$(WALLET_TEST_PROGRAMS): $(BITCOIN_OBJS) $(WALLET_TEST_COMMON_OBJS)
|
|
$(WALLET_TEST_OBJS): $(WALLET_HDRS) $(WALLET_SRC)
|
|
|
|
wallet/tests: $(WALLET_TEST_PROGRAMS:%=unittest/%)
|
|
|
|
update-mocks: $(WALLET_TEST_SRC:%=update-mocks/%)
|
|
|
|
check-units: $(WALLET_TEST_PROGRAMS:%=unittest/%)
|