You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
100 lines
3.1 KiB
100 lines
3.1 KiB
#! /usr/bin/make
|
|
|
|
# Designed to be run one level up
|
|
onchaind-wrongdir:
|
|
$(MAKE) -C ../.. onchaind-all
|
|
|
|
default: onchaind-all
|
|
|
|
onchaind-all: lightningd/lightning_onchaind
|
|
|
|
onchaind/gen_onchain_types_names.h: onchaind/onchain_types.h ccan/ccan/cdump/tools/cdump-enumstr
|
|
ccan/ccan/cdump/tools/cdump-enumstr onchaind/onchain_types.h > $@
|
|
|
|
# onchaind needs these:
|
|
LIGHTNINGD_ONCHAIN_HEADERS_GEN := \
|
|
onchaind/onchaind_wiregen.h \
|
|
onchaind/gen_onchain_types_names.h
|
|
|
|
LIGHTNINGD_ONCHAIN_HEADERS_NOGEN := \
|
|
onchaind/onchain_types.h \
|
|
onchaind/onchaind_wire.h
|
|
|
|
LIGHTNINGD_ONCHAIN_HEADERS := $(LIGHTNINGD_ONCHAIN_HEADERS_GEN) $(LIGHTNINGD_ONCHAIN_HEADERS_NOGEN)
|
|
|
|
LIGHTNINGD_ONCHAIN_SRC := onchaind/onchaind.c \
|
|
onchaind/onchaind_wiregen.c \
|
|
onchaind/onchaind_wire.c
|
|
|
|
LIGHTNINGD_ONCHAIN_OBJS := $(LIGHTNINGD_ONCHAIN_SRC:.c=.o)
|
|
|
|
# Control daemon uses this:
|
|
LIGHTNINGD_ONCHAIN_CONTROL_HEADERS := \
|
|
onchaind/onchaind_wiregen.h \
|
|
onchaind/onchaind_wire.h
|
|
LIGHTNINGD_ONCHAIN_CONTROL_SRC := $(LIGHTNINGD_ONCHAIN_CONTROL_HEADERS:.h=.c)
|
|
LIGHTNINGD_ONCHAIN_CONTROL_OBJS := $(LIGHTNINGD_ONCHAIN_CONTROL_SRC:.c=.o)
|
|
|
|
LIGHTNINGD_ONCHAIN_GEN_SRC := $(filter onchaind/%wiregen.c, $(LIGHTNINGD_ONCHAIN_SRC) $(LIGHTNINGD_ONCHAIN_CONTROL_SRC))
|
|
|
|
LIGHTNINGD_ONCHAIN_SRC_NOGEN := $(filter-out onchaind/%wiregen.c, $(LIGHTNINGD_ONCHAIN_SRC))
|
|
|
|
# Add to headers which any object might need.
|
|
LIGHTNINGD_HEADERS_GEN += $(LIGHTNINGD_ONCHAIN_HEADERS_GEN)
|
|
LIGHTNINGD_HEADERS_NOGEN += $(LIGHTNINGD_ONCHAIN_HEADERS_NOGEN)
|
|
|
|
$(LIGHTNINGD_ONCHAIN_OBJS): $(LIGHTNINGD_HEADERS)
|
|
|
|
# Common source we use.
|
|
ONCHAIND_COMMON_OBJS := \
|
|
common/amount.o \
|
|
common/bigsize.o \
|
|
common/bip32.o \
|
|
common/coin_mvt.o \
|
|
common/channel_id.o \
|
|
common/daemon.o \
|
|
common/daemon_conn.o \
|
|
common/derive_basepoints.o \
|
|
common/dev_disconnect.o \
|
|
common/status_wiregen.o \
|
|
common/htlc_tx.o \
|
|
common/htlc_wire.o \
|
|
common/initial_commit_tx.o \
|
|
common/keyset.o \
|
|
common/key_derive.o \
|
|
common/memleak.o \
|
|
common/msg_queue.o \
|
|
common/node_id.o \
|
|
common/onionreply.o \
|
|
common/peer_billboard.o \
|
|
common/permute_tx.o \
|
|
common/setup.o \
|
|
common/status.o \
|
|
common/status_wire.o \
|
|
common/subdaemon.o \
|
|
common/type_to_string.o \
|
|
common/utils.o \
|
|
common/utxo.o \
|
|
common/version.o \
|
|
common/wallet.o
|
|
|
|
LIGHTNINGD_ONCHAIN_OBJS := $(LIGHTNINGD_ONCHAIN_SRC:.c=.o) $(LIGHTNINGD_ONCHAIN_GEN_SRC:.c=.o)
|
|
|
|
# Make sure these depend on everything.
|
|
ALL_OBJS += $(LIGHTNINGD_ONCHAIN_OBJS)
|
|
ALL_PROGRAMS += lightningd/lightning_onchaind
|
|
ALL_GEN_HEADERS += $(LIGHTNINGD_ONCHAIN_HEADERS_GEN)
|
|
|
|
lightningd/lightning_onchaind: $(LIGHTNINGD_ONCHAIN_OBJS) $(WIRE_ONION_OBJS) $(ONCHAIND_COMMON_OBJS) $(WIRE_OBJS) $(BITCOIN_OBJS) $(LIGHTNINGD_HSM_CLIENT_OBJS)
|
|
|
|
check-source: $(LIGHTNINGD_ONCHAIN_SRC_NOGEN:%=check-src-include-order/%)
|
|
check-source-bolt: $(LIGHTNINGD_ONCHAIN_SRC:%=bolt-check/%) $(LIGHTNINGD_ONCHAIN_HEADERS:%=bolt-check/%)
|
|
|
|
check-whitespace: $(LIGHTNINGD_ONCHAIN_SRC_NOGEN:%=check-whitespace/%) $(LIGHTNINGD_ONCHAIN_HEADERS_NOGEN:%=check-whitespace/%)
|
|
|
|
clean: onchaind-clean
|
|
|
|
onchaind-clean:
|
|
$(RM) $(LIGHTNINGD_ONCHAIN_OBJS) onchaind/gen_*
|
|
|
|
-include onchaind/test/Makefile
|
|
|