2019-07-19 19:01:41 +02:00
|
|
|
#! /usr/bin/make
|
2019-10-19 16:29:36 +02:00
|
|
|
TOOLS := tools/hsmtool tools/check-bolt
|
|
|
|
TOOLS_SRC := $(TOOLS:=.c)
|
|
|
|
TOOLS_OBJ := $(TOOLS_SRC:.c=.o)
|
2020-08-31 03:13:25 +02:00
|
|
|
|
|
|
|
# Make sure these depend on everything.
|
|
|
|
ALL_C_SOURCES += $(TOOLS_SRC)
|
|
|
|
ALL_C_HEADERS +=
|
2019-10-19 16:29:36 +02:00
|
|
|
ALL_PROGRAMS += $(TOOLS)
|
|
|
|
|
|
|
|
TOOLS_COMMON_OBJS = common/utils.o
|
2019-08-21 05:00:27 +02:00
|
|
|
|
|
|
|
# We force make to relink this every time, to detect version changes.
|
|
|
|
# Do it atomically, otherwise parallel builds can get upset!
|
2022-07-16 06:55:09 +02:00
|
|
|
tools/headerversions: $(FORCE) tools/headerversions.o libccan.a
|
|
|
|
@trap "rm -f $@.tmp.$$$$" EXIT; $(LINK.o) tools/headerversions.o libccan.a $(LOADLIBES) $(LDLIBS) -o $@.tmp.$$$$ && mv $@.tmp.$$$$ $@
|
2019-08-21 05:00:27 +02:00
|
|
|
|
2022-07-16 06:55:09 +02:00
|
|
|
tools/check-bolt: tools/check-bolt.o $(TOOLS_COMMON_OBJS)
|
2019-10-19 16:29:36 +02:00
|
|
|
|
2022-07-16 06:55:09 +02:00
|
|
|
tools/hsmtool: tools/hsmtool.o $(TOOLS_COMMON_OBJS) $(BITCOIN_OBJS) common/amount.o common/autodata.o common/bech32.o common/bigsize.o common/configdir.o common/derive_basepoints.o common/descriptor_checksum.o common/hsm_encryption.o common/node_id.o common/type_to_string.o common/version.o wire/fromwire.o wire/towire.o
|
2019-08-21 05:00:27 +02:00
|
|
|
|
2020-06-29 08:28:46 +02:00
|
|
|
tools/lightning-hsmtool: tools/hsmtool
|
|
|
|
cp $< $@
|
|
|
|
|
2019-08-22 06:39:44 +02:00
|
|
|
clean: tools-clean
|
|
|
|
|
|
|
|
tools-clean:
|
2019-08-21 05:00:27 +02:00
|
|
|
$(RM) tools/headerversions
|
2020-09-07 18:40:35 +02:00
|
|
|
$(RM) tools/headerversions.o
|
2019-08-21 05:00:27 +02:00
|
|
|
|
2019-07-19 19:01:41 +02:00
|
|
|
include tools/test/Makefile
|