2017-08-29 06:12:04 +02:00
|
|
|
#! /usr/bin/make
|
|
|
|
|
2020-08-31 03:13:25 +02:00
|
|
|
HSMD_SRC := hsmd/hsmd.c \
|
2021-04-13 17:25:29 +02:00
|
|
|
hsmd/hsmd_wiregen.c \
|
|
|
|
hsmd/libhsmd.c
|
|
|
|
|
2020-08-31 03:13:25 +02:00
|
|
|
HSMD_HEADERS := hsmd/hsmd_wiregen.h
|
|
|
|
HSMD_OBJS := $(HSMD_SRC:.c=.o)
|
2017-08-29 06:12:04 +02:00
|
|
|
|
2020-08-31 03:13:25 +02:00
|
|
|
$(HSMD_OBJS): $(HSMD_HEADERS)
|
2017-08-29 06:12:04 +02:00
|
|
|
|
2020-08-31 03:13:25 +02:00
|
|
|
# Other programs which use the hsm need this.
|
2021-12-15 02:37:35 +01:00
|
|
|
HSMD_CLIENT_OBJS := \
|
|
|
|
hsmd/hsmd_wiregen.o \
|
|
|
|
common/htlc_wire.o
|
2020-08-31 03:13:25 +02:00
|
|
|
|
|
|
|
# Make sure these depend on everything.
|
|
|
|
ALL_C_SOURCES += $(HSMD_SRC)
|
|
|
|
ALL_C_HEADERS += $(HSMD_HEADERS)
|
|
|
|
ALL_PROGRAMS += lightningd/lightning_hsmd
|
2017-08-29 06:12:04 +02:00
|
|
|
|
|
|
|
# Common source we use.
|
|
|
|
HSMD_COMMON_OBJS := \
|
2019-02-20 12:31:48 +01:00
|
|
|
common/amount.o \
|
2021-09-21 09:23:10 +02:00
|
|
|
common/autodata.o \
|
2021-10-12 13:16:37 +02:00
|
|
|
common/base32.o \
|
2019-07-30 07:25:12 +02:00
|
|
|
common/bigsize.o \
|
2017-08-29 06:12:04 +02:00
|
|
|
common/bip32.o \
|
2021-01-13 09:58:38 +01:00
|
|
|
common/bolt12_merkle.o \
|
2020-05-15 12:29:53 +02:00
|
|
|
common/channel_id.o \
|
2018-03-29 04:06:45 +02:00
|
|
|
common/daemon.o \
|
2017-08-29 06:12:04 +02:00
|
|
|
common/daemon_conn.o \
|
2018-01-02 16:34:08 +01:00
|
|
|
common/derive_basepoints.o \
|
2017-10-26 05:03:19 +02:00
|
|
|
common/hash_u5.o \
|
2021-01-03 12:32:43 +01:00
|
|
|
common/hsm_encryption.o \
|
2021-12-15 02:37:35 +01:00
|
|
|
common/htlc_wire.o \
|
2017-08-29 06:12:04 +02:00
|
|
|
common/key_derive.o \
|
2021-06-14 21:22:46 +02:00
|
|
|
common/lease_rates.o \
|
2018-11-21 22:45:37 +01:00
|
|
|
common/memleak.o \
|
2017-08-29 06:12:04 +02:00
|
|
|
common/msg_queue.o \
|
2019-04-08 11:58:32 +02:00
|
|
|
common/node_id.o \
|
2021-12-15 02:37:35 +01:00
|
|
|
common/onionreply.o \
|
2017-08-29 06:12:04 +02:00
|
|
|
common/permute_tx.o \
|
2020-10-08 23:40:25 +02:00
|
|
|
common/psbt_open.o \
|
|
|
|
common/pseudorand.o \
|
2020-05-16 00:13:22 +02:00
|
|
|
common/setup.o \
|
2017-08-29 06:12:04 +02:00
|
|
|
common/status.o \
|
2018-02-08 02:25:12 +01:00
|
|
|
common/status_wire.o \
|
2022-03-16 20:45:29 +01:00
|
|
|
common/status_wiregen.o \
|
2018-01-08 11:01:09 +01:00
|
|
|
common/subdaemon.o \
|
2017-10-22 15:32:46 +02:00
|
|
|
common/type_to_string.o \
|
2017-08-29 06:12:04 +02:00
|
|
|
common/utils.o \
|
|
|
|
common/utxo.o \
|
2021-10-12 13:16:37 +02:00
|
|
|
common/version.o \
|
|
|
|
common/wireaddr.o
|
2017-08-29 06:12:04 +02:00
|
|
|
|
2020-08-31 03:13:25 +02:00
|
|
|
lightningd/lightning_hsmd: $(HSMD_OBJS) $(HSMD_COMMON_OBJS) $(BITCOIN_OBJS) $(WIRE_OBJS)
|
2017-08-29 06:12:04 +02:00
|
|
|
|
2022-10-17 02:35:01 +02:00
|
|
|
check-source: check-hsm-versions
|
|
|
|
|
|
|
|
# common/hsm_version.h should at least *mention* this!
|
|
|
|
check-hsm-versions: hsmd/hsmd_wire.csv common/hsm_version.h
|
|
|
|
@SUM=`grep -vE '^(#| *$$)' hsmd/hsmd_wire.csv | sha256sum | cut -c1-64`; if ! grep -q "$$SUM" common/hsm_version.h; then echo "*** hsmd_wire.csv changed to $$SUM without update to common/hsm_version.h">&2; exit 1; fi
|
|
|
|
|
2017-11-30 17:07:38 +01:00
|
|
|
-include hsmd/test/Makefile
|