Browse Source
You will want to 'make distclean' after this. I also removed libsecp; we use the one in in libwally anyway. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>ppa-0.6.1
Rusty Russell
7 years ago
committed by
Christian Decker
363 changed files with 108 additions and 20853 deletions
@ -1,9 +1,9 @@ |
|||||
[submodule "daemon/jsmn"] |
[submodule "daemon/jsmn"] |
||||
path = daemon/jsmn |
path = external/jsmn |
||||
url = https://github.com/zserge/jsmn |
url = https://github.com/zserge/jsmn |
||||
[submodule "bitcoin/libbase58"] |
[submodule "bitcoin/libbase58"] |
||||
path = bitcoin/libbase58 |
path = external/libbase58 |
||||
url = https://github.com/bitcoin/libbase58.git |
url = https://github.com/bitcoin/libbase58.git |
||||
[submodule "libsodium"] |
[submodule "libsodium"] |
||||
path = libsodium |
path = external/libsodium |
||||
url = https://github.com/jedisct1/libsodium.git |
url = https://github.com/jedisct1/libsodium.git |
||||
|
@ -1 +0,0 @@ |
|||||
lightningd |
|
@ -1,93 +0,0 @@ |
|||||
#! /usr/bin/make
|
|
||||
|
|
||||
LANG=C |
|
||||
LC_ALL=C |
|
||||
LC_CTYPE=C |
|
||||
|
|
||||
# Designed to be run one level up
|
|
||||
daemon-wrongdir: |
|
||||
$(MAKE) -C .. daemon-all |
|
||||
|
|
||||
daemon-all: daemon/lightning-cli |
|
||||
|
|
||||
DAEMON_LIB_SRC := \
|
|
||||
daemon/configdir.c \
|
|
||||
daemon/json.c \
|
|
||||
daemon/log.c \
|
|
||||
daemon/pseudorand.c |
|
||||
DAEMON_LIB_OBJS := $(DAEMON_LIB_SRC:.c=.o) |
|
||||
|
|
||||
DAEMON_SRC := \
|
|
||||
daemon/bitcoind.c \
|
|
||||
daemon/broadcast.c \
|
|
||||
daemon/chaintopology.c \
|
|
||||
daemon/dns.c \
|
|
||||
daemon/htlc_state.c \
|
|
||||
daemon/invoice.c \
|
|
||||
daemon/jsonrpc.c \
|
|
||||
daemon/netaddr.c \
|
|
||||
daemon/options.c \
|
|
||||
daemon/opt_time.c \
|
|
||||
daemon/routing.c \
|
|
||||
daemon/timeout.c \
|
|
||||
daemon/watch.c |
|
||||
|
|
||||
DAEMON_OBJS := $(DAEMON_SRC:.c=.o) |
|
||||
|
|
||||
DAEMON_JSMN_OBJS := daemon/jsmn.o |
|
||||
DAEMON_JSMN_HEADERS := daemon/jsmn/jsmn.hb |
|
||||
|
|
||||
DAEMON_GEN_HEADERS := \
|
|
||||
daemon/gen_htlc_state_names.h |
|
||||
|
|
||||
DAEMON_HEADERS := \
|
|
||||
daemon/bitcoind.h \
|
|
||||
daemon/broadcast.h \
|
|
||||
daemon/chaintopology.h \
|
|
||||
daemon/configdir.h \
|
|
||||
daemon/dns.h \
|
|
||||
daemon/htlc.h \
|
|
||||
daemon/htlc_state.h \
|
|
||||
daemon/invoice.h \
|
|
||||
daemon/json.h \
|
|
||||
daemon/jsonrpc.h \
|
|
||||
daemon/lightningd.h \
|
|
||||
daemon/log.h \
|
|
||||
daemon/netaddr.h \
|
|
||||
daemon/opt_time.h \
|
|
||||
daemon/options.h \
|
|
||||
daemon/pseudorand.h \
|
|
||||
daemon/routing.h \
|
|
||||
daemon/timeout.h \
|
|
||||
daemon/watch.h |
|
||||
|
|
||||
daemon/gen_feechange_state_names.h: daemon/feechange_state.h ccan/ccan/cdump/tools/cdump-enumstr |
|
||||
ccan/ccan/cdump/tools/cdump-enumstr daemon/feechange_state.h > $@ |
|
||||
|
|
||||
daemon/gen_state_names.h: daemon/state_types.h ccan/ccan/cdump/tools/cdump-enumstr |
|
||||
ccan/ccan/cdump/tools/cdump-enumstr daemon/state_types.h > $@ |
|
||||
|
|
||||
# lightning.pb-c.h doesn't create a named enum, just a typedef. Hack it.
|
|
||||
daemon/gen_pkt_names.h: lightning.pb-c.h ccan/ccan/cdump/tools/cdump-enumstr |
|
||||
(echo 'enum PktCase {'; grep '^ PKT__' lightning.pb-c.h; echo '};') | ccan/ccan/cdump/tools/cdump-enumstr - | sed 's/enum PktCase/Pkt__PktCase/' > $@ |
|
||||
|
|
||||
$(DAEMON_LIB_OBJS) $(DAEMON_CLI_OBJS): $(DAEMON_JSMN_HEADERS) $(BITCOIN_HEADERS) $(CORE_HEADERS) $(CORE_TX_HEADERS) $(GEN_HEADERS) $(DAEMON_GEN_HEADERS) $(CCAN_HEADERS) $(WIRE_HEADERS) $(WIRE_GEN_HEADERS) $(LIBSODIUM_HEADERS) $(LIBBASE58_HEADERS) |
|
||||
$(DAEMON_JSMN_OBJS): $(DAEMON_JSMN_HEADERS) |
|
||||
|
|
||||
$(DAEMON_OBJS) $(DAEMON_LIB_OBJS) $(DAEMON_CLI_OBJS): CFLAGS += -USHACHAIN_BITS |
|
||||
|
|
||||
check-source: $(DAEMON_SRC:%=check-src-include-order/%) |
|
||||
check-source: $(DAEMON_LIB_SRC:%=check-src-include-order/%) |
|
||||
check-source: $(DAEMON_CLI_SRC:%=check-src-include-order/%) |
|
||||
check-source: $(DAEMON_HEADERS:%=check-hdr-include-order/%) |
|
||||
|
|
||||
check-source-bolt: $(DAEMON_SRC:%=bolt-check/%) $(DAEMON_HEADERS:%=bolt-check/%) |
|
||||
|
|
||||
check-whitespace: $(DAEMON_SRC:%=check-whitespace/%) $(DAEMON_HEADERS:%=check-whitespace/%) check-whitespace/daemon/Makefile |
|
||||
|
|
||||
daemon/lightning-cli: $(DAEMON_CLI_OBJS) $(DAEMON_LIB_OBJS) $(DAEMON_JSMN_OBJS) $(CORE_OBJS) $(BITCOIN_OBJS) $(LIBBASE58_OBJS) $(WIRE_OBJS) $(CCAN_OBJS) libsecp256k1.a libsodium.a |
|
||||
|
|
||||
daemon-clean: |
|
||||
$(RM) $(DAEMON_LIB_OBJS) $(DAEMON_CLI_OBJS) $(DAEMON_JSMN_OBJS) $(DAEMON_GEN_HEADERS) |
|
||||
|
|
||||
daemon-maintainer-clean: |
|
@ -0,0 +1,82 @@ |
|||||
|
LIBSODIUM_HEADERS := external/libsodium/src/libsodium/include/sodium.h |
||||
|
LIBWALLY_HEADERS := external/libwally-core/include/wally_bip32.h \
|
||||
|
external/libwally-core/include/wally_core.h \
|
||||
|
external/libwally-core/include/wally_crypto.h |
||||
|
LIBSECP_HEADERS := external/libwally-core/src/secp256k1/include/secp256k1_ecdh.h \
|
||||
|
external/libwally-core/src/secp256k1/include/secp256k1.h |
||||
|
JSMN_HEADERS := external/jsmn/jsmn.h |
||||
|
LIBBASE58_HEADERS := external/libbase58/libbase58.h |
||||
|
|
||||
|
EXTERNAL_HEADERS := $(LIBSODIUM_HEADERS) $(LIBWALLY_HEADERS) $(LIBSECP_HEADERS) $(JSMN_HEADERS) $(LIBBASE58_HEADERS) |
||||
|
EXTERNAL_LIBS := external/libwallycore.a external/libsecp256k1.a external/libsodium.a external/libjsmn.a external/libbase58.a |
||||
|
|
||||
|
EXTERNAL_INCLUDE_FLAGS := \
|
||||
|
-I external/libsodium/src/libsodium/include \
|
||||
|
-I external/libwally-core/include/ \
|
||||
|
-I external/libwally-core/src/secp256k1/include/ \
|
||||
|
-I external/jsmn/ \
|
||||
|
-I external/libbase58/ |
||||
|
EXTERNAL_LDLIBS := -Lexternal $(patsubst lib%.a,-l%, $(notdir $(EXTERNAL_LIBS))) |
||||
|
|
||||
|
# We build libsodium, since Ubuntu xenial has one too old.
|
||||
|
external/libsodium.a: external/libsodium/src/libsodium/libsodium.la |
||||
|
$(MAKE) -C external/libsodium install-exec |
||||
|
|
||||
|
external/libsodium/src/libsodium/include/sodium.h: |
||||
|
git submodule update external/libsodium |
||||
|
[ -f $@ ] || git submodule update --init external/libsodium |
||||
|
|
||||
|
external/libsodium/src/libsodium/libsodium.la: external/libsodium/src/libsodium/include/sodium.h |
||||
|
cd external/libsodium && ./autogen.sh && ./configure CC="$(CC)" --enable-static=yes --enable-shared=no --enable-tests=no --libdir=`pwd`/.. && $(MAKE) |
||||
|
|
||||
|
# libsecp included in libwally.
|
||||
|
# Wildcards here are magic. See http://stackoverflow.com/questions/2973445/gnu-makefile-rule-generating-a-few-targets-from-a-single-source-file
|
||||
|
external/libsecp256k1.% external/libwallycore.%: external/libwally-core/src/secp256k1/libsecp256k1.la external/libwally-core/src/libwallycore.la |
||||
|
$(MAKE) -C external/libwally-core install-exec |
||||
|
|
||||
|
external/libwally-core/src/libwallycore.% external/libwally-core/src/secp256k1/libsecp256k1.%: $(LIBWALLY_HEADERS) $(LIBSECP_HEADERS) |
||||
|
cd external/libwally-core && ./tools/autogen.sh && ./configure CC="$(CC)" --enable-static=yes --enable-shared=no --libdir=`pwd`/.. && $(MAKE) |
||||
|
|
||||
|
# Git submodules are seriously broken.
|
||||
|
external/jsmn/jsmn.h: |
||||
|
git submodule update external/jsmn/ |
||||
|
[ -f $@ ] || git submodule update --init external/jsmn/ |
||||
|
|
||||
|
# If we tell Make that the above builds both, it runs it twice in
|
||||
|
# parallel. So we lie :(
|
||||
|
external/jsmn/jsmn.c: external/jsmn/jsmn.h |
||||
|
[ -f $@ ] |
||||
|
|
||||
|
external/jsmn.o: external/jsmn/jsmn.c |
||||
|
$(COMPILE.c) -DJSMN_STRICT=1 $(OUTPUT_OPTION) $< |
||||
|
|
||||
|
external/libjsmn.a: external/jsmn.o |
||||
|
$(AR) rc $@ $< |
||||
|
|
||||
|
LIBBASE58_SRC := external/libbase58/base58.c |
||||
|
|
||||
|
$(LIBBASE58_SRC): $(LIBBASE58_HEADERS) |
||||
|
|
||||
|
$(LIBBASE58_HEADERS): |
||||
|
git submodule update external/libbase58/ || true |
||||
|
[ -f $@ ] || git submodule update --init external/libbase58/ |
||||
|
|
||||
|
# Can't be inside submodule, as that makes git think it's dirty.
|
||||
|
external/base58.o: $(LIBBASE58_SRC) |
||||
|
$(COMPILE.c) $(OUTPUT_OPTION) $< |
||||
|
|
||||
|
external/libbase58.a: external/base58.o |
||||
|
$(AR) rc $@ $< |
||||
|
|
||||
|
distclean: external-distclean |
||||
|
clean: external-clean |
||||
|
|
||||
|
external-clean: |
||||
|
$(RM) $(EXTERNAL_LIBS) |
||||
|
|
||||
|
external-distclean: |
||||
|
make -C external/libsodium distclean || true |
||||
|
make -C external/libbase64 distclean || true |
||||
|
$(RM) external/libsodium.la external/libsodium/src/libsodium/libsodium.la |
||||
|
$(RM) external/libwally-core/src/secp256k1/libsecp256k1.la external/libwally-core/src/libwallycore.la |
||||
|
cd external/libwally-core && tools/cleanup.sh |
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue