Add instructions for multi-processor gitian builds
[bitcoinplatinum.git] / src / Makefile.bench.include
blob2b1f70b25bc4588d26470216dc9c07d0b4b5c676
1 # Copyright (c) 2015-2016 The Bitcoin Core developers
2 # Distributed under the MIT software license, see the accompanying
3 # file COPYING or http://www.opensource.org/licenses/mit-license.php.
5 bin_PROGRAMS += bench/bench_bitcoin
6 BENCH_SRCDIR = bench
7 BENCH_BINARY = bench/bench_bitcoin$(EXEEXT)
9 RAW_TEST_FILES = \
10   bench/data/block413567.raw
11 GENERATED_TEST_FILES = $(RAW_TEST_FILES:.raw=.raw.h)
13 bench_bench_bitcoin_SOURCES = \
14   bench/bench_bitcoin.cpp \
15   bench/bench.cpp \
16   bench/bench.h \
17   bench/checkblock.cpp \
18   bench/checkqueue.cpp \
19   bench/Examples.cpp \
20   bench/rollingbloom.cpp \
21   bench/crypto_hash.cpp \
22   bench/ccoins_caching.cpp \
23   bench/mempool_eviction.cpp \
24   bench/verify_script.cpp \
25   bench/base58.cpp \
26   bench/lockedpool.cpp \
27   bench/perf.cpp \
28   bench/perf.h \
29   bench/prevector_destructor.cpp
31 nodist_bench_bench_bitcoin_SOURCES = $(GENERATED_TEST_FILES)
33 bench_bench_bitcoin_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(EVENT_CLFAGS) $(EVENT_PTHREADS_CFLAGS) -I$(builddir)/bench/
34 bench_bench_bitcoin_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
35 bench_bench_bitcoin_LDADD = \
36   $(LIBBITCOIN_SERVER) \
37   $(LIBBITCOIN_COMMON) \
38   $(LIBBITCOIN_UTIL) \
39   $(LIBBITCOIN_CONSENSUS) \
40   $(LIBBITCOIN_CRYPTO) \
41   $(LIBLEVELDB) \
42   $(LIBLEVELDB_SSE42) \
43   $(LIBMEMENV) \
44   $(LIBSECP256K1) \
45   $(LIBUNIVALUE)
47 if ENABLE_ZMQ
48 bench_bench_bitcoin_LDADD += $(LIBBITCOIN_ZMQ) $(ZMQ_LIBS)
49 endif
51 if ENABLE_WALLET
52 bench_bench_bitcoin_SOURCES += bench/coin_selection.cpp
53 bench_bench_bitcoin_LDADD += $(LIBBITCOIN_WALLET) $(LIBBITCOIN_CRYPTO)
54 endif
56 bench_bench_bitcoin_LDADD += $(BOOST_LIBS) $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) $(MINIUPNPC_LIBS) $(EVENT_PTHREADS_LIBS) $(EVENT_LIBS)
57 bench_bench_bitcoin_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)
59 CLEAN_BITCOIN_BENCH = bench/*.gcda bench/*.gcno $(GENERATED_TEST_FILES)
61 CLEANFILES += $(CLEAN_BITCOIN_BENCH)
63 bench/checkblock.cpp: bench/data/block413567.raw.h
65 bitcoin_bench: $(BENCH_BINARY)
67 bench: $(BENCH_BINARY) FORCE
68         $(BENCH_BINARY)
70 bitcoin_bench_clean : FORCE
71         rm -f $(CLEAN_BITCOIN_BENCH) $(bench_bench_bitcoin_OBJECTS) $(BENCH_BINARY)
73 %.raw.h: %.raw
74         @$(MKDIR_P) $(@D)
75         @{ \
76          echo "static unsigned const char $(*F)[] = {" && \
77          $(HEXDUMP) -v -e '8/1 "0x%02x, "' -e '"\n"' $< | $(SED) -e 's/0x  ,//g' && \
78          echo "};"; \
79         } > "$@.new" && mv -f "$@.new" "$@"
80         @echo "Generated $@"