core-lightning/onchaind/Makefile
Rusty Russell 1746406e41 Makefile: normalize all the Makefiles
We create ALL_PROGRAMS, ALL_TEST_PROGRAMS, ALL_C_SOURCES and
ALL_C_HEADERS.  Then the toplevel Makefile knows which are
autogenerated (by wildcard), so it can have all the rules to clean
them or check the source as necessary.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2020-08-31 21:33:26 -05:00

69 lines
1.8 KiB
Makefile

#! /usr/bin/make
ONCHAIND_HEADERS := \
onchaind/onchaind_wiregen.h \
onchaind/gen_onchain_types_names.h \
onchaind/onchain_types.h \
onchaind/onchaind_wire.h
ONCHAIND_SRC := onchaind/onchaind.c \
onchaind/onchaind_wiregen.c \
onchaind/onchaind_wire.c \
onchaind/onchaind.c
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_OBJS := $(ONCHAIND_SRC:.c=.o)
$(ONCHAIND_OBJS): $(ONCHAIND_HEADERS)
# Make sure these depend on everything.
ALL_C_SOURCES += $(ONCHAIND_SRC)
ALL_C_HEADERS += $(ONCHAIND_HEADERS)
ALL_PROGRAMS += lightningd/lightning_onchaind
# Here's what lightningd depends on
LIGHTNINGD_CONTROL_HEADERS += \
onchaind/onchaind_wiregen.h \
onchaind/onchaind_wire.h
LIGHTNINGD_CONTROL_OBJS += \
onchaind/onchaind_wiregen.o \
onchaind/onchaind_wire.o
# 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/lightning_onchaind: $(ONCHAIND_OBJS) $(WIRE_ONION_OBJS) $(ONCHAIND_COMMON_OBJS) $(WIRE_OBJS) $(BITCOIN_OBJS) $(HSMD_CLIENT_OBJS)
include onchaind/test/Makefile