aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJonas Schnelli <jonas.schnelli@include7.ch>2015-09-04 16:11:34 +0200
committerJonas Schnelli <dev@jonasschnelli.ch>2015-10-01 10:49:57 +0200
commit9623e934732ba0f0a5176cd3d993ebcda327b413 (patch)
treefbaf7e369670900b20c1b809885116adbab4c563 /src
parent6e16a41313dbc25d88def143cf1e0a964e36c7c0 (diff)
[Univalue] add univalue over subtree
similar to secp256k1 include and compile univalue over a subtree
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am23
-rw-r--r--src/Makefile.qt.include2
-rw-r--r--src/Makefile.qttest.include2
-rw-r--r--src/Makefile.test.include3
-rw-r--r--src/bitcoin-cli.cpp2
-rw-r--r--src/bitcoin-tx.cpp2
-rw-r--r--src/core_read.cpp2
-rw-r--r--src/core_write.cpp2
-rw-r--r--src/qt/rpcconsole.cpp2
-rw-r--r--src/rest.cpp2
-rw-r--r--src/rpcblockchain.cpp2
-rw-r--r--src/rpcclient.cpp2
-rw-r--r--src/rpcclient.h2
-rw-r--r--src/rpcmining.cpp2
-rw-r--r--src/rpcmisc.cpp2
-rw-r--r--src/rpcnet.cpp2
-rw-r--r--src/rpcprotocol.h2
-rw-r--r--src/rpcrawtransaction.cpp2
-rw-r--r--src/rpcserver.cpp2
-rw-r--r--src/rpcserver.h2
-rw-r--r--src/test/base58_tests.cpp2
-rw-r--r--src/test/rpc_tests.cpp2
-rw-r--r--src/test/rpc_wallet_tests.cpp2
-rw-r--r--src/test/script_tests.cpp2
-rw-r--r--src/test/sighash_tests.cpp2
-rw-r--r--src/test/transaction_tests.cpp2
-rw-r--r--src/test/univalue_tests.cpp2
-rw-r--r--src/wallet/rpcdump.cpp2
-rw-r--r--src/wallet/rpcwallet.cpp2
29 files changed, 38 insertions, 42 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 7fdc766e1c..301880dbc3 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,4 +1,4 @@
-DIST_SUBDIRS = secp256k1
+DIST_SUBDIRS = secp256k1 univalue
AM_LDFLAGS = $(PTHREAD_CFLAGS) $(LIBTOOL_LDFLAGS)
@@ -21,6 +21,7 @@ BITCOIN_CONFIG_INCLUDES=-I$(builddir)/config
BITCOIN_INCLUDES=-I$(builddir) -I$(builddir)/obj $(BOOST_CPPFLAGS) $(LEVELDB_CPPFLAGS) $(CRYPTO_CFLAGS) $(SSL_CFLAGS)
BITCOIN_INCLUDES += -I$(srcdir)/secp256k1/include
+BITCOIN_INCLUDES += -I$(srcdir)/univalue/include
LIBBITCOIN_SERVER=libbitcoin_server.a
LIBBITCOIN_WALLET=libbitcoin_wallet.a
@@ -28,12 +29,15 @@ LIBBITCOIN_COMMON=libbitcoin_common.a
LIBBITCOIN_CLI=libbitcoin_cli.a
LIBBITCOIN_UTIL=libbitcoin_util.a
LIBBITCOIN_CRYPTO=crypto/libbitcoin_crypto.a
-LIBBITCOIN_UNIVALUE=univalue/libbitcoin_univalue.a
LIBBITCOINQT=qt/libbitcoinqt.a
LIBSECP256K1=secp256k1/libsecp256k1.la
+LIBUNIVALUE=univalue/lib/libunivalue.la
$(LIBSECP256K1): $(wildcard secp256k1/src/*) $(wildcard secp256k1/include/*)
$(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C $(@D) $(@F)
+
+$(LIBUNIVALUE): $(wildcard univalue/lib/*) $(wildcard univalue/include/*)
+ $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C $(@D) $(@F)
# Make is not made aware of per-object dependencies to avoid limiting building parallelization
# But to build the less dependent modules first, we manually select their order here:
@@ -41,7 +45,6 @@ EXTRA_LIBRARIES = \
crypto/libbitcoin_crypto.a \
libbitcoin_util.a \
libbitcoin_common.a \
- univalue/libbitcoin_univalue.a \
libbitcoin_server.a \
libbitcoin_cli.a
if ENABLE_WALLET
@@ -248,14 +251,6 @@ crypto_libbitcoin_crypto_a_SOURCES = \
crypto/sha512.cpp \
crypto/sha512.h
-# univalue JSON library
-univalue_libbitcoin_univalue_a_SOURCES = \
- univalue/univalue.cpp \
- univalue/univalue.h \
- univalue/univalue_escapes.h \
- univalue/univalue_read.cpp \
- univalue/univalue_write.cpp
-
# common: shared between bitcoind, and bitcoin-qt and non-server tools
libbitcoin_common_a_CPPFLAGS = $(BITCOIN_INCLUDES)
libbitcoin_common_a_SOURCES = \
@@ -332,7 +327,7 @@ endif
bitcoind_LDADD = \
$(LIBBITCOIN_SERVER) \
$(LIBBITCOIN_COMMON) \
- $(LIBBITCOIN_UNIVALUE) \
+ $(LIBUNIVALUE) \
$(LIBBITCOIN_UTIL) \
$(LIBBITCOIN_CRYPTO) \
$(LIBLEVELDB) \
@@ -360,7 +355,7 @@ endif
bitcoin_cli_LDADD = \
$(LIBBITCOIN_CLI) \
- $(LIBBITCOIN_UNIVALUE) \
+ $(LIBUNIVALUE) \
$(LIBBITCOIN_UTIL)
bitcoin_cli_LDADD += $(BOOST_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) $(EVENT_LIBS)
@@ -376,7 +371,7 @@ bitcoin_tx_SOURCES += bitcoin-tx-res.rc
endif
bitcoin_tx_LDADD = \
- $(LIBBITCOIN_UNIVALUE) \
+ $(LIBUNIVALUE) \
$(LIBBITCOIN_COMMON) \
$(LIBBITCOIN_UTIL) \
$(LIBBITCOIN_CRYPTO) \
diff --git a/src/Makefile.qt.include b/src/Makefile.qt.include
index 3330ed2890..67fd7c1076 100644
--- a/src/Makefile.qt.include
+++ b/src/Makefile.qt.include
@@ -367,7 +367,7 @@ endif
if ENABLE_ZMQ
qt_bitcoin_qt_LDADD += $(LIBBITCOIN_ZMQ) $(ZMQ_LIBS)
endif
-qt_bitcoin_qt_LDADD += $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_UTIL) $(LIBBITCOIN_CRYPTO) $(LIBBITCOIN_UNIVALUE) $(LIBLEVELDB) $(LIBMEMENV) \
+qt_bitcoin_qt_LDADD += $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_UTIL) $(LIBBITCOIN_CRYPTO) $(LIBUNIVALUE) $(LIBLEVELDB) $(LIBMEMENV) \
$(BOOST_LIBS) $(QT_LIBS) $(QT_DBUS_LIBS) $(QR_LIBS) $(PROTOBUF_LIBS) $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) $(MINIUPNPC_LIBS) $(LIBSECP256K1) \
$(EVENT_PTHREADS_LIBS) $(EVENT_LIBS)
qt_bitcoin_qt_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(QT_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)
diff --git a/src/Makefile.qttest.include b/src/Makefile.qttest.include
index 6554580bea..b8725c872d 100644
--- a/src/Makefile.qttest.include
+++ b/src/Makefile.qttest.include
@@ -33,7 +33,7 @@ endif
if ENABLE_ZMQ
qt_test_test_bitcoin_qt_LDADD += $(LIBBITCOIN_ZMQ) $(ZMQ_LIBS)
endif
-qt_test_test_bitcoin_qt_LDADD += $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_UTIL) $(LIBBITCOIN_CRYPTO) $(LIBBITCOIN_UNIVALUE) $(LIBLEVELDB) \
+qt_test_test_bitcoin_qt_LDADD += $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_UTIL) $(LIBBITCOIN_CRYPTO) $(LIBUNIVALUE) $(LIBLEVELDB) \
$(LIBMEMENV) $(BOOST_LIBS) $(QT_DBUS_LIBS) $(QT_TEST_LIBS) $(QT_LIBS) \
$(QR_LIBS) $(PROTOBUF_LIBS) $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) $(MINIUPNPC_LIBS) $(LIBSECP256K1) \
$(EVENT_PTHREADS_LIBS) $(EVENT_LIBS)
diff --git a/src/Makefile.test.include b/src/Makefile.test.include
index cee35926a5..9a6e43631b 100644
--- a/src/Makefile.test.include
+++ b/src/Makefile.test.include
@@ -91,7 +91,7 @@ endif
test_test_bitcoin_SOURCES = $(BITCOIN_TESTS) $(JSON_TEST_FILES) $(RAW_TEST_FILES)
test_test_bitcoin_CPPFLAGS = $(BITCOIN_INCLUDES) -I$(builddir)/test/ $(TESTDEFS)
-test_test_bitcoin_LDADD = $(LIBBITCOIN_SERVER) $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_UTIL) $(LIBBITCOIN_CRYPTO) $(LIBBITCOIN_UNIVALUE) $(LIBLEVELDB) $(LIBMEMENV) \
+test_test_bitcoin_LDADD = $(LIBBITCOIN_SERVER) $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_UTIL) $(LIBBITCOIN_CRYPTO) $(LIBUNIVALUE) $(LIBLEVELDB) $(LIBMEMENV) \
$(BOOST_LIBS) $(BOOST_UNIT_TEST_FRAMEWORK_LIB) $(LIBSECP256K1)
if ENABLE_WALLET
test_test_bitcoin_LDADD += $(LIBBITCOIN_WALLET)
@@ -124,6 +124,7 @@ check-local:
@echo "Running test/bitcoin-util-test.py..."
$(AM_V_at)srcdir=$(srcdir) PYTHONPATH=$(builddir)/test $(srcdir)/test/bitcoin-util-test.py
$(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C secp256k1 check
+ $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C univalue check
%.json.h: %.json
@$(MKDIR_P) $(@D)
diff --git a/src/bitcoin-cli.cpp b/src/bitcoin-cli.cpp
index 7839b3b6b4..e0fe6aa5bf 100644
--- a/src/bitcoin-cli.cpp
+++ b/src/bitcoin-cli.cpp
@@ -18,7 +18,7 @@
#include <event2/buffer.h>
#include <event2/keyvalq_struct.h>
-#include "univalue/univalue.h"
+#include <univalue.h>
using namespace std;
diff --git a/src/bitcoin-tx.cpp b/src/bitcoin-tx.cpp
index 5beab265bc..f7518fab5d 100644
--- a/src/bitcoin-tx.cpp
+++ b/src/bitcoin-tx.cpp
@@ -12,7 +12,7 @@
#include "primitives/transaction.h"
#include "script/script.h"
#include "script/sign.h"
-#include "univalue/univalue.h"
+#include <univalue.h>
#include "util.h"
#include "utilmoneystr.h"
#include "utilstrencodings.h"
diff --git a/src/core_read.cpp b/src/core_read.cpp
index f762f2c3b7..4be24f8e09 100644
--- a/src/core_read.cpp
+++ b/src/core_read.cpp
@@ -9,7 +9,7 @@
#include "script/script.h"
#include "serialize.h"
#include "streams.h"
-#include "univalue/univalue.h"
+#include <univalue.h>
#include "util.h"
#include "utilstrencodings.h"
#include "version.h"
diff --git a/src/core_write.cpp b/src/core_write.cpp
index 2ad42baddf..533fedfe7a 100644
--- a/src/core_write.cpp
+++ b/src/core_write.cpp
@@ -10,7 +10,7 @@
#include "script/standard.h"
#include "serialize.h"
#include "streams.h"
-#include "univalue/univalue.h"
+#include <univalue.h>
#include "util.h"
#include "utilmoneystr.h"
#include "utilstrencodings.h"
diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp
index 72a3023c9a..f387a3ec8c 100644
--- a/src/qt/rpcconsole.cpp
+++ b/src/qt/rpcconsole.cpp
@@ -18,7 +18,7 @@
#include <openssl/crypto.h>
-#include "univalue/univalue.h"
+#include <univalue.h>
#ifdef ENABLE_WALLET
#include <db_cxx.h>
diff --git a/src/rest.cpp b/src/rest.cpp
index 226e237fc6..c46d7a8bd2 100644
--- a/src/rest.cpp
+++ b/src/rest.cpp
@@ -18,7 +18,7 @@
#include <boost/algorithm/string.hpp>
#include <boost/dynamic_bitset.hpp>
-#include "univalue/univalue.h"
+#include <univalue.h>
using namespace std;
diff --git a/src/rpcblockchain.cpp b/src/rpcblockchain.cpp
index 1c201ef99d..545ac12890 100644
--- a/src/rpcblockchain.cpp
+++ b/src/rpcblockchain.cpp
@@ -20,7 +20,7 @@
#include <stdint.h>
-#include "univalue/univalue.h"
+#include <univalue.h>
using namespace std;
diff --git a/src/rpcclient.cpp b/src/rpcclient.cpp
index 0c8e6d6d66..4064c2fee3 100644
--- a/src/rpcclient.cpp
+++ b/src/rpcclient.cpp
@@ -12,7 +12,7 @@
#include <stdint.h>
#include <boost/algorithm/string/case_conv.hpp> // for to_lower()
-#include "univalue/univalue.h"
+#include <univalue.h>
using namespace std;
diff --git a/src/rpcclient.h b/src/rpcclient.h
index d68b4ed6ae..8937a56f03 100644
--- a/src/rpcclient.h
+++ b/src/rpcclient.h
@@ -6,7 +6,7 @@
#ifndef BITCOIN_RPCCLIENT_H
#define BITCOIN_RPCCLIENT_H
-#include "univalue/univalue.h"
+#include <univalue.h>
UniValue RPCConvertValues(const std::string& strMethod, const std::vector<std::string>& strParams);
/** Non-RFC4627 JSON parser, accepts internal values (such as numbers, true, false, null)
diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp
index 8dd0ff2f7e..c49c3e5194 100644
--- a/src/rpcmining.cpp
+++ b/src/rpcmining.cpp
@@ -25,7 +25,7 @@
#include <boost/assign/list_of.hpp>
#include <boost/shared_ptr.hpp>
-#include "univalue/univalue.h"
+#include <univalue.h>
using namespace std;
diff --git a/src/rpcmisc.cpp b/src/rpcmisc.cpp
index e2b6d5826c..0f0457c5cf 100644
--- a/src/rpcmisc.cpp
+++ b/src/rpcmisc.cpp
@@ -22,7 +22,7 @@
#include <boost/assign/list_of.hpp>
-#include "univalue/univalue.h"
+#include <univalue.h>
using namespace std;
diff --git a/src/rpcnet.cpp b/src/rpcnet.cpp
index 5d490c70ca..7746be25f7 100644
--- a/src/rpcnet.cpp
+++ b/src/rpcnet.cpp
@@ -19,7 +19,7 @@
#include <boost/foreach.hpp>
-#include "univalue/univalue.h"
+#include <univalue.h>
using namespace std;
diff --git a/src/rpcprotocol.h b/src/rpcprotocol.h
index 5381e4bcfd..9cf1ab6d99 100644
--- a/src/rpcprotocol.h
+++ b/src/rpcprotocol.h
@@ -12,7 +12,7 @@
#include <string>
#include <boost/filesystem.hpp>
-#include "univalue/univalue.h"
+#include <univalue.h>
//! HTTP status codes
enum HTTPStatusCode
diff --git a/src/rpcrawtransaction.cpp b/src/rpcrawtransaction.cpp
index fa3150cd7f..4dec53396d 100644
--- a/src/rpcrawtransaction.cpp
+++ b/src/rpcrawtransaction.cpp
@@ -31,7 +31,7 @@
#include <boost/assign/list_of.hpp>
-#include "univalue/univalue.h"
+#include <univalue.h>
using namespace std;
diff --git a/src/rpcserver.cpp b/src/rpcserver.cpp
index dbee61efc8..fa60f8c833 100644
--- a/src/rpcserver.cpp
+++ b/src/rpcserver.cpp
@@ -13,7 +13,7 @@
#include "util.h"
#include "utilstrencodings.h"
-#include "univalue/univalue.h"
+#include <univalue.h>
#include <boost/bind.hpp>
#include <boost/filesystem.hpp>
diff --git a/src/rpcserver.h b/src/rpcserver.h
index 83cc37918b..dde8dfdcc3 100644
--- a/src/rpcserver.h
+++ b/src/rpcserver.h
@@ -17,7 +17,7 @@
#include <boost/function.hpp>
-#include "univalue/univalue.h"
+#include <univalue.h>
class CRPCCommand;
diff --git a/src/test/base58_tests.cpp b/src/test/base58_tests.cpp
index 9e74f5f427..9845df697f 100644
--- a/src/test/base58_tests.cpp
+++ b/src/test/base58_tests.cpp
@@ -18,7 +18,7 @@
#include <boost/foreach.hpp>
#include <boost/test/unit_test.hpp>
-#include "univalue/univalue.h"
+#include <univalue.h>
extern UniValue read_json(const std::string& jsondata);
diff --git a/src/test/rpc_tests.cpp b/src/test/rpc_tests.cpp
index 1bd59497ff..2a486f08e4 100644
--- a/src/test/rpc_tests.cpp
+++ b/src/test/rpc_tests.cpp
@@ -13,7 +13,7 @@
#include <boost/algorithm/string.hpp>
#include <boost/test/unit_test.hpp>
-#include "univalue/univalue.h"
+#include <univalue.h>
using namespace std;
diff --git a/src/test/rpc_wallet_tests.cpp b/src/test/rpc_wallet_tests.cpp
index 52f41be8ae..2e652f76e2 100644
--- a/src/test/rpc_wallet_tests.cpp
+++ b/src/test/rpc_wallet_tests.cpp
@@ -14,7 +14,7 @@
#include <boost/algorithm/string.hpp>
#include <boost/test/unit_test.hpp>
-#include "univalue/univalue.h"
+#include <univalue.h>
using namespace std;
diff --git a/src/test/script_tests.cpp b/src/test/script_tests.cpp
index 225da0801a..882f9eb199 100644
--- a/src/test/script_tests.cpp
+++ b/src/test/script_tests.cpp
@@ -27,7 +27,7 @@
#include <boost/foreach.hpp>
#include <boost/test/unit_test.hpp>
-#include "univalue/univalue.h"
+#include <univalue.h>
using namespace std;
diff --git a/src/test/sighash_tests.cpp b/src/test/sighash_tests.cpp
index 4b96461562..6fca64d5da 100644
--- a/src/test/sighash_tests.cpp
+++ b/src/test/sighash_tests.cpp
@@ -20,7 +20,7 @@
#include <boost/test/unit_test.hpp>
-#include "univalue/univalue.h"
+#include <univalue.h>
extern UniValue read_json(const std::string& jsondata);
diff --git a/src/test/transaction_tests.cpp b/src/test/transaction_tests.cpp
index e70ebddc2f..beec396675 100644
--- a/src/test/transaction_tests.cpp
+++ b/src/test/transaction_tests.cpp
@@ -26,7 +26,7 @@
#include <boost/test/unit_test.hpp>
#include <boost/assign/list_of.hpp>
-#include "univalue/univalue.h"
+#include <univalue.h>
using namespace std;
diff --git a/src/test/univalue_tests.cpp b/src/test/univalue_tests.cpp
index ee31c0955b..945c1acbeb 100644
--- a/src/test/univalue_tests.cpp
+++ b/src/test/univalue_tests.cpp
@@ -6,7 +6,7 @@
#include <vector>
#include <string>
#include <map>
-#include "univalue/univalue.h"
+#include <univalue.h>
#include "test/test_bitcoin.h"
#include <boost/test/unit_test.hpp>
diff --git a/src/wallet/rpcdump.cpp b/src/wallet/rpcdump.cpp
index 7e22faac37..c431fc4013 100644
--- a/src/wallet/rpcdump.cpp
+++ b/src/wallet/rpcdump.cpp
@@ -20,7 +20,7 @@
#include <boost/algorithm/string.hpp>
#include <boost/date_time/posix_time/posix_time.hpp>
-#include "univalue/univalue.h"
+#include <univalue.h>
#include <boost/foreach.hpp>
diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp
index 5d182f3d42..30b854477b 100644
--- a/src/wallet/rpcwallet.cpp
+++ b/src/wallet/rpcwallet.cpp
@@ -22,7 +22,7 @@
#include <boost/assign/list_of.hpp>
-#include "univalue/univalue.h"
+#include <univalue.h>
using namespace std;