Browse Source

Add libbase58 as git submodule

Pointing to the latest release (0.1.4)
ppa-0.6.1
Lucas Betschart 8 years ago
committed by Rusty Russell
parent
commit
3e6bb958eb
  1. 3
      .gitmodules
  2. 14
      Makefile
  3. 2
      bitcoin/base58.c
  4. 1
      bitcoin/libbase58
  5. 4
      daemon/Makefile

3
.gitmodules

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

14
Makefile

@ -40,6 +40,10 @@ BITCOIN_SRC := \
BITCOIN_OBJS := $(BITCOIN_SRC:.c=.o)
LIBBASE58_SRC := bitcoin/libbase58/base58.c
LIBBASE58_OBJS := $(LIBBASE58_SRC:.c=.o)
CORE_SRC := \
close_tx.c \
find_p2sh_out.c \
@ -163,6 +167,8 @@ BITCOIN_HEADERS := bitcoin/address.h \
bitcoin/tx.h \
bitcoin/varint.h
LIBBASE58_HEADERS := bitcoin/libbase58/libbase58.h
CORE_HEADERS := close_tx.h \
find_p2sh_out.h \
irc.h \
@ -196,7 +202,7 @@ CWARNFLAGS := -Werror -Wall -Wundef -Wmissing-prototypes -Wmissing-declarations
CDEBUGFLAGS := -g -fstack-protector
CFLAGS := $(CWARNFLAGS) $(CDEBUGFLAGS) -I $(CCANDIR) -I secp256k1/include/ -I . $(FEATURES)
LDLIBS := -lprotobuf-c -lgmp -lsodium -lbase58 -lsqlite3
LDLIBS := -lprotobuf-c -lgmp -lsodium -lsqlite3
$(PROGRAMS): CFLAGS+=-I.
default: $(PROGRAMS) $(MANPAGES) daemon-all
@ -208,10 +214,10 @@ $(MANPAGES): doc/%: doc/%.txt
@if $(CHANGED_FROM_GIT); then echo a2x --format=manpage $<; a2x --format=manpage $<; else touch $@; fi
# Everything depends on the CCAN headers.
$(CCAN_OBJS) $(CDUMP_OBJS) $(HELPER_OBJS) $(BITCOIN_OBJS) $(TEST_PROGRAMS:=.o) ccan/ccan/cdump/tools/cdump-enumstr.o: $(CCAN_HEADERS)
$(CCAN_OBJS) $(CDUMP_OBJS) $(HELPER_OBJS) $(BITCOIN_OBJS) $(LIBBASE58_OBJS) $(TEST_PROGRAMS:=.o) ccan/ccan/cdump/tools/cdump-enumstr.o: $(CCAN_HEADERS)
# Except for CCAN, everything depends on bitcoin/ and core headers.
$(HELPER_OBJS) $(CORE_OBJS) $(BITCOIN_OBJS) $(TEST_PROGRAMS:=.o): $(BITCOIN_HEADERS) $(CORE_HEADERS) $(CCAN_HEADERS) $(GEN_HEADERS)
$(HELPER_OBJS) $(CORE_OBJS) $(BITCOIN_OBJS) $(LIBBASE58_OBJS) $(TEST_PROGRAMS:=.o): $(BITCOIN_HEADERS) $(CORE_HEADERS) $(CCAN_HEADERS) $(GEN_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
@ -285,7 +291,7 @@ secp256k1/libsecp256k1.la:
lightning.pb-c.c lightning.pb-c.h: lightning.proto
@if $(CHANGED_FROM_GIT); then echo $(PROTOCC) lightning.proto --c_out=.; $(PROTOCC) lightning.proto --c_out=.; else touch $@; fi
$(TEST_PROGRAMS): % : %.o $(BITCOIN_OBJS) $(WIRE_OBJS) $(CCAN_OBJS) utils.o version.o libsecp256k1.a
$(TEST_PROGRAMS): % : %.o $(BITCOIN_OBJS) $(LIBBASE58_OBJS) $(WIRE_OBJS) $(CCAN_OBJS) utils.o version.o libsecp256k1.a
ccan/config.h: ccan/tools/configurator/configurator
if $< > $@.new; then mv $@.new $@; else rm $@.new; exit 1; fi

2
bitcoin/base58.c

@ -9,10 +9,10 @@
#include "pubkey.h"
#include "shadouble.h"
#include "utils.h"
#include "libbase58/libbase58.h"
#include <assert.h>
#include <ccan/build_assert/build_assert.h>
#include <ccan/tal/str/str.h>
#include <libbase58.h>
#include <secp256k1.h>
#include <string.h>

1
bitcoin/libbase58

@ -0,0 +1 @@
Subproject commit 16c2527608053d2cc2fa05b2e3b5ae96065d1410

4
daemon/Makefile

@ -138,9 +138,9 @@ daemon/jsmn/jsmn.c: daemon/jsmn/jsmn.h
daemon/jsmn.o: daemon/jsmn/jsmn.c
$(COMPILE.c) -DJSMN_STRICT=1 $(OUTPUT_OPTION) $<
daemon/lightningd: $(DAEMON_OBJS) $(DAEMON_LIB_OBJS) $(DAEMON_JSMN_OBJS) $(CORE_OBJS) $(BITCOIN_OBJS) $(WIRE_OBJS) $(CCAN_OBJS) libsecp256k1.a
daemon/lightningd: $(DAEMON_OBJS) $(DAEMON_LIB_OBJS) $(DAEMON_JSMN_OBJS) $(CORE_OBJS) $(BITCOIN_OBJS) $(LIBBASE58_OBJS) $(WIRE_OBJS) $(CCAN_OBJS) libsecp256k1.a
daemon/lightning-cli: $(DAEMON_CLI_OBJS) $(DAEMON_LIB_OBJS) $(DAEMON_JSMN_OBJS) $(CORE_OBJS) $(BITCOIN_OBJS) $(WIRE_OBJS) $(CCAN_OBJS) libsecp256k1.a
daemon/lightning-cli: $(DAEMON_CLI_OBJS) $(DAEMON_LIB_OBJS) $(DAEMON_JSMN_OBJS) $(CORE_OBJS) $(BITCOIN_OBJS) $(LIBBASE58_OBJS) $(WIRE_OBJS) $(CCAN_OBJS) libsecp256k1.a
daemon-clean:
$(RM) $(DAEMON_OBJS) $(DAEMON_LIB_OBJS) $(DAEMON_CLI_OBJS) $(DAEMON_JSMN_OBJS) $(DAEMON_GEN_HEADERS)

Loading…
Cancel
Save