2018-07-26 23:20:37 +02:00
|
|
|
DEVTOOLS_SRC := devtools/gen_print_wire.c devtools/gen_print_onion_wire.c devtools/print_wire.c
|
2018-02-01 01:08:37 +01:00
|
|
|
DEVTOOLS_OBJS := $(DEVTOOLS_SRC:.c=.o)
|
2019-08-21 05:52:46 +02:00
|
|
|
DEVTOOLS := devtools/bolt11-cli devtools/decodemsg devtools/onion devtools/dump-gossipstore devtools/gossipwith devtools/create-gossipstore devtools/mkcommit devtools/mkfunding devtools/mkclose
|
2018-09-21 02:29:44 +02:00
|
|
|
DEVTOOLS_TOOL_SRC := $(DEVTOOLS:=.c)
|
2018-02-01 01:08:37 +01:00
|
|
|
DEVTOOLS_TOOL_OBJS := $(DEVTOOLS_TOOL_SRC:.c=.o)
|
2017-11-22 01:26:08 +01:00
|
|
|
|
2019-07-16 01:20:37 +02:00
|
|
|
DEVTOOLS_BOLT_DEPS += $(BOLT_DEPS) tools/gen/print_impl_template tools/gen/print_header_template
|
|
|
|
|
2018-02-01 01:08:37 +01:00
|
|
|
DEVTOOLS_COMMON_OBJS := \
|
2019-02-20 12:31:48 +01:00
|
|
|
common/amount.o \
|
2018-06-28 03:34:47 +02:00
|
|
|
common/base32.o \
|
2017-11-22 01:26:08 +01:00
|
|
|
common/bech32.o \
|
2018-04-23 16:20:55 +02:00
|
|
|
common/bech32_util.o \
|
2019-07-30 07:25:03 +02:00
|
|
|
common/bigsize.o \
|
2017-11-22 01:26:08 +01:00
|
|
|
common/bolt11.o \
|
2019-06-03 20:11:25 +02:00
|
|
|
common/crypto_state.o \
|
2018-06-28 03:34:47 +02:00
|
|
|
common/decode_short_channel_ids.o \
|
2019-09-05 03:07:16 +02:00
|
|
|
common/features.o \
|
2017-11-22 01:26:08 +01:00
|
|
|
common/hash_u5.o \
|
2019-04-08 11:58:32 +02:00
|
|
|
common/node_id.o \
|
2019-06-03 20:11:25 +02:00
|
|
|
common/per_peer_state.o \
|
2019-02-21 11:36:16 +01:00
|
|
|
common/json.o \
|
|
|
|
common/json_helpers.o \
|
2017-11-22 01:26:08 +01:00
|
|
|
common/type_to_string.o \
|
|
|
|
common/utils.o \
|
2018-06-28 03:34:47 +02:00
|
|
|
common/version.o \
|
2019-01-08 01:21:50 +01:00
|
|
|
common/wireaddr.o \
|
2019-04-08 01:51:30 +02:00
|
|
|
wire/gen_onion_wire.o \
|
|
|
|
wire/gen_peer_wire.o
|
2017-11-22 01:26:08 +01:00
|
|
|
|
2018-09-21 02:29:44 +02:00
|
|
|
devtools-all: $(DEVTOOLS)
|
2017-11-22 01:26:08 +01:00
|
|
|
|
2019-07-16 01:20:37 +02:00
|
|
|
devtools/gen_print_wire.h: $(DEVTOOL_BOLT_DEPS) wire/gen_peer_wire_csv
|
2019-07-27 12:19:25 +02:00
|
|
|
$(BOLT_GEN) -P -s --page header $@ wire_type < wire/gen_peer_wire_csv > $@
|
2017-11-22 01:26:08 +01:00
|
|
|
|
2019-07-16 01:20:37 +02:00
|
|
|
devtools/gen_print_wire.c: $(DEVTOOL_BOLT_DEPS) wire/gen_peer_wire_csv
|
2019-07-27 12:19:25 +02:00
|
|
|
$(BOLT_GEN) -P -s --page impl ${@:.c=.h} wire_type < wire/gen_peer_wire_csv > $@
|
2018-02-01 01:08:37 +01:00
|
|
|
|
2019-07-16 01:20:37 +02:00
|
|
|
devtools/gen_print_onion_wire.h: $(DEVTOOL_BOLT_DEPS) wire/gen_onion_wire_csv
|
2019-07-27 12:19:25 +02:00
|
|
|
$(BOLT_GEN) -P -s --page header $@ onion_type < wire/gen_onion_wire_csv > $@
|
2018-07-26 23:20:37 +02:00
|
|
|
|
2019-07-16 01:20:37 +02:00
|
|
|
devtools/gen_print_onion_wire.c: $(DEVTOOL_BOLT_DEPS) wire/gen_onion_wire_csv
|
2019-07-27 12:19:25 +02:00
|
|
|
$(BOLT_GEN) -P -s --page impl ${@:.c=.h} onion_type < wire/gen_onion_wire_csv > $@
|
2018-07-26 23:20:37 +02:00
|
|
|
|
2019-07-21 05:04:59 +02:00
|
|
|
devtools/bolt11-cli: $(DEVTOOLS_OBJS) $(DEVTOOLS_COMMON_OBJS) $(JSMN_OBJS) $(CCAN_OBJS) $(BITCOIN_OBJS) wire/fromwire.o wire/towire.o wire/tlvstream.o devtools/bolt11-cli.o
|
2018-02-01 01:08:37 +01:00
|
|
|
|
2019-07-21 05:04:59 +02:00
|
|
|
devtools/decodemsg: $(DEVTOOLS_OBJS) $(DEVTOOLS_COMMON_OBJS) $(JSMN_OBJS) $(CCAN_OBJS) $(BITCOIN_OBJS) wire/fromwire.o wire/towire.o wire/tlvstream.o devtools/decodemsg.o
|
2018-02-01 01:08:37 +01:00
|
|
|
|
2019-07-21 05:04:59 +02:00
|
|
|
devtools/dump-gossipstore: $(DEVTOOLS_OBJS) $(DEVTOOLS_COMMON_OBJS) $(JSMN_OBJS) $(CCAN_OBJS) $(BITCOIN_OBJS) wire/fromwire.o wire/towire.o wire/tlvstream.o devtools/dump-gossipstore.o gossipd/gen_gossip_store.o
|
2018-08-30 02:04:28 +02:00
|
|
|
|
|
|
|
devtools/dump-gossipstore.o: gossipd/gen_gossip_store.h
|
2019-04-08 01:51:30 +02:00
|
|
|
|
2019-07-21 05:04:59 +02:00
|
|
|
devtools/create-gossipstore: $(DEVTOOLS_OBJS) $(DEVTOOLS_COMMON_OBJS) $(JSMN_OBJS) $(CCAN_OBJS) $(BITCOIN_OBJS) wire/fromwire.o wire/towire.o wire/tlvstream.o devtools/create-gossipstore.o gossipd/gen_gossip_store.o
|
2019-04-18 08:34:09 +02:00
|
|
|
devtools/create-gossipstore.o: gossipd/gen_gossip_store.h
|
2019-04-08 01:51:30 +02:00
|
|
|
|
2018-03-08 21:08:04 +01:00
|
|
|
devtools/onion.c: ccan/config.h
|
|
|
|
|
2019-07-21 05:04:59 +02:00
|
|
|
devtools/onion: $(DEVTOOLS_OBJS) $(DEVTOOLS_COMMON_OBJS) $(JSMN_OBJS) $(CCAN_OBJS) $(BITCOIN_OBJS) wire/fromwire.o wire/towire.o wire/tlvstream.o devtools/onion.o common/sphinx.o
|
2018-03-01 16:58:18 +01:00
|
|
|
|
2019-07-21 05:04:59 +02:00
|
|
|
devtools/gossipwith: $(DEVTOOLS_OBJS) $(DEVTOOLS_COMMON_OBJS) $(JSMN_OBJS) $(CCAN_OBJS) $(BITCOIN_OBJS) wire/fromwire.o wire/towire.o wire/tlvstream.o wire/gen_peer_wire.o devtools/gossipwith.o common/cryptomsg.o common/cryptomsg.o common/crypto_sync.o
|
2018-09-21 02:29:44 +02:00
|
|
|
|
2018-07-26 23:20:37 +02:00
|
|
|
$(DEVTOOLS_OBJS) $(DEVTOOLS_TOOL_OBJS): wire/wire.h devtools/gen_print_wire.h devtools/gen_print_onion_wire.h
|
2018-06-28 03:30:49 +02:00
|
|
|
devtools/gen_print_wire.o: devtools/gen_print_wire.h wire/gen_peer_wire.h devtools/print_wire.h
|
2018-07-26 23:20:37 +02:00
|
|
|
devtools/gen_print_onion_wire.o: devtools/gen_print_onion_wire.h devtools/print_wire.h
|
2017-11-22 01:26:08 +01:00
|
|
|
|
2019-07-21 05:04:59 +02:00
|
|
|
devtools/mkcommit: $(DEVTOOLS_COMMON_OBJS) $(CCAN_OBJS) $(BITCOIN_OBJS) common/derive_basepoints.o common/keyset.o common/key_derive.o common/initial_commit_tx.o common/permute_tx.o wire/fromwire.o wire/towire.o wire/tlvstream.o devtools/mkcommit.o channeld/full_channel.o common/initial_channel.o common/htlc_state.o common/pseudorand.o common/htlc_tx.o channeld/commit_tx.o common/htlc_trim.o
|
2018-09-21 02:29:44 +02:00
|
|
|
|
2019-07-21 05:04:59 +02:00
|
|
|
devtools/mkfunding: $(DEVTOOLS_COMMON_OBJS) $(CCAN_OBJS) $(BITCOIN_OBJS) wire/fromwire.o wire/towire.o wire/tlvstream.o common/funding_tx.o common/utxo.o common/permute_tx.o common/key_derive.o devtools/mkfunding.o
|
2019-07-16 23:46:14 +02:00
|
|
|
|
2019-08-21 05:52:46 +02:00
|
|
|
devtools/mkclose: $(DEVTOOLS_COMMON_OBJS) $(CCAN_OBJS) $(BITCOIN_OBJS) wire/fromwire.o wire/towire.o wire/tlvstream.o devtools/mkclose.o
|
|
|
|
|
2017-11-22 01:26:08 +01:00
|
|
|
# Make sure these depend on everything.
|
2018-09-21 02:29:44 +02:00
|
|
|
ALL_PROGRAMS += $(DEVTOOLS)
|
2018-02-01 01:08:37 +01:00
|
|
|
ALL_OBJS += $(DEVTOOLS_OBJS) $(DEVTOOLS_TOOL_OBJS)
|
2017-11-22 01:26:08 +01:00
|
|
|
|
2018-02-01 01:08:37 +01:00
|
|
|
check-source: $(DEVTOOLS_SRC:%=check-src-include-order/%) $(DEVTOOLS_TOOLS_SRC:%=check-src-include-order/%)
|
2017-11-22 01:26:08 +01:00
|
|
|
|
|
|
|
clean: devtools-clean
|
|
|
|
|
|
|
|
devtools-clean:
|
2019-08-13 02:16:59 +02:00
|
|
|
$(RM) $(DEVTOOLS_OBJS) $(DEVTOOLS_TOOL_OBJS) devtools/bolt11-cli devtools/decodemsg devtools/onion devtools/gen_print_wire.[c,h,o] devtools/gen_print_onion_wire.[c,h,o]
|