@ -2,15 +2,16 @@
WIRE_HEADERS := wire/onion_defs.h \
wire/peer_wire.h \
wire/onion_wire.h \
wire/tlvstream.h \
wire/wire.h \
wire/wire_sync.h \
wire/wire_io.h \
wire/peer_wiregen.h \
wire/onion_wiregen.h \
wire/peer$( EXP) _wiregen.h \
wire/onion$( EXP) _wiregen.h \
wire/common_wiregen.h \
wire/peer_printgen.h \
wire/onion_printgen.h
wire/peer$( EXP) _printgen.h \
wire/onion$( EXP) _printgen.h
# We don't include peer_printgen/onion_printgen here since most don't need it.
WIRE_SRC := wire/wire_sync.c \
@ -20,12 +21,12 @@ WIRE_SRC := wire/wire_sync.c \
wire/tlvstream.c \
wire/towire.c \
wire/common_wiregen.c \
wire/peer_wiregen.c \
wire/onion_wiregen.c
wire/peer$( EXP) _wiregen.c \
wire/onion$( EXP) _wiregen.c
WIRE_PRINT_SRC := \
wire/onion_printgen.c \
wire/peer_printgen.c
wire/onion$( EXP) _printgen.c \
wire/peer$( EXP) _printgen.c
WIRE_OBJS := $( WIRE_SRC:.c= .o)
WIRE_PRINT_OBJS := $( WIRE_PRINT_SRC:.c= .o)
@ -61,23 +62,13 @@ ifeq ($(EXPERIMENTAL_FEATURES),1)
EXPERIMENTAL_PEER_PATCHES := $( sort $( wildcard wire/extracted_peer_experimental_*) )
EXPERIMENTAL_ONION_PATCHES := $( sort $( wildcard wire/extracted_onion_experimental_*) )
wire/peer_wire.csv : wire /extracted_ peer_wire_csv $( EXPERIMENTAL_PEER_PATCHES )
wire/peer_exp_ wire.csv : wire /peer_wire_csv $( EXPERIMENTAL_PEER_PATCHES )
@set -e; trap " rm -f $@ . $$ $$ " 0; cp $< $@ .$$ $$ ; for exp in $( EXPERIMENTAL_PEER_PATCHES) ; do patch $@ .$$ $$ $$ exp >/dev/null ; done ; mv $@ .$$ $$ $@
wire/onion_wire.csv : wire /extracted_ onion_wire_csv $( EXPERIMENTAL_ONION_PATCHES )
wire/onion_exp_ wire.csv : wire /onion_wire_csv $( EXPERIMENTAL_ONION_PATCHES )
@set -e; trap " rm -f $@ . $$ $$ " 0; cp $< $@ .$$ $$ ; for exp in $( EXPERIMENTAL_ONION_PATCHES) ; do patch $@ .$$ $$ $$ exp; done >/dev/null ; mv $@ .$$ $$ $@
e l s e # /* EXPERIMENTAL_FEATURES */
wire/peer_wire.csv : wire /extracted_peer_wire_csv
@cp $< $@
wire/onion_wire.csv : wire /extracted_onion_wire_csv
@cp $< $@
e n d i f
# We (may) need to rebuild these if config changes
wire/peer_wire.csv wire/onion_wire.csv : config .vars
# tlvs_n1 and n2 are used for test vectors, thus not referenced: expose them
# for testing and to prevent compile error about them being unused.
# This will be easier if test vectors are moved to separate files.
@ -90,6 +81,12 @@ wire/onion_wiregen.h_args := --include='bitcoin/short_channel_id.h' --include='b
wire/onion_wiregen.c_args : = -s --expose -tlv -type =tlv_payload
# Same for _exp versions
wire/peer_exp_wiregen.h_args : = $( wire /peer_wiregen .h_args )
wire/peer_exp_wiregen.c_args : = $( wire /peer_wiregen .c_args )
wire/onion_exp_wiregen.h_args : = $( wire /onion_wiregen .h_args )
wire/onion_exp_wiregen.c_args : = $( wire /onion_wiregen .c_args )
maintainer-clean : wire -maintainer -clean
wire-maintainer-clean :