2016-01-21 21:11:47 +01:00
|
|
|
#! /usr/bin/make
|
|
|
|
|
|
|
|
# Designed to be run one level up
|
|
|
|
daemon-wrongdir:
|
|
|
|
$(MAKE) -C .. daemon-all
|
|
|
|
|
2016-01-21 21:11:48 +01:00
|
|
|
daemon-all: daemon/lightningd daemon/lightning-cli
|
2016-01-21 21:11:47 +01:00
|
|
|
|
2016-01-21 21:11:48 +01:00
|
|
|
DAEMON_LIB_SRC := \
|
2016-01-21 21:11:48 +01:00
|
|
|
daemon/configdir.c \
|
2016-01-21 21:11:48 +01:00
|
|
|
daemon/json.c \
|
2016-01-21 21:11:48 +01:00
|
|
|
daemon/log.c \
|
|
|
|
daemon/pseudorand.c
|
|
|
|
DAEMON_LIB_OBJS := $(DAEMON_LIB_SRC:.c=.o)
|
|
|
|
|
|
|
|
DAEMON_SRC := \
|
2016-01-21 21:11:49 +01:00
|
|
|
daemon/bitcoind.c \
|
2016-04-24 12:07:13 +02:00
|
|
|
daemon/chaintopology.c \
|
2016-01-21 21:15:28 +01:00
|
|
|
daemon/controlled_time.c \
|
2016-01-21 21:11:48 +01:00
|
|
|
daemon/cryptopkt.c \
|
2016-01-21 21:11:48 +01:00
|
|
|
daemon/dns.c \
|
2016-01-21 21:11:48 +01:00
|
|
|
daemon/jsonrpc.c \
|
2016-01-21 21:11:47 +01:00
|
|
|
daemon/lightningd.c \
|
2016-01-21 21:11:48 +01:00
|
|
|
daemon/netaddr.c \
|
2016-05-09 22:58:17 +02:00
|
|
|
daemon/opt_time.c \
|
2016-01-21 21:11:48 +01:00
|
|
|
daemon/peer.c \
|
2016-01-21 21:14:13 +01:00
|
|
|
daemon/packets.c \
|
2016-01-21 21:11:48 +01:00
|
|
|
daemon/secrets.c \
|
2016-01-21 21:11:49 +01:00
|
|
|
daemon/timeout.c \
|
2016-04-12 05:37:03 +02:00
|
|
|
daemon/wallet.c \
|
2016-01-21 21:14:13 +01:00
|
|
|
daemon/watch.c \
|
|
|
|
names.c \
|
|
|
|
state.c
|
|
|
|
|
2016-01-21 21:11:47 +01:00
|
|
|
DAEMON_OBJS := $(DAEMON_SRC:.c=.o)
|
|
|
|
|
2016-01-21 21:11:48 +01:00
|
|
|
DAEMON_CLI_SRC := daemon/lightning-cli.c
|
|
|
|
DAEMON_CLI_OBJS := $(DAEMON_CLI_SRC:.c=.o)
|
|
|
|
|
2016-01-21 21:11:48 +01:00
|
|
|
DAEMON_JSMN_OBJS := daemon/jsmn.o
|
|
|
|
DAEMON_JSMN_HEADERS := daemon/jsmn/jsmn.h
|
|
|
|
|
2016-01-21 21:11:47 +01:00
|
|
|
DAEMON_HEADERS := \
|
2016-01-21 21:11:49 +01:00
|
|
|
daemon/bitcoind.h \
|
2016-04-24 12:07:13 +02:00
|
|
|
daemon/chaintopology.h \
|
2016-01-21 21:11:48 +01:00
|
|
|
daemon/configdir.h \
|
2016-01-21 21:15:28 +01:00
|
|
|
daemon/controlled_time.h \
|
2016-01-21 21:11:48 +01:00
|
|
|
daemon/cryptopkt.h \
|
2016-01-21 21:11:48 +01:00
|
|
|
daemon/dns.h \
|
2016-01-21 21:11:48 +01:00
|
|
|
daemon/json.h \
|
2016-01-21 21:11:48 +01:00
|
|
|
daemon/jsonrpc.h \
|
2016-01-21 21:11:47 +01:00
|
|
|
daemon/lightningd.h \
|
|
|
|
daemon/log.h \
|
2016-01-21 21:11:48 +01:00
|
|
|
daemon/netaddr.h \
|
2016-05-09 22:58:17 +02:00
|
|
|
daemon/opt_time.h \
|
2016-01-21 21:11:48 +01:00
|
|
|
daemon/peer.h \
|
2016-01-21 21:11:48 +01:00
|
|
|
daemon/pseudorand.h \
|
2016-01-21 21:11:48 +01:00
|
|
|
daemon/secrets.h \
|
2016-01-21 21:11:49 +01:00
|
|
|
daemon/timeout.h \
|
2016-04-12 05:37:03 +02:00
|
|
|
daemon/wallet.h \
|
2016-01-21 21:11:49 +01:00
|
|
|
daemon/watch.h
|
2016-01-21 21:11:47 +01:00
|
|
|
|
2016-01-21 21:11:48 +01:00
|
|
|
$(DAEMON_OBJS) $(DAEMON_LIB_OBJS) $(DAEMON_CLI_OBJS): $(DAEMON_HEADERS) $(DAEMON_JSMN_HEADERS) $(BITCOIN_HEADERS) $(CORE_HEADERS) $(GEN_HEADERS) $(CCAN_HEADERS)
|
2016-01-21 21:11:48 +01:00
|
|
|
$(DAEMON_JSMN_OBJS): $(DAEMON_JSMN_HEADERS)
|
2016-01-21 21:11:47 +01:00
|
|
|
|
|
|
|
check-source: $(DAEMON_SRC:%=check-src-include-order/%)
|
2016-01-21 21:11:48 +01:00
|
|
|
check-source: $(DAEMON_LIB_SRC:%=check-src-include-order/%)
|
|
|
|
check-source: $(DAEMON_CLI_SRC:%=check-src-include-order/%)
|
2016-01-21 21:11:47 +01:00
|
|
|
check-source: $(DAEMON_HEADERS:%=check-hdr-include-order/%)
|
2016-01-21 21:11:47 +01:00
|
|
|
check-daemon-makefile:
|
|
|
|
@if [ "`echo daemon/*.h`" != "$(DAEMON_HEADERS)" ]; then echo DAEMON_HEADERS incorrect; exit 1; fi
|
2016-01-21 21:11:47 +01:00
|
|
|
|
2016-01-21 21:11:48 +01:00
|
|
|
# Git submodules are seriously broken.
|
|
|
|
daemon/jsmn/jsmn.c:
|
|
|
|
git submodule update daemon/jsmn/
|
|
|
|
[ -f $@ ] || git submodule update --init daemon/jsmn/
|
|
|
|
|
|
|
|
daemon/jsmn.o: daemon/jsmn/jsmn.c
|
|
|
|
$(COMPILE.c) -DJSMN_STRICT=1 $(OUTPUT_OPTION) $<
|
|
|
|
|
2016-01-21 21:11:48 +01:00
|
|
|
daemon/lightningd: $(DAEMON_OBJS) $(DAEMON_LIB_OBJS) $(DAEMON_JSMN_OBJS) $(CORE_OBJS) $(BITCOIN_OBJS) $(CCAN_OBJS) libsecp256k1.a
|
|
|
|
|
|
|
|
daemon/lightning-cli: $(DAEMON_CLI_OBJS) $(DAEMON_LIB_OBJS) $(DAEMON_JSMN_OBJS) $(CORE_OBJS) $(BITCOIN_OBJS) $(CCAN_OBJS) libsecp256k1.a
|
2016-03-08 01:02:15 +01:00
|
|
|
|
|
|
|
daemon-clean:
|
|
|
|
$(RM) $(DAEMON_OBJS) $(DAEMON_LIB_OBJS) $(DAEMON_CLI_OBJS) $(DAEMON_JSMN_OBJS)
|