diff --git a/INSTALL b/INSTALL index 4d931e2b..7430335f 100644 --- a/INSTALL +++ b/INSTALL @@ -1,9 +1,57 @@ -Building Bitcoin +Building twister -See doc/readme-qt.md for instructions on building Bitcoin-Qt, -the intended-for-end-users, nice-graphical-interface, reference -implementation of Bitcoin. +*************************************************************** +*** THIS IS ALPHA SOFTWARE - THE BUILD SYSTEM IS UNFINISHED *** +*************************************************************** + +This software is a proof-of-concept, a forced marriage between +bitcoin and libtorrent codebases. So don't expect an easy ride. +Building this thing is quite hacky (but hopefully not complicated). + +In order to build twister you need to configure both bitcoin's and +libtorrent's. + +1) Start with libtorrent: + +$ cd libtorrent +$ ./configure --enable-logging --enable-debug --enable-dht + +Note1: 64-bit systems may need "--with-boost-libdir=/usr/lib64" +Note2: disable logging if you want, but at this point it might + help to diagnose problems in case anything goes wrong. + +2) Then, for bitcoin/twister, you have actually two choices to +build. Both will produce (almost) the same "twisterd" executable, +so try which one works for you. + +2a) Using qmake + +$ qmake +$ make + +2b) Using standard makefile + +$ cd src +$ make -f makefile.unix + + +DEPENDENCIES +============ + +OpenSSL, Berkeley DB, Boost and miniupnpc are required. + +Please read doc/build-unix.md for a complete list and instructions. + + + +Original bitcoin build instruction +================================== + +See doc/readme-qt.md for instructions on building Bitcoin-Qt. +(note: the graphic interface is disabled) See doc/build-*.md for instructions on building bitcoind, the intended-for-services, no-graphical-interface, reference -implementation of Bitcoin. \ No newline at end of file +implementation of Bitcoin. + + diff --git a/src/makefile.unix b/src/makefile.unix index 4dfb8074..ceee08e3 100644 --- a/src/makefile.unix +++ b/src/makefile.unix @@ -40,7 +40,8 @@ LIBS += \ -l boost_thread$(BOOST_LIB_SUFFIX) \ -l db_cxx$(BDB_LIB_SUFFIX) \ -l ssl \ - -l crypto + -l crypto \ + -l rt TESTLIBS += \ -Wl,-B$(LMODE) \ @@ -112,6 +113,7 @@ xLDFLAGS=$(LDHARDENING) $(LDFLAGS) OBJS= \ leveldb/libleveldb.a \ + ../libtorrent/src/.libs/libtorrent-rasterbar.a \ obj/alert.o \ obj/version.o \ obj/checkpoints.o \ @@ -144,7 +146,9 @@ OBJS= \ obj/noui.o \ obj/leveldb.o \ obj/txdb.o \ - obj/chainparams.o + obj/chainparams.o \ + obj/twister.o \ + obj/twister_utils.o all: twisterd @@ -162,6 +166,19 @@ DEFS += $(addprefix -I,$(CURDIR)/leveldb/helpers) leveldb/libleveldb.a: @echo "Building LevelDB ..." && cd leveldb && $(MAKE) CC=$(CC) CXX=$(CXX) OPT="$(xCXXFLAGS)" libleveldb.a libmemenv.a && cd .. +# +# libtorrent hack +# +MAKEOVERRIDES = +LIBS += $(CURDIR)/../libtorrent/src/.libs/libtorrent-rasterbar.a +DEFS += $(addprefix -I,$(CURDIR)/../libtorrent/include) +DEFS += -DTORRENT_DEBUG +DEFS += -DBOOST_ASIO_SEPARATE_COMPILATION +#DEFS += -DBOOST_ASIO_DYN_LINK +../libtorrent/src/.libs/libtorrent-rasterbar.a: + @echo "Building libtorrent ..." && cd ../libtorrent && $(MAKE) CC=$(CC) CXX=$(CXX) OPT="$(xCXXFLAGS)" && cd ../src + + # auto-generated dependencies: -include obj/*.P -include obj-test/*.P diff --git a/src/twister_utils.h b/src/twister_utils.h index 12f04fb8..e25c0c23 100644 --- a/src/twister_utils.h +++ b/src/twister_utils.h @@ -1,7 +1,7 @@ #ifndef TWISTER_UTILS_H #define TWISTER_UTILS_H -#include "json_spirit.h" +#include "json/json_spirit.h" #include "libtorrent/entry.hpp" #include