2017-01-10 06:07:51 +01:00
|
|
|
#! /usr/bin/make
|
|
|
|
|
|
|
|
# Designed to be run one level up
|
|
|
|
lightningd-wrongdir:
|
|
|
|
$(MAKE) -C .. lightningd-all
|
|
|
|
|
2017-01-10 06:08:33 +01:00
|
|
|
lightningd-all: lightningd/lightningd lightningd/lightningd_hsm
|
2017-01-10 06:07:51 +01:00
|
|
|
|
|
|
|
default: lightningd-all
|
|
|
|
|
2017-01-10 06:08:33 +01:00
|
|
|
LIGHTNINGD_OLD_SRC := \
|
2017-01-10 06:07:51 +01:00
|
|
|
daemon/configdir.c \
|
|
|
|
daemon/json.c \
|
2017-01-10 06:08:33 +01:00
|
|
|
daemon/jsonrpc.c \
|
2017-01-10 06:07:51 +01:00
|
|
|
daemon/log.c \
|
|
|
|
daemon/options.c \
|
|
|
|
daemon/opt_time.c \
|
|
|
|
daemon/pseudorand.c \
|
|
|
|
daemon/routing.c \
|
2017-01-10 06:08:33 +01:00
|
|
|
daemon/timeout.c \
|
2017-01-10 06:07:51 +01:00
|
|
|
daemon/watch.c
|
2017-01-10 06:08:33 +01:00
|
|
|
LIGHTNINGD_OLD_OBJS := $(LIGHTNINGD_OLD_SRC:.c=.o)
|
|
|
|
LIGHTNINGD_OLD_HEADERS := $(LIGHTNINGD_OLD_SRC:.c=.h)
|
|
|
|
|
|
|
|
LIGHTNINGD_LIB_SRC := \
|
|
|
|
lightningd/cryptomsg.c
|
2017-01-10 06:07:51 +01:00
|
|
|
|
|
|
|
LIGHTNINGD_LIB_OBJS := $(LIGHTNINGD_LIB_SRC:.c=.o)
|
2017-01-10 06:08:33 +01:00
|
|
|
LIGHTNINGD_LIB_HEADERS := $(LIGHTNINGD_LIB_SRC:.c=.h)
|
2017-01-10 06:07:51 +01:00
|
|
|
|
|
|
|
LIGHTNINGD_SRC := \
|
2017-01-10 06:08:33 +01:00
|
|
|
lightningd/hsm_control.c \
|
2017-01-10 06:08:33 +01:00
|
|
|
lightningd/lightningd.c \
|
|
|
|
lightningd/subdaemon.c
|
2017-01-10 06:07:51 +01:00
|
|
|
|
|
|
|
LIGHTNINGD_OBJS := $(LIGHTNINGD_SRC:.c=.o)
|
|
|
|
|
|
|
|
LIGHTNINGD_JSMN_OBJS := daemon/jsmn.o
|
|
|
|
LIGHTNINGD_JSMN_HEADERS := daemon/jsmn/jsmn.h
|
|
|
|
|
2017-01-10 06:08:33 +01:00
|
|
|
LIGHTNINGD_HEADERS := \
|
|
|
|
lightningd/hsm_control.h \
|
|
|
|
lightningd/lightningd.h \
|
2017-01-10 06:08:33 +01:00
|
|
|
lightningd/subdaemon.h
|
2017-01-10 06:07:51 +01:00
|
|
|
|
2017-01-10 06:08:33 +01:00
|
|
|
$(LIGHTNINGD_OBJS) $(LIGHTNINGD_LIB_OBJS): $(LIGHTNINGD_HEADERS) $(LIGHTNINGD_JSMN_HEADERS) $(BITCOIN_HEADERS) $(CORE_HEADERS) $(GEN_HEADERS) $(CCAN_HEADERS) $(DAEMON_HEADERS) $(LIGHTNINGD_HSM_CONTROL_HEADERS) $(LIBBASE58_HEADERS)
|
2017-01-10 06:07:51 +01:00
|
|
|
|
2017-01-10 06:08:33 +01:00
|
|
|
include lightningd/hsm/Makefile
|
|
|
|
|
2017-01-10 06:07:51 +01:00
|
|
|
check-source: $(LIGHTNINGD_SRC:%=check-src-include-order/%)
|
|
|
|
check-source: $(LIGHTNINGD_LIB_SRC:%=check-src-include-order/%)
|
|
|
|
check-source: $(LIGHTNINGD_CLI_SRC:%=check-src-include-order/%)
|
|
|
|
check-source: $(LIGHTNINGD_HEADERS:%=check-hdr-include-order/%)
|
|
|
|
check-source-bolt: $(LIGHTNINGD_SRC:%=bolt-check/%) $(LIGHTNINGD_HEADERS:%=bolt-check/%)
|
|
|
|
|
2017-01-10 06:08:33 +01:00
|
|
|
check-whitespace: $(LIGHTNINGD_SRC:%=check-whitespace/%) $(LIGHTNINGD_HEADERS:%=check-whitespace/%) $(LIGHTNINGD_LIB_SRC:%=check-whitespace/%) $(LIGHTNINGD_LIB_HEADERS:%=check-whitespace/%)
|
2017-01-10 06:07:51 +01:00
|
|
|
|
|
|
|
check-lightningd-makefile:
|
|
|
|
@if [ "`ls lightningd/*.h | grep -v lightningd/gen | tr '\012' ' '`" != "`echo $(LIGHTNINGD_HEADERS) ''`" ]; then echo LIGHTNINGD_HEADERS incorrect; exit 1; fi
|
|
|
|
|
2017-01-10 06:08:33 +01:00
|
|
|
lightningd/lightningd: $(LIGHTNINGD_OBJS) $(LIGHTNINGD_OLD_OBJS) $(LIGHTNINGD_LIB_OBJS) $(LIGHTNINGD_JSMN_OBJS) $(CORE_OBJS) $(BITCOIN_OBJS) $(WIRE_OBJS) $(CCAN_OBJS) $(LIGHTNINGD_HSM_CONTROL_OBJS) $(LIBBASE58_OBJS) libsecp256k1.a
|
2017-01-10 06:07:51 +01:00
|
|
|
|
|
|
|
clean: lightningd-clean
|
|
|
|
|
|
|
|
lightningd-clean:
|
|
|
|
$(RM) $(LIGHTNINGD_OBJS) $(LIGHTNINGD_LIB_OBJS) $(LIGHTNINGD_JSMN_OBJS)
|
|
|
|
|
2017-01-10 06:08:33 +01:00
|
|
|
include lightningd/test/Makefile
|