makefiles 1 ######################################
makefiles 2 #Turds!
makefiles 3 OPENSSL=openssl-1.0.1g
makefiles 4 BDB=db-4.8.30
makefiles 5 BOOST=boost_1_52_0
makefiles 6 ######################################
makefiles 7
makefiles 8 export DIST=$(shell readlink -f ../deps)
makefiles 9 export OURLIBS=$(shell readlink -f ./ourlibs)
makefiles 10 export CC=$(shell readlink -f toolchain/usr/bin/x86_64-therealbitcoin-linux-musl-gcc)
makefiles 11 export CXX=$(shell readlink -f toolchain/usr/bin/x86_64-therealbitcoin-linux-musl-g++)
makefiles 12 export LD=$(shell readlink -f toolchain/usr/bin/x86_64-therealbitcoin-linux-musl-ld)
makefiles 13 export CFLAGS=-I$(shell readlink -f toolchain/usr/include)
makefiles 14 export LDFLAGS=-L$(shell readlink -f toolchain/usr/lib)
makefiles 15 export PATH := $(PATH):$(shell readlink -f toolchain/usr/bin)
makefiles 16 export BOOST_INCLUDE_PATH=$(OURLIBS)/include
makefiles 17 export BDB_INCLUDE_PATH=$(OURLIBS)/include
makefiles 18 export OPENSSL_INCLUDE_PATH=$(OURLIBS)/include
makefiles 19 export BOOST_LIB_PATH=$(OURLIBS)/lib
makefiles 20 export BDB_LIB_PATH=$(OURLIBS)/lib
makefiles 21 export OPENSSL_LIB_PATH=$(OURLIBS)/lib
makefiles 22
makefiles 23
makefiles 24 all: $(BOOST) $(BDB) $(OPENSSL) bitcoind
makefiles 25
makefiles 26 clean:
makefiles 27 rm -rf $(BOOST) $(BDB) $(OPENSSL)
makefiles 28
makefiles 29 $(BOOST):
makefiles 30 tar xvjf $(DIST)/$(BOOST).tar.bz2
makefiles 31 cd $(BOOST) && \
makefiles 32 echo "using gcc : : $(CXX) ;" >> tools/build/v2/user-config.jam && \
makefiles 33 ./bootstrap.sh && \
makefiles 34 (./bjam toolset=gcc link=static -sNO_BZIP2=1 -sNO_ZLIB=1 -sNO_COMPRESSION=1 || true) # FIX THIS ABOMINATION!!!
makefiles 35 cd $(BOOST) && \
makefiles 36 (./bjam toolset=gcc link=static --prefix=$(OURLIBS) install || true) # FIX THIS ABOMINATION!!!
makefiles 37
makefiles 38 $(BDB):
makefiles 39 tar xvfz $(DIST)/$(BDB).tar.gz
makefiles 40 cd $(BDB)/build_unix && \
makefiles 41 ../dist/configure --enable-cxx --prefix=$(OURLIBS) --host=x86_64-linux && \
makefiles 42 $(MAKE) && \
makefiles 43 $(MAKE) install
makefiles 44
makefiles 45 $(OPENSSL):
makefiles 46 tar xvfz $(DIST)/$(OPENSSL).tar.gz
makefiles 47 cd $(OPENSSL) && \
makefiles 48 patch -p1 < ../openssl-004-musl-termios.patch && \
makefiles 49 ./Configure --prefix=$(OURLIBS) no-dso threads linux-x86_64 && \
makefiles 50 $(MAKE) && \
makefiles 51 $(MAKE) install_sw
makefiles 52
makefiles 53 bitcoind:
makefiles 54 cd ../src && \
makefiles 55 $(MAKE) STATIC=all -f makefile.unix bitcoind
makefiles 56 strip ../src/bitcoind