Makefile.am 13.2 KB
Newer Older
Luke Dashjr's avatar
Luke Dashjr committed
1
2
3
4
# Copyright (c) 2013-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.

5
DIST_SUBDIRS = secp256k1 univalue
6

7
AM_LDFLAGS = $(PTHREAD_CFLAGS) $(LIBTOOL_LDFLAGS) $(HARDENED_LDFLAGS)
8
AM_CXXFLAGS = $(HARDENED_CXXFLAGS) $(ERROR_CXXFLAGS)
9
AM_CPPFLAGS = $(HARDENED_CPPFLAGS)
10
EXTRA_LIBRARIES =
11

12
13
14
15
16
17
18
19
20
if EMBEDDED_UNIVALUE
LIBUNIVALUE = univalue/libunivalue.la

$(LIBUNIVALUE): $(wildcard univalue/lib/*) $(wildcard univalue/include/*)
	$(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C $(@D) $(@F)
else
LIBUNIVALUE = $(UNIVALUE_LIBS)
endif

21
BITCOIN_CONFIG_INCLUDES=-I$(builddir)/config
22
BITCOIN_INCLUDES=-I$(builddir) -I$(builddir)/obj $(BDB_CPPFLAGS) $(BOOST_CPPFLAGS) $(LEVELDB_CPPFLAGS) $(CRYPTO_CFLAGS) $(SSL_CFLAGS)
Cory Fields's avatar
Cory Fields committed
23

24
BITCOIN_INCLUDES += -I$(srcdir)/secp256k1/include
25
BITCOIN_INCLUDES += $(UNIVALUE_CFLAGS)
26

27
28
LIBBITCOIN_SERVER=libbitcoin_server.a
LIBBITCOIN_COMMON=libbitcoin_common.a
29
LIBBITCOIN_CONSENSUS=libbitcoin_consensus.a
30
31
32
33
LIBBITCOIN_CLI=libbitcoin_cli.a
LIBBITCOIN_UTIL=libbitcoin_util.a
LIBBITCOIN_CRYPTO=crypto/libbitcoin_crypto.a
LIBBITCOINQT=qt/libbitcoinqt.a
34
35
LIBSECP256K1=secp256k1/libsecp256k1.la

36
37
38
39
40
41
42
43
44
45
if ENABLE_ZMQ
LIBBITCOIN_ZMQ=libbitcoin_zmq.a
endif
if BUILD_BITCOIN_LIBS
LIBBITCOINCONSENSUS=libbitcoinconsensus.la
endif
if ENABLE_WALLET
LIBBITCOIN_WALLET=libbitcoin_wallet.a
endif

46
$(LIBSECP256K1): $(wildcard secp256k1/src/*) $(wildcard secp256k1/include/*)
47
	$(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C $(@D) $(@F)
48

49
50
# 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:
51
EXTRA_LIBRARIES += \
52
53
54
55
56
57
58
59
  $(LIBBITCOIN_CRYPTO) \
  $(LIBBITCOIN_UTIL) \
  $(LIBBITCOIN_COMMON) \
  $(LIBBITCOIN_CONSENSUS) \
  $(LIBBITCOIN_SERVER) \
  $(LIBBITCOIN_CLI) \
  $(LIBBITCOIN_WALLET) \
  $(LIBBITCOIN_ZMQ)
60

61
lib_LTLIBRARIES = $(LIBBITCOINCONSENSUS)
62

63
bin_PROGRAMS =
Patrick Strateman's avatar
Patrick Strateman committed
64
noinst_PROGRAMS =
65
TESTS =
66
BENCHMARKS =
67
68
69
70
71

if BUILD_BITCOIND
  bin_PROGRAMS += bitcoind
endif

72
73
if BUILD_BITCOIN_UTILS
  bin_PROGRAMS += bitcoin-cli bitcoin-tx
74
endif
75

76
.PHONY: FORCE check-symbols check-security
77
# bitcoin core #
78
BITCOIN_CORE_H = \
79
  addrdb.h \
80
  addrman.h \
Pieter Wuille's avatar
Pieter Wuille committed
81
  base58.h \
82
  bloom.h \
83
  blockencodings.h \
84
  chain.h \
85
  chainparams.h \
Jorge Timón's avatar
Jorge Timón committed
86
  chainparamsbase.h \
87
  chainparamsseeds.h \
88
89
90
91
92
  checkpoints.h \
  checkqueue.h \
  clientversion.h \
  coins.h \
  compat.h \
Jorge Timón's avatar
Jorge Timón committed
93
94
95
  compat/byteswap.h \
  compat/endian.h \
  compat/sanity.h \
96
  compressor.h \
97
  consensus/consensus.h \
98
  core_io.h \
99
  core_memusage.h \
100
  cuckoocache.h \
101
102
  httprpc.h \
  httpserver.h \
103
  indirectmap.h \
104
105
106
  init.h \
  key.h \
  keystore.h \
107
  dbwrapper.h \
108
  limitedmap.h \
Pieter Wuille's avatar
Pieter Wuille committed
109
  memusage.h \
110
  merkleblock.h \
111
112
  miner.h \
  net.h \
113
  net_processing.h \
114
  netaddress.h \
Cory Fields's avatar
Cory Fields committed
115
  netbase.h \
116
  netmessagemaker.h \
117
  noui.h \
118
  policy/fees.h \
119
  policy/policy.h \
120
  policy/rbf.h \
121
  pow.h \
122
  protocol.h \
123
  random.h \
124
  reverselock.h \
Daniel Cousens's avatar
Daniel Cousens committed
125
126
127
  rpc/client.h \
  rpc/protocol.h \
  rpc/server.h \
128
  rpc/register.h \
129
  scheduler.h \
Pieter Wuille's avatar
Pieter Wuille committed
130
  script/sigcache.h \
jtimon's avatar
jtimon committed
131
  script/sign.h \
jtimon's avatar
jtimon committed
132
  script/standard.h \
133
  script/ismine.h \
134
  streams.h \
135
136
  support/allocators/secure.h \
  support/allocators/zeroafterfree.h \
137
  support/cleanse.h \
138
  support/events.h \
139
  support/lockedpool.h \
140
141
  sync.h \
  threadsafety.h \
142
  threadinterrupt.h \
143
  timedata.h \
144
  torcontrol.h \
145
146
147
  txdb.h \
  txmempool.h \
  ui_interface.h \
148
  undo.h \
149
  util.h \
Wladimir J. van der Laan's avatar
Wladimir J. van der Laan committed
150
151
  utilmoneystr.h \
  utiltime.h \
152
  validation.h \
153
  validationinterface.h \
Pieter Wuille's avatar
Pieter Wuille committed
154
  versionbits.h \
155
  wallet/coincontrol.h \
Cory Fields's avatar
Cory Fields committed
156
  wallet/crypter.h \
Jorge Timón's avatar
Jorge Timón committed
157
  wallet/db.h \
158
  wallet/rpcwallet.h \
159
  wallet/wallet.h \
160
  wallet/walletdb.h \
161
  warnings.h \
162
163
164
165
166
  zmq/zmqabstractnotifier.h \
  zmq/zmqconfig.h\
  zmq/zmqnotificationinterface.h \
  zmq/zmqpublishnotifier.h

167

168
obj/build.h: FORCE
169
	@$(MKDIR_P) $(builddir)/obj
170
171
	@$(top_srcdir)/share/genbuild.sh $(abs_top_builddir)/src/obj/build.h \
	  $(abs_top_srcdir)
172
libbitcoin_util_a-clientversion.$(OBJEXT): obj/build.h
173

174
# server: shared between bitcoind and bitcoin-qt
175
176
libbitcoin_server_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(MINIUPNPC_CPPFLAGS) $(EVENT_CFLAGS) $(EVENT_PTHREADS_CFLAGS)
libbitcoin_server_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
177
178
libbitcoin_server_a_SOURCES = \
  addrman.cpp \
179
  addrdb.cpp \
180
  bloom.cpp \
181
  blockencodings.cpp \
182
  chain.cpp \
183
  checkpoints.cpp \
184
185
  httprpc.cpp \
  httpserver.cpp \
186
  init.cpp \
187
  dbwrapper.cpp \
188
  merkleblock.cpp \
189
  miner.cpp \
190
  net.cpp \
191
  net_processing.cpp \
192
  noui.cpp \
193
  policy/fees.cpp \
194
  policy/policy.cpp \
195
  pow.cpp \
196
  rest.cpp \
Daniel Cousens's avatar
Daniel Cousens committed
197
198
199
200
201
202
  rpc/blockchain.cpp \
  rpc/mining.cpp \
  rpc/misc.cpp \
  rpc/net.cpp \
  rpc/rawtransaction.cpp \
  rpc/server.cpp \
Pieter Wuille's avatar
Pieter Wuille committed
203
  script/sigcache.cpp \
204
  script/ismine.cpp \
205
  timedata.cpp \
206
  torcontrol.cpp \
207
208
  txdb.cpp \
  txmempool.cpp \
209
  ui_interface.cpp \
210
  validation.cpp \
211
  validationinterface.cpp \
Pieter Wuille's avatar
Pieter Wuille committed
212
  versionbits.cpp \
213
214
  $(BITCOIN_CORE_H)

215
if ENABLE_ZMQ
Cory Fields's avatar
Cory Fields committed
216
libbitcoin_zmq_a_CPPFLAGS = $(BITCOIN_INCLUDES) $(ZMQ_CFLAGS)
217
libbitcoin_zmq_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
218
219
220
221
222
223
224
libbitcoin_zmq_a_SOURCES = \
  zmq/zmqabstractnotifier.cpp \
  zmq/zmqnotificationinterface.cpp \
  zmq/zmqpublishnotifier.cpp
endif


225
226
# wallet: shared between bitcoind and bitcoin-qt, but only linked
# when wallet enabled
227
228
libbitcoin_wallet_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES)
libbitcoin_wallet_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
229
libbitcoin_wallet_a_SOURCES = \
Cory Fields's avatar
Cory Fields committed
230
  wallet/crypter.cpp \
231
232
233
234
235
  wallet/db.cpp \
  wallet/rpcdump.cpp \
  wallet/rpcwallet.cpp \
  wallet/wallet.cpp \
  wallet/walletdb.cpp \
236
  policy/rbf.cpp \
237
238
  $(BITCOIN_CORE_H)

239
# crypto primitives library
240
241
crypto_libbitcoin_crypto_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_CONFIG_INCLUDES)
crypto_libbitcoin_crypto_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
242
crypto_libbitcoin_crypto_a_SOURCES = \
243
244
  crypto/aes.cpp \
  crypto/aes.h \
245
  crypto/common.h \
Jorge Timón's avatar
Jorge Timón committed
246
  crypto/hmac_sha256.cpp \
Pieter Wuille's avatar
Pieter Wuille committed
247
  crypto/hmac_sha256.h \
Jorge Timón's avatar
Jorge Timón committed
248
  crypto/hmac_sha512.cpp \
Pieter Wuille's avatar
Pieter Wuille committed
249
  crypto/hmac_sha512.h \
Jorge Timón's avatar
Jorge Timón committed
250
251
252
  crypto/ripemd160.cpp \
  crypto/ripemd160.h \
  crypto/sha1.cpp \
253
  crypto/sha1.h \
Jorge Timón's avatar
Jorge Timón committed
254
255
256
257
  crypto/sha256.cpp \
  crypto/sha256.h \
  crypto/sha512.cpp \
  crypto/sha512.h
258

259
260
261
262
263
# consensus: shared between all executables that validate any consensus rules.
libbitcoin_consensus_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES)
libbitcoin_consensus_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
libbitcoin_consensus_a_SOURCES = \
  amount.h \
264
265
266
267
268
269
  arith_uint256.cpp \
  arith_uint256.h \
  consensus/merkle.cpp \
  consensus/merkle.h \
  consensus/params.h \
  consensus/validation.h \
270
271
272
  hash.cpp \
  hash.h \
  prevector.h \
273
274
  primitives/block.cpp \
  primitives/block.h \
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
  primitives/transaction.cpp \
  primitives/transaction.h \
  pubkey.cpp \
  pubkey.h \
  script/bitcoinconsensus.cpp \
  script/interpreter.cpp \
  script/interpreter.h \
  script/script.cpp \
  script/script.h \
  script/script_error.cpp \
  script/script_error.h \
  serialize.h \
  tinyformat.h \
  uint256.cpp \
  uint256.h \
  utilstrencodings.cpp \
  utilstrencodings.h \
  version.h

294
# common: shared between bitcoind, and bitcoin-qt and non-server tools
295
296
libbitcoin_common_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES)
libbitcoin_common_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
297
libbitcoin_common_a_SOURCES = \
298
  amount.cpp \
299
  base58.cpp \
300
  chainparams.cpp \
301
  coins.cpp \
302
  compressor.cpp \
303
304
  core_read.cpp \
  core_write.cpp \
305
  key.cpp \
306
  keystore.cpp \
307
  netaddress.cpp \
308
309
  netbase.cpp \
  protocol.cpp \
310
  scheduler.cpp \
jtimon's avatar
jtimon committed
311
  script/sign.cpp \
jtimon's avatar
jtimon committed
312
  script/standard.cpp \
313
  warnings.cpp \
314
315
316
317
318
  $(BITCOIN_CORE_H)

# util: shared between all executables.
# This library *must* be included to make sure that the glibc
# backward-compatibility objects and their sanity checks are linked.
319
320
libbitcoin_util_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES)
libbitcoin_util_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
321
libbitcoin_util_a_SOURCES = \
322
  support/lockedpool.cpp \
323
  chainparamsbase.cpp \
324
  clientversion.cpp \
325
326
327
  compat/glibc_sanity.cpp \
  compat/glibcxx_sanity.cpp \
  compat/strnlen.cpp \
328
  random.cpp \
Daniel Cousens's avatar
Daniel Cousens committed
329
  rpc/protocol.cpp \
330
  support/cleanse.cpp \
331
  sync.cpp \
332
  threadinterrupt.cpp \
333
  util.cpp \
Wladimir J. van der Laan's avatar
Wladimir J. van der Laan committed
334
  utilmoneystr.cpp \
335
  utilstrencodings.cpp \
Wladimir J. van der Laan's avatar
Wladimir J. van der Laan committed
336
  utiltime.cpp \
337
338
  $(BITCOIN_CORE_H)

339
if GLIBC_BACK_COMPAT
340
libbitcoin_util_a_SOURCES += compat/glibc_compat.cpp
341
342
endif

343
# cli: shared between bitcoin-cli and bitcoin-qt
344
345
libbitcoin_cli_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES)
libbitcoin_cli_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
346
libbitcoin_cli_a_SOURCES = \
Daniel Cousens's avatar
Daniel Cousens committed
347
  rpc/client.cpp \
348
349
  $(BITCOIN_CORE_H)

350
nodist_libbitcoin_util_a_SOURCES = $(srcdir)/obj/build.h
351
352
353
#

# bitcoind binary #
354
bitcoind_SOURCES = bitcoind.cpp
355
356
bitcoind_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES)
bitcoind_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
357
358
359
360
361
362
bitcoind_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)

if TARGET_WINDOWS
bitcoind_SOURCES += bitcoind-res.rc
endif

363
bitcoind_LDADD = \
364
365
  $(LIBBITCOIN_SERVER) \
  $(LIBBITCOIN_COMMON) \
366
  $(LIBUNIVALUE) \
367
  $(LIBBITCOIN_UTIL) \
368
369
  $(LIBBITCOIN_WALLET) \
  $(LIBBITCOIN_ZMQ) \
370
  $(LIBBITCOIN_CONSENSUS) \
371
  $(LIBBITCOIN_CRYPTO) \
372
  $(LIBLEVELDB) \
373
374
  $(LIBMEMENV) \
  $(LIBSECP256K1)
375

376
bitcoind_LDADD += $(BOOST_LIBS) $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) $(MINIUPNPC_LIBS) $(EVENT_PTHREADS_LIBS) $(EVENT_LIBS) $(ZMQ_LIBS)
377

378
379
# bitcoin-cli binary #
bitcoin_cli_SOURCES = bitcoin-cli.cpp
380
381
bitcoin_cli_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(EVENT_CFLAGS)
bitcoin_cli_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
382
383
bitcoin_cli_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)

384
if TARGET_WINDOWS
385
bitcoin_cli_SOURCES += bitcoin-cli-res.rc
386
387
endif

388
bitcoin_cli_LDADD = \
389
  $(LIBBITCOIN_CLI) \
390
  $(LIBUNIVALUE) \
391
392
  $(LIBBITCOIN_UTIL) \
  $(LIBBITCOIN_CRYPTO)
393

394
bitcoin_cli_LDADD += $(BOOST_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) $(EVENT_LIBS)
395
396
#

397
# bitcoin-tx binary #
398
bitcoin_tx_SOURCES = bitcoin-tx.cpp
399
400
bitcoin_tx_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES)
bitcoin_tx_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
401
402
bitcoin_tx_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)

403
404
405
406
if TARGET_WINDOWS
bitcoin_tx_SOURCES += bitcoin-tx-res.rc
endif

407
bitcoin_tx_LDADD = \
408
  $(LIBUNIVALUE) \
409
410
  $(LIBBITCOIN_COMMON) \
  $(LIBBITCOIN_UTIL) \
411
  $(LIBBITCOIN_CONSENSUS) \
412
  $(LIBBITCOIN_CRYPTO) \
413
  $(LIBSECP256K1)
414

415
bitcoin_tx_LDADD += $(BOOST_LIBS) $(CRYPTO_LIBS)
416
#
417

418
# bitcoinconsensus library #
419
420
if BUILD_BITCOIN_LIBS
include_HEADERS = script/bitcoinconsensus.h
421
libbitcoinconsensus_la_SOURCES = $(crypto_libbitcoin_crypto_a_SOURCES) $(libbitcoin_consensus_a_SOURCES)
422
423
424
425
426

if GLIBC_BACK_COMPAT
  libbitcoinconsensus_la_SOURCES += compat/glibc_compat.cpp
endif

427
libbitcoinconsensus_la_LDFLAGS = $(AM_LDFLAGS) -no-undefined $(RELDFLAGS)
428
429
libbitcoinconsensus_la_LIBADD = $(LIBSECP256K1)
libbitcoinconsensus_la_CPPFLAGS = $(AM_CPPFLAGS) -I$(builddir)/obj -I$(srcdir)/secp256k1/include -DBUILD_BITCOIN_INTERNAL
430
libbitcoinconsensus_la_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
431

432
endif
433
#
434

435
436
437
438
439
440
CTAES_DIST =  crypto/ctaes/bench.c
CTAES_DIST += crypto/ctaes/ctaes.c
CTAES_DIST += crypto/ctaes/ctaes.h
CTAES_DIST += crypto/ctaes/README.md
CTAES_DIST += crypto/ctaes/test.c

Cory Fields's avatar
Cory Fields committed
441
442
CLEANFILES = $(EXTRA_LIBRARIES)

443
444
445
446
447
448
449
450
451
452
453
454
CLEANFILES += *.gcda *.gcno
CLEANFILES += compat/*.gcda compat/*.gcno
CLEANFILES += consensus/*.gcda consensus/*.gcno
CLEANFILES += crypto/*.gcda crypto/*.gcno
CLEANFILES += policy/*.gcda policy/*.gcno
CLEANFILES += primitives/*.gcda primitives/*.gcno
CLEANFILES += script/*.gcda script/*.gcno
CLEANFILES += support/*.gcda support/*.gcno
CLEANFILES += univalue/*.gcda univalue/*.gcno
CLEANFILES += wallet/*.gcda wallet/*.gcno
CLEANFILES += wallet/test/*.gcda wallet/test/*.gcno
CLEANFILES += zmq/*.gcda zmq/*.gcno
455
456
457

DISTCLEANFILES = obj/build.h

Cory Fields's avatar
Cory Fields committed
458
EXTRA_DIST = $(CTAES_DIST)
459

460
461
462
463
464
465
466
467

config/bitcoin-config.h: config/stamp-h1
	@$(MAKE) -C $(top_builddir) $(subdir)/$(@)
config/stamp-h1: $(top_srcdir)/$(subdir)/config/bitcoin-config.h.in $(top_builddir)/config.status
	$(AM_V_at)$(MAKE) -C $(top_builddir) $(subdir)/$(@)
$(top_srcdir)/$(subdir)/config/bitcoin-config.h.in:  $(am__configure_deps)
	$(AM_V_at)$(MAKE) -C $(top_srcdir) $(subdir)/config/bitcoin-config.h.in

468
clean-local:
469
	-$(MAKE) -C secp256k1 clean
470
	-$(MAKE) -C univalue clean
471
	-rm -f leveldb/*/*.gcda leveldb/*/*.gcno leveldb/helpers/memenv/*.gcda leveldb/helpers/memenv/*.gcno
472
	-rm -f config.h
Cory Fields's avatar
Cory Fields committed
473
	-rm -rf test/__pycache__
474

475
.rc.o:
476
	@test -f $(WINDRES)
477
478
	## FIXME: How to get the appropriate modulename_CPPFLAGS in here?
	$(AM_V_GEN) $(WINDRES) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(CPPFLAGS) -DWINDRES_PREPROC -i $< -o $@
479
480

.mm.o:
481
	$(AM_V_CXX) $(OBJCXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
482
	  $(CPPFLAGS) $(AM_CXXFLAGS) $(QT_INCLUDES) $(AM_CXXFLAGS) $(PIE_FLAGS) $(CXXFLAGS) -c -o $@ $<
483

484
485
486
487
488
489
490
491
492
493
494
495
check-symbols: $(bin_PROGRAMS)
if GLIBC_BACK_COMPAT
	@echo "Checking glibc back compat..."
	$(AM_V_at) READELF=$(READELF) CPPFILT=$(CPPFILT) $(top_srcdir)/contrib/devtools/symbol-check.py < $(bin_PROGRAMS)
endif

check-security: $(bin_PROGRAMS)
if HARDEN
	@echo "Checking binary security..."
	$(AM_V_at) READELF=$(READELF) OBJDUMP=$(OBJDUMP) $(top_srcdir)/contrib/devtools/security-check.py < $(bin_PROGRAMS)
endif

496
%.pb.cc %.pb.h: %.proto
497
	@test -f $(PROTOC)
498
	$(AM_V_GEN) $(PROTOC) --cpp_out=$(@D) --proto_path=$(<D) $<
499

500
501
502
503
if EMBEDDED_LEVELDB
include Makefile.leveldb.include
endif

504
505
506
507
if ENABLE_TESTS
include Makefile.test.include
endif

508
509
510
511
if ENABLE_BENCH
include Makefile.bench.include
endif

512
513
514
515
516
517
518
if ENABLE_QT
include Makefile.qt.include
endif

if ENABLE_QT_TESTS
include Makefile.qttest.include
endif