Makefile: use completely separate spec-derived files for EXPERIMENTAL_FEATURES

This avoids overwriting the ones in git, and generally makes things neater.

We have convenience headers wire/peer_wire.h and wire/onion_wire.h to
avoid most #ifdefs: simply include those.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2020-09-08 06:36:50 +09:30
parent d8e8426b52
commit c34c055d82
58 changed files with 109 additions and 80 deletions

View File

@@ -82,7 +82,7 @@ PLUGIN_COMMON_OBJS := \
common/version.o \
common/wireaddr.o \
wire/fromwire.o \
wire/onion_wiregen.o \
wire/onion$(EXP)_wiregen.o \
wire/tlvstream.o \
wire/towire.o
@@ -95,7 +95,7 @@ plugins/fundchannel: common/addr.o $(PLUGIN_FUNDCHANNEL_OBJS) $(PLUGIN_LIB_OBJS)
plugins/bcli: bitcoin/chainparams.o $(PLUGIN_BCLI_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_COMMON_OBJS) $(JSMN_OBJS) $(CCAN_OBJS)
plugins/keysend: bitcoin/chainparams.o wire/tlvstream.o wire/onion_wiregen.o $(PLUGIN_KEYSEND_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_PAY_LIB_OBJS) $(PLUGIN_COMMON_OBJS) $(JSMN_OBJS) $(CCAN_OBJS)
plugins/keysend: bitcoin/chainparams.o wire/tlvstream.o wire/onion$(EXP)_wiregen.o $(PLUGIN_KEYSEND_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_PAY_LIB_OBJS) $(PLUGIN_COMMON_OBJS) $(JSMN_OBJS) $(CCAN_OBJS)
$(PLUGIN_KEYSEND_OBJS): $(PLUGIN_PAY_LIB_HEADER)
$(PLUGIN_ALL_OBJS): $(PLUGIN_LIB_HEADER)

View File

@@ -3,7 +3,7 @@
#include <ccan/tal/str/str.h>
#include <plugins/libplugin-pay.h>
#include <plugins/libplugin.h>
#include <wire/onion_wiregen.h>
#include <wire/onion_wire.h>
#define PREIMAGE_TLV_TYPE 5482373484
#define KEYSEND_FEATUREBIT 55

View File

@@ -4,7 +4,7 @@
#include <common/bolt11.h>
#include <plugins/libplugin.h>
#include <wire/onion_wiregen.h>
#include <wire/onion_wire.h>
struct legacy_payload {
struct short_channel_id scid;