Browse Source

external: new subdirectory for all external libraries and submodules.

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
parent
commit
f42f34b82d
  1. 6
      .gitmodules
  2. 59
      Makefile
  3. 16
      bitcoin/Makefile
  4. 2
      bitcoin/base58.c
  5. 18
      cli/Makefile
  6. 2
      common/json.h
  7. 1
      daemon/.gitignore
  8. 93
      daemon/Makefile
  9. 82
      external/Makefile
  10. 0
      external/jsmn
  11. 0
      external/libbase58
  12. 0
      external/libsodium
  13. 0
      external/libwally-core/.gitignore
  14. 0
      external/libwally-core/.travis.yml
  15. 0
      external/libwally-core/1README
  16. 0
      external/libwally-core/INSTALL
  17. 0
      external/libwally-core/LICENSE
  18. 0
      external/libwally-core/Makefile.am
  19. 0
      external/libwally-core/README.md
  20. 0
      external/libwally-core/configure.ac
  21. 0
      external/libwally-core/include/wally_bip32.h
  22. 0
      external/libwally-core/include/wally_bip38.h
  23. 0
      external/libwally-core/include/wally_bip39.h
  24. 0
      external/libwally-core/include/wally_core.h
  25. 0
      external/libwally-core/include/wally_crypto.h
  26. 0
      external/libwally-core/setup.py
  27. 0
      external/libwally-core/src/Makefile.am
  28. 0
      external/libwally-core/src/aes.c
  29. 0
      external/libwally-core/src/base58.c
  30. 0
      external/libwally-core/src/base58.h
  31. 0
      external/libwally-core/src/bip32.c
  32. 0
      external/libwally-core/src/bip32_int.h
  33. 0
      external/libwally-core/src/bip38.c
  34. 0
      external/libwally-core/src/bip39.c
  35. 0
      external/libwally-core/src/ccan/README
  36. 0
      external/libwally-core/src/ccan/ccan/build_assert/LICENSE
  37. 0
      external/libwally-core/src/ccan/ccan/build_assert/_info
  38. 0
      external/libwally-core/src/ccan/ccan/build_assert/build_assert.h
  39. 0
      external/libwally-core/src/ccan/ccan/build_assert/test/compile_fail-expr.c
  40. 0
      external/libwally-core/src/ccan/ccan/build_assert/test/compile_fail.c
  41. 0
      external/libwally-core/src/ccan/ccan/build_assert/test/compile_ok.c
  42. 0
      external/libwally-core/src/ccan/ccan/build_assert/test/run-BUILD_ASSERT_OR_ZERO.c
  43. 0
      external/libwally-core/src/ccan/ccan/compiler/LICENSE
  44. 0
      external/libwally-core/src/ccan/ccan/compiler/_info
  45. 0
      external/libwally-core/src/ccan/ccan/compiler/compiler.h
  46. 0
      external/libwally-core/src/ccan/ccan/compiler/test/compile_fail-printf.c
  47. 0
      external/libwally-core/src/ccan/ccan/compiler/test/run-is_compile_constant.c
  48. 0
      external/libwally-core/src/ccan/ccan/crypto/ripemd160/LICENSE
  49. 0
      external/libwally-core/src/ccan/ccan/crypto/ripemd160/_info
  50. 0
      external/libwally-core/src/ccan/ccan/crypto/ripemd160/ripemd160.c
  51. 0
      external/libwally-core/src/ccan/ccan/crypto/ripemd160/ripemd160.h
  52. 0
      external/libwally-core/src/ccan/ccan/crypto/ripemd160/test/run-lotsa-data.c
  53. 0
      external/libwally-core/src/ccan/ccan/crypto/ripemd160/test/run-test-vectors.c
  54. 0
      external/libwally-core/src/ccan/ccan/crypto/ripemd160/test/run-types.c
  55. 0
      external/libwally-core/src/ccan/ccan/crypto/sha256/LICENSE
  56. 0
      external/libwally-core/src/ccan/ccan/crypto/sha256/_info
  57. 0
      external/libwally-core/src/ccan/ccan/crypto/sha256/sha256.c
  58. 0
      external/libwally-core/src/ccan/ccan/crypto/sha256/sha256.h
  59. 0
      external/libwally-core/src/ccan/ccan/crypto/sha256/test/run-33-bit-test.c
  60. 0
      external/libwally-core/src/ccan/ccan/crypto/sha256/test/run-lotsa-data.c
  61. 0
      external/libwally-core/src/ccan/ccan/crypto/sha256/test/run-test-vectors.c
  62. 0
      external/libwally-core/src/ccan/ccan/crypto/sha256/test/run-types.c
  63. 0
      external/libwally-core/src/ccan/ccan/crypto/sha512/LICENSE
  64. 0
      external/libwally-core/src/ccan/ccan/crypto/sha512/_info
  65. 0
      external/libwally-core/src/ccan/ccan/crypto/sha512/sha512.c
  66. 0
      external/libwally-core/src/ccan/ccan/crypto/sha512/sha512.h
  67. 0
      external/libwally-core/src/ccan/ccan/endian/LICENSE
  68. 0
      external/libwally-core/src/ccan/ccan/endian/_info
  69. 0
      external/libwally-core/src/ccan/ccan/endian/endian.h
  70. 0
      external/libwally-core/src/ccan/ccan/endian/test/compile_ok-constant.c
  71. 0
      external/libwally-core/src/ccan/ccan/endian/test/run.c
  72. 0
      external/libwally-core/src/ccan/ccan/str/hex/LICENSE
  73. 0
      external/libwally-core/src/ccan/ccan/str/hex/_info
  74. 0
      external/libwally-core/src/ccan/ccan/str/hex/hex.c
  75. 0
      external/libwally-core/src/ccan/ccan/str/hex/hex.h
  76. 0
      external/libwally-core/src/ccan/ccan/str/hex/test/run.c
  77. 0
      external/libwally-core/src/ccan/ccan/tap/_info
  78. 0
      external/libwally-core/src/ccan/ccan/tap/tap.3
  79. 0
      external/libwally-core/src/ccan/ccan/tap/tap.c
  80. 0
      external/libwally-core/src/ccan/ccan/tap/tap.h
  81. 0
      external/libwally-core/src/ccan/ccan/tap/test/run.c
  82. 0
      external/libwally-core/src/ccan/licenses/BSD-MIT
  83. 0
      external/libwally-core/src/ccan/licenses/CC0
  84. 0
      external/libwally-core/src/ccan_config.h
  85. 0
      external/libwally-core/src/cpufeatures/NOTICE
  86. 0
      external/libwally-core/src/cpufeatures/cpu-features.c
  87. 0
      external/libwally-core/src/cpufeatures/cpu-features.h
  88. 0
      external/libwally-core/src/ctaes/COPYING
  89. 0
      external/libwally-core/src/ctaes/README.md
  90. 0
      external/libwally-core/src/ctaes/bench.c
  91. 0
      external/libwally-core/src/ctaes/ctaes.c
  92. 0
      external/libwally-core/src/ctaes/ctaes.h
  93. 0
      external/libwally-core/src/ctaes/test.c
  94. 0
      external/libwally-core/src/ctest/test_clear.c
  95. 0
      external/libwally-core/src/data/address_vectors.txt
  96. 0
      external/libwally-core/src/data/aes-cbc-pkcs7.txt
  97. 0
      external/libwally-core/src/data/ecdsa_secp256k1_vectors.txt
  98. 0
      external/libwally-core/src/data/pbkdf2_hmac_sha_vectors.txt
  99. 0
      external/libwally-core/src/data/wordlists/README
  100. 0
      external/libwally-core/src/data/wordlists/chinese_simplified.c

6
.gitmodules

@ -1,9 +1,9 @@
[submodule "daemon/jsmn"]
path = daemon/jsmn
path = external/jsmn
url = https://github.com/zserge/jsmn
[submodule "bitcoin/libbase58"]
path = bitcoin/libbase58
path = external/libbase58
url = https://github.com/bitcoin/libbase58.git
[submodule "libsodium"]
path = libsodium
path = external/libsodium
url = https://github.com/jedisct1/libsodium.git

59
Makefile

@ -160,28 +160,22 @@ BITCOIN_HEADERS := bitcoin/address.h \
GEN_HEADERS := gen_version.h
LIBSODIUM_HEADERS := libsodium/src/libsodium/include/sodium.h
LIBWALLY_HEADERS := libwally-core/include/wally_bip32.h \
libwally-core/include/wally_core.h \
libwally-core/include/wally_crypto.h
LIBSECP_HEADERS := libwally-core/src/secp256k1/include/secp256k1_ecdh.h \
libwally-core/src/secp256k1/include/secp256k1.h
CDUMP_OBJS := ccan-cdump.o ccan-strmap.o
WIRE_GEN := tools/generate-wire.py
PROGRAMS := $(TEST_PROGRAMS)
PROGRAMS += $(TEST_PROGRAMS)
CWARNFLAGS := -Werror -Wall -Wundef -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wold-style-definition
CDEBUGFLAGS := -std=gnu11 -g -fstack-protector
CFLAGS := $(CWARNFLAGS) $(CDEBUGFLAGS) -I $(CCANDIR) -I libwally-core/src/secp256k1/include/ -I libwally-core/include/ -I libsodium/src/libsodium/include/ -I . $(FEATURES) $(COVFLAGS) -DSHACHAIN_BITS=48
CFLAGS = $(CWARNFLAGS) $(CDEBUGFLAGS) -I $(CCANDIR) $(EXTERNAL_INCLUDE_FLAGS) -I . $(FEATURES) $(COVFLAGS) -DSHACHAIN_BITS=48
LDFLAGS := -Lexternal
LDLIBS := -lgmp -lsqlite3 $(COVFLAGS)
$(PROGRAMS): CFLAGS+=-I.
LDLIBS = -lgmp -lsqlite3 $(COVFLAGS) $(EXTERNAL_LDLIBS)
default: $(PROGRAMS) doc-all
default: $(TEST_PROGRAMS) doc-all
include external/Makefile
include common/Makefile
include doc/Makefile
include bitcoin/Makefile
@ -197,7 +191,7 @@ CHANGED_FROM_GIT = [ x"`git log $@ | head -n1`" != x"`git log $< | head -n1`" -o
$(CCAN_OBJS) $(CDUMP_OBJS) $(HELPER_OBJS) $(BITCOIN_OBJS) $(TEST_PROGRAMS:=.o) ccan/ccan/cdump/tools/cdump-enumstr.o: $(CCAN_HEADERS)
# Except for CCAN, everything depends on bitcoin, ccan, library and common headers.
$(HELPER_OBJS) $(COMMON_OBJS) $(BITCOIN_OBJS) $(LIBBASE58_OBJS) $(WIRE_OBJS) $(WALLET_LIB_OBJS) $(TEST_PROGRAMS:=.o): $(BITCOIN_HEADERS) $(COMMON_HEADERS) $(CCAN_HEADERS) $(GEN_HEADERS) $(LIBBASE58_HEADERS) $(LIBSODIUM_HEADERS) $(LIBWALLY_HEADERS)
$(HELPER_OBJS) $(COMMON_OBJS) $(BITCOIN_OBJS) $(LIBBASE58_OBJS) $(WIRE_OBJS) $(WALLET_LIB_OBJS) $(TEST_PROGRAMS:=.o): $(BITCOIN_HEADERS) $(COMMON_HEADERS) $(CCAN_HEADERS) $(GEN_HEADERS) $(EXTERNAL_HEADERS)
test-protocol: test/test_protocol
set -e; TMP=`mktemp`; for f in test/commits/*.script; do if ! $(VALGRIND) test/test_protocol < $$f > $$TMP; then echo "test/test_protocol < $$f FAILED" >&2; exit 1; fi; diff -u $$TMP $$f.expected; done; rm $$TMP
@ -257,28 +251,11 @@ TAGS: FORCE
$(RM) TAGS; find * -name test -type d -prune -o -name '*.[ch]' -print | xargs etags --append
FORCE::
ccan/ccan/cdump/tools/cdump-enumstr: ccan/ccan/cdump/tools/cdump-enumstr.o $(CDUMP_OBJS) $(CCAN_OBJS)
# We build libsodium, since Ubuntu xenial has one too old.
libsodium.a: libsodium/src/libsodium/libsodium.la
$(MAKE) -C libsodium install-exec
libsodium/src/libsodium/include/sodium.h:
git submodule update libsodium
[ -f $@ ] || git submodule update --init libsodium
ccan/ccan/cdump/tools/cdump-enumstr: ccan/ccan/cdump/tools/cdump-enumstr.o $(CDUMP_OBJS) $(CCAN_OBJS) $(EXTERNAL_LIBS)
libsodium/src/libsodium/libsodium.la: libsodium/src/libsodium/include/sodium.h
cd libsodium && ./autogen.sh && ./configure CC="$(CC)" --enable-static=yes --enable-shared=no --enable-tests=no --libdir=`pwd`/.. && $(MAKE)
PROGRAMS += ccan/ccan/cdump/tools/cdump-enumstr
# 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
libsecp256k1.% libwallycore.%: libwally-core/src/secp256k1/libsecp256k1.la libwally-core/src/libwallycore.la
$(MAKE) -C libwally-core install-exec
libwally-core/src/libwallycore.% libwally-core/src/secp256k1/libsecp256k1.%: $(LIBWALLY_HEADERS) $(LIBSECP_HEADERS)
cd libwally-core && ./tools/autogen.sh && ./configure CC="$(CC)" --enable-static=yes --enable-shared=no --libdir=`pwd`/.. && $(MAKE)
$(TEST_PROGRAMS): % : %.o $(BITCOIN_OBJS) $(LIBBASE58_OBJS) $(WIRE_OBJS) $(CCAN_OBJS) common/sphinx.o common/utils.o libwallycore.a libsecp256k1.a libsodium.a
$(TEST_PROGRAMS): % : %.o $(BITCOIN_OBJS) $(WIRE_OBJS) $(CCAN_OBJS) common/sphinx.o common/utils.o
ccan/config.h: ccan/tools/configurator/configurator
if $< > $@.new; then mv $@.new $@; else rm $@.new; exit 1; fi
@ -289,6 +266,9 @@ gen_version.h: FORCE
version.o: gen_version.h
# All binaries require the external libs
$(PROGRAMS): $(EXTERNAL_LIBS)
update-ccan:
mv ccan ccan.old
DIR=$$(pwd)/ccan; cd ../ccan && ./tools/create-ccan-tree -a $$DIR `cd $$DIR.old/ccan && find * -name _info | sed s,/_info,, | sort` $(CCAN_NEW)
@ -308,23 +288,14 @@ update-secp256k1:
$(RM) -r secp256k1.old
distclean: clean
$(MAKE) -C secp256k1/ distclean || true
$(RM) libsecp256k1.a secp256k1/libsecp256k1.la
$(RM) libsodium.a libsodium.la libsodium/libsodium.la
$(RM) libwallycore.a libwallycore.la
$(RM) libwally-core/src/secp256k1/libsecp256k1.la libwally-core/src/libwallycore.la
cd libwally-core && tools/cleanup.sh
maintainer-clean: distclean
@echo 'This command is intended for maintainers to use; it'
@echo 'deletes files that may need special tools to rebuild.'
clean: wire-clean
$(MAKE) -C secp256k1/ clean || true
$(RM) libsecp256k1.{a,la}
$(RM) libsodium.{a,la}
$(RM) $(PROGRAMS)
$(RM) bitcoin/*.o *.o $(PROGRAMS:=.o) $(CCAN_OBJS)
$(RM) $(TEST_PROGRAMS)
$(RM) bitcoin/*.o *.o $(TEST_PROGRAMS:=.o) $(CCAN_OBJS)
$(RM) ccan/config.h gen_*.h
$(RM) ccan/ccan/cdump/tools/cdump-enumstr.o
$(RM) check-bolt tools/check-bolt tools/*.o

16
bitcoin/Makefile

@ -24,19 +24,3 @@ check-whitespace: $(BITCOIN_SRC:%=check-whitespace/%) $(BITCOIN_HEADERS:%=check-
bitcoin-tests: $(BITCOIN_TEST_PROGRAMS:%=unittest/%)
LIBBASE58_HEADERS := bitcoin/libbase58/libbase58.h
LIBBASE58_SRC := bitcoin/libbase58/base58.c
# Can't be inside submodule, as that makes git think it's dirty.
LIBBASE58_OBJS := bitcoin/libbase58.o
# Wildcards trick from http://stackoverflow.com/questions/2973445/gnu-makefile-rule-generating-a-few-targets-from-a-single-source-file doesn't work with no dependency, so instead make one depend on the other:
$(LIBBASE58_SRC): $(LIBBASE58_HEADERS)
$(LIBBASE58_HEADERS):
git submodule update bitcoin/libbase58/ || true
[ -f $@ ] || git submodule update --init bitcoin/libbase58/
bitcoin/libbase58.o: bitcoin/libbase58/base58.c
$(COMPILE.c) $(OUTPUT_OPTION) $<

2
bitcoin/base58.c

@ -5,7 +5,6 @@
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "address.h"
#include "base58.h"
#include "libbase58/libbase58.h"
#include "privkey.h"
#include "pubkey.h"
#include "shadouble.h"
@ -13,6 +12,7 @@
#include <ccan/build_assert/build_assert.h>
#include <ccan/tal/str/str.h>
#include <common/utils.h>
#include <libbase58.h>
#include <secp256k1.h>
#include <string.h>

18
cli/Makefile

@ -1,9 +1,6 @@
LIGHTNING_CLI_SRC := cli/lightning-cli.c
LIGHTNING_CLI_OBJS := $(LIGHTNING_CLI_SRC:.c=.o)
JSMN_OBJS := daemon/jsmn.o
JSMN_HEADERS := daemon/jsmn/jsmn.h
LIGHTNING_CLI_COMMON_OBJS := \
common/configdir.o \
common/json.o \
@ -11,20 +8,7 @@ LIGHTNING_CLI_COMMON_OBJS := \
lightning-cli-all: cli/lightning-cli
$(LIGHTNINGD_OPENING_OBJS): $(LIGHTNINGD_HEADERS)
# Git submodules are seriously broken.
daemon/jsmn/jsmn.h:
git submodule update daemon/jsmn/
[ -f $@ ] || git submodule update --init daemon/jsmn/
# If we tell Make that the above builds both, it runs it twice in
# parallel. So we lie :(
daemon/jsmn/jsmn.c: daemon/jsmn/jsmn.h
[ -f $@ ]
daemon/jsmn.o: daemon/jsmn/jsmn.c
$(COMPILE.c) -DJSMN_STRICT=1 $(OUTPUT_OPTION) $<
$(LIGHTNINGD_OPENING_OBJS): $(LIGHTNINGD_HEADERS) $(EXTERNAL_HEADERS)
$(LIGHTNING_CLI_OBJS) $(JSMN_OBJS): $(JSMN_HEADERS) $(COMMON_HEADERS) $(CCAN_HEADERS)

2
common/json.h

@ -8,7 +8,7 @@
#include <stdlib.h>
#define JSMN_STRICT 1
# include "daemon/jsmn/jsmn.h"
# include <external/jsmn/jsmn.h>
struct ipaddr;
struct json_result;

1
daemon/.gitignore

@ -1 +0,0 @@
lightningd

93
daemon/Makefile

@ -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:

82
external/Makefile

@ -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

0
daemon/jsmn → external/jsmn

0
bitcoin/libbase58 → external/libbase58

0
libsodium → external/libsodium

0
libwally-core/.gitignore → external/libwally-core/.gitignore

0
libwally-core/.travis.yml → external/libwally-core/.travis.yml

0
libwally-core/1README → external/libwally-core/1README

0
libwally-core/INSTALL → external/libwally-core/INSTALL

0
libwally-core/LICENSE → external/libwally-core/LICENSE

0
libwally-core/Makefile.am → external/libwally-core/Makefile.am

0
libwally-core/README.md → external/libwally-core/README.md

0
libwally-core/configure.ac → external/libwally-core/configure.ac

0
libwally-core/include/wally_bip32.h → external/libwally-core/include/wally_bip32.h

0
libwally-core/include/wally_bip38.h → external/libwally-core/include/wally_bip38.h

0
libwally-core/include/wally_bip39.h → external/libwally-core/include/wally_bip39.h

0
libwally-core/include/wally_core.h → external/libwally-core/include/wally_core.h

0
libwally-core/include/wally_crypto.h → external/libwally-core/include/wally_crypto.h

0
libwally-core/setup.py → external/libwally-core/setup.py

0
libwally-core/src/Makefile.am → external/libwally-core/src/Makefile.am

0
libwally-core/src/aes.c → external/libwally-core/src/aes.c

0
libwally-core/src/base58.c → external/libwally-core/src/base58.c

0
libwally-core/src/base58.h → external/libwally-core/src/base58.h

0
libwally-core/src/bip32.c → external/libwally-core/src/bip32.c

0
libwally-core/src/bip32_int.h → external/libwally-core/src/bip32_int.h

0
libwally-core/src/bip38.c → external/libwally-core/src/bip38.c

0
libwally-core/src/bip39.c → external/libwally-core/src/bip39.c

0
libwally-core/src/ccan/README → external/libwally-core/src/ccan/README

0
libwally-core/src/ccan/ccan/build_assert/LICENSE → external/libwally-core/src/ccan/ccan/build_assert/LICENSE

0
libwally-core/src/ccan/ccan/build_assert/_info → external/libwally-core/src/ccan/ccan/build_assert/_info

0
libwally-core/src/ccan/ccan/build_assert/build_assert.h → external/libwally-core/src/ccan/ccan/build_assert/build_assert.h

0
libwally-core/src/ccan/ccan/build_assert/test/compile_fail-expr.c → external/libwally-core/src/ccan/ccan/build_assert/test/compile_fail-expr.c

0
libwally-core/src/ccan/ccan/build_assert/test/compile_fail.c → external/libwally-core/src/ccan/ccan/build_assert/test/compile_fail.c

0
libwally-core/src/ccan/ccan/build_assert/test/compile_ok.c → external/libwally-core/src/ccan/ccan/build_assert/test/compile_ok.c

0
libwally-core/src/ccan/ccan/build_assert/test/run-BUILD_ASSERT_OR_ZERO.c → external/libwally-core/src/ccan/ccan/build_assert/test/run-BUILD_ASSERT_OR_ZERO.c

0
libwally-core/src/ccan/ccan/compiler/LICENSE → external/libwally-core/src/ccan/ccan/compiler/LICENSE

0
libwally-core/src/ccan/ccan/compiler/_info → external/libwally-core/src/ccan/ccan/compiler/_info

0
libwally-core/src/ccan/ccan/compiler/compiler.h → external/libwally-core/src/ccan/ccan/compiler/compiler.h

0
libwally-core/src/ccan/ccan/compiler/test/compile_fail-printf.c → external/libwally-core/src/ccan/ccan/compiler/test/compile_fail-printf.c

0
libwally-core/src/ccan/ccan/compiler/test/run-is_compile_constant.c → external/libwally-core/src/ccan/ccan/compiler/test/run-is_compile_constant.c

0
libwally-core/src/ccan/ccan/crypto/ripemd160/LICENSE → external/libwally-core/src/ccan/ccan/crypto/ripemd160/LICENSE

0
libwally-core/src/ccan/ccan/crypto/ripemd160/_info → external/libwally-core/src/ccan/ccan/crypto/ripemd160/_info

0
libwally-core/src/ccan/ccan/crypto/ripemd160/ripemd160.c → external/libwally-core/src/ccan/ccan/crypto/ripemd160/ripemd160.c

0
libwally-core/src/ccan/ccan/crypto/ripemd160/ripemd160.h → external/libwally-core/src/ccan/ccan/crypto/ripemd160/ripemd160.h

0
libwally-core/src/ccan/ccan/crypto/ripemd160/test/run-lotsa-data.c → external/libwally-core/src/ccan/ccan/crypto/ripemd160/test/run-lotsa-data.c

0
libwally-core/src/ccan/ccan/crypto/ripemd160/test/run-test-vectors.c → external/libwally-core/src/ccan/ccan/crypto/ripemd160/test/run-test-vectors.c

0
libwally-core/src/ccan/ccan/crypto/ripemd160/test/run-types.c → external/libwally-core/src/ccan/ccan/crypto/ripemd160/test/run-types.c

0
libwally-core/src/ccan/ccan/crypto/sha256/LICENSE → external/libwally-core/src/ccan/ccan/crypto/sha256/LICENSE

0
libwally-core/src/ccan/ccan/crypto/sha256/_info → external/libwally-core/src/ccan/ccan/crypto/sha256/_info

0
libwally-core/src/ccan/ccan/crypto/sha256/sha256.c → external/libwally-core/src/ccan/ccan/crypto/sha256/sha256.c

0
libwally-core/src/ccan/ccan/crypto/sha256/sha256.h → external/libwally-core/src/ccan/ccan/crypto/sha256/sha256.h

0
libwally-core/src/ccan/ccan/crypto/sha256/test/run-33-bit-test.c → external/libwally-core/src/ccan/ccan/crypto/sha256/test/run-33-bit-test.c

0
libwally-core/src/ccan/ccan/crypto/sha256/test/run-lotsa-data.c → external/libwally-core/src/ccan/ccan/crypto/sha256/test/run-lotsa-data.c

0
libwally-core/src/ccan/ccan/crypto/sha256/test/run-test-vectors.c → external/libwally-core/src/ccan/ccan/crypto/sha256/test/run-test-vectors.c

0
libwally-core/src/ccan/ccan/crypto/sha256/test/run-types.c → external/libwally-core/src/ccan/ccan/crypto/sha256/test/run-types.c

0
libwally-core/src/ccan/ccan/crypto/sha512/LICENSE → external/libwally-core/src/ccan/ccan/crypto/sha512/LICENSE

0
libwally-core/src/ccan/ccan/crypto/sha512/_info → external/libwally-core/src/ccan/ccan/crypto/sha512/_info

0
libwally-core/src/ccan/ccan/crypto/sha512/sha512.c → external/libwally-core/src/ccan/ccan/crypto/sha512/sha512.c

0
libwally-core/src/ccan/ccan/crypto/sha512/sha512.h → external/libwally-core/src/ccan/ccan/crypto/sha512/sha512.h

0
libwally-core/src/ccan/ccan/endian/LICENSE → external/libwally-core/src/ccan/ccan/endian/LICENSE

0
libwally-core/src/ccan/ccan/endian/_info → external/libwally-core/src/ccan/ccan/endian/_info

0
libwally-core/src/ccan/ccan/endian/endian.h → external/libwally-core/src/ccan/ccan/endian/endian.h

0
libwally-core/src/ccan/ccan/endian/test/compile_ok-constant.c → external/libwally-core/src/ccan/ccan/endian/test/compile_ok-constant.c

0
libwally-core/src/ccan/ccan/endian/test/run.c → external/libwally-core/src/ccan/ccan/endian/test/run.c

0
libwally-core/src/ccan/ccan/str/hex/LICENSE → external/libwally-core/src/ccan/ccan/str/hex/LICENSE

0
libwally-core/src/ccan/ccan/str/hex/_info → external/libwally-core/src/ccan/ccan/str/hex/_info

0
libwally-core/src/ccan/ccan/str/hex/hex.c → external/libwally-core/src/ccan/ccan/str/hex/hex.c

0
libwally-core/src/ccan/ccan/str/hex/hex.h → external/libwally-core/src/ccan/ccan/str/hex/hex.h

0
libwally-core/src/ccan/ccan/str/hex/test/run.c → external/libwally-core/src/ccan/ccan/str/hex/test/run.c

0
libwally-core/src/ccan/ccan/tap/_info → external/libwally-core/src/ccan/ccan/tap/_info

0
libwally-core/src/ccan/ccan/tap/tap.3 → external/libwally-core/src/ccan/ccan/tap/tap.3

0
libwally-core/src/ccan/ccan/tap/tap.c → external/libwally-core/src/ccan/ccan/tap/tap.c

0
libwally-core/src/ccan/ccan/tap/tap.h → external/libwally-core/src/ccan/ccan/tap/tap.h

0
libwally-core/src/ccan/ccan/tap/test/run.c → external/libwally-core/src/ccan/ccan/tap/test/run.c

0
libwally-core/src/ccan/licenses/BSD-MIT → external/libwally-core/src/ccan/licenses/BSD-MIT

0
libwally-core/src/ccan/licenses/CC0 → external/libwally-core/src/ccan/licenses/CC0

0
libwally-core/src/ccan_config.h → external/libwally-core/src/ccan_config.h

0
libwally-core/src/cpufeatures/NOTICE → external/libwally-core/src/cpufeatures/NOTICE

0
libwally-core/src/cpufeatures/cpu-features.c → external/libwally-core/src/cpufeatures/cpu-features.c

0
libwally-core/src/cpufeatures/cpu-features.h → external/libwally-core/src/cpufeatures/cpu-features.h

0
libwally-core/src/ctaes/COPYING → external/libwally-core/src/ctaes/COPYING

0
libwally-core/src/ctaes/README.md → external/libwally-core/src/ctaes/README.md

0
libwally-core/src/ctaes/bench.c → external/libwally-core/src/ctaes/bench.c

0
libwally-core/src/ctaes/ctaes.c → external/libwally-core/src/ctaes/ctaes.c

0
libwally-core/src/ctaes/ctaes.h → external/libwally-core/src/ctaes/ctaes.h

0
libwally-core/src/ctaes/test.c → external/libwally-core/src/ctaes/test.c

0
libwally-core/src/ctest/test_clear.c → external/libwally-core/src/ctest/test_clear.c

0
libwally-core/src/data/address_vectors.txt → external/libwally-core/src/data/address_vectors.txt

0
libwally-core/src/data/aes-cbc-pkcs7.txt → external/libwally-core/src/data/aes-cbc-pkcs7.txt

0
libwally-core/src/data/ecdsa_secp256k1_vectors.txt → external/libwally-core/src/data/ecdsa_secp256k1_vectors.txt

0
libwally-core/src/data/pbkdf2_hmac_sha_vectors.txt → external/libwally-core/src/data/pbkdf2_hmac_sha_vectors.txt

0
libwally-core/src/data/wordlists/README → external/libwally-core/src/data/wordlists/README

0
libwally-core/src/data/wordlists/chinese_simplified.c → external/libwally-core/src/data/wordlists/chinese_simplified.c

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save