2019-07-19 18:01:41 +01:00
|
|
|
#! /usr/bin/make
|
2019-10-19 15:29:36 +01:00
|
|
|
TOOLS := tools/hsmtool tools/check-bolt
|
|
|
|
TOOLS_SRC := $(TOOLS:=.c)
|
|
|
|
TOOLS_OBJ := $(TOOLS_SRC:.c=.o)
|
2020-08-31 02:13:25 +01:00
|
|
|
|
|
|
|
# Make sure these depend on everything.
|
|
|
|
ALL_C_SOURCES += $(TOOLS_SRC)
|
|
|
|
ALL_C_HEADERS +=
|
2019-10-19 15:29:36 +01:00
|
|
|
ALL_PROGRAMS += $(TOOLS)
|
|
|
|
|
|
|
|
TOOLS_COMMON_OBJS = common/utils.o
|
2019-08-21 04:00:27 +01: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 05:55:09 +01: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 04:00:27 +01:00
|
|
|
|
2022-07-16 05:55:09 +01:00
|
|
|
tools/check-bolt: tools/check-bolt.o $(TOOLS_COMMON_OBJS)
|
2019-10-19 15:29:36 +01:00
|
|
|
|
2023-06-02 03:35:51 +01: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/configvar.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 04:00:27 +01:00
|
|
|
|
2020-06-29 07:28:46 +01:00
|
|
|
tools/lightning-hsmtool: tools/hsmtool
|
|
|
|
cp $< $@
|
|
|
|
|
2019-08-22 05:39:44 +01:00
|
|
|
clean: tools-clean
|
|
|
|
|
|
|
|
tools-clean:
|
2019-08-21 04:00:27 +01:00
|
|
|
$(RM) tools/headerversions
|
2020-09-07 17:40:35 +01:00
|
|
|
$(RM) tools/headerversions.o
|
2019-08-21 04:00:27 +01:00
|
|
|
|
2019-07-19 18:01:41 +01:00
|
|
|
include tools/test/Makefile
|