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>
25 lines
821 B
Makefile
25 lines
821 B
Makefile
check-units: wire-tests
|
|
|
|
# Note that these actually #include everything they need, except ccan/ and bitcoin/.
|
|
# That allows for unit testing of statics, and special effects.
|
|
WIRE_TEST_SRC := $(wildcard wire/test/run-*.c)
|
|
WIRE_TEST_OBJS := $(WIRE_TEST_SRC:.c=.o)
|
|
WIRE_TEST_PROGRAMS := $(WIRE_TEST_OBJS:.o=)
|
|
|
|
ALL_C_SOURCES += $(WIRE_TEST_SRC)
|
|
ALL_TEST_PROGRAMS += $(WIRE_TEST_PROGRAMS)
|
|
|
|
WIRE_TEST_COMMON_OBJS := \
|
|
common/utils.o
|
|
|
|
update-mocks: $(WIRE_TEST_SRC:%=update-mocks/%)
|
|
|
|
# run-tlvstream.c needs to reach into bitcoin/pubkey for SUPERVERBOSE
|
|
$(WIRE_TEST_PROGRAMS): $(WIRE_TEST_COMMON_OBJS) $(filter-out bitcoin/pubkey.o,$(BITCOIN_OBJS))
|
|
|
|
$(WIRE_TEST_OBJS): $(WIRE_HEADERS) $(WIRE_SRC) $(WIRE_PRINT_SRC)
|
|
|
|
wire-tests: $(WIRE_TEST_PROGRAMS:%=unittest/%)
|
|
|
|
wire/test/run-peer-wire: wire/peer_wiregen.o common/bigsize.o
|