forked from bitcoin-core/btcdeb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.am
176 lines (150 loc) · 4.05 KB
/
Makefile.am
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
# Copyright (c) 2013-2018 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
DIST_SUBDIRS = secp256k1
AM_LDFLAGS = $(LIBTOOL_LDFLAGS)
EXTRA_LIBRARIES =
BITCOIN_INCLUDES=-I$(builddir)
BITCOIN_INCLUDES += -I$(srcdir)/secp256k1/include
LIBBITCOIN=libbitcoin.a
LIBKERL=libkerl.a
LIBSECP256K1=secp256k1/libsecp256k1.la
LIBBITCOIN_DEB=libbitcoin_deb.a # bitcoin core functionality (debugger/*)
$(LIBSECP256K1): $(wildcard secp256k1/src/*) $(wildcard secp256k1/include/*)
$(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C $(@D) $(@F)
EXTRA_LIBRARIES += \
$(LIBBITCOIN_DEB) \
$(LIBBITCOIN) \
$(LIBKERL)
# lib_LTLIBRARIES = $(LIBBITCOIN)
bin_PROGRAMS = btcdeb btcc test-btcdeb
noinst_PROGRAMS =
# debugger #
LIBBITCOIN_DEB_H = \
debugger/interpreter.h \
debugger/script.h
.PHONY: FORCE check-symbols check-security
# bitcoin core #
BITCOIN_CORE_H = \
$(LIBBITCOIN_DEB_H) \
amount.h \
base58.h \
bech32.h \
compat.h \
compat/byteswap.h \
compat/endian.h \
crypto/common.h \
crypto/hmac_sha512.h \
crypto/ripemd160.h \
crypto/sha1.h \
crypto/sha256.h \
crypto/sha512.h \
hash.h \
script/interpreter.h \
merkle.h \
policy/policy.h \
prevector.h \
primitives/transaction.h \
pubkey.h \
script/script.h \
script/script_error.h \
serialize.h \
span.h \
streams.h \
support/allocators/secure.h \
support/allocators/zeroafterfree.h \
support/cleanse.h \
support/lockedpool.h \
tinyformat.h \
uint256.h \
utilstrencodings.h \
value.h
# debugger #
libbitcoin_deb_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(EVENT_CFLAGS) $(EVENT_PTHREADS_CFLAGS)
libbitcoin_deb_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
libbitcoin_deb_a_SOURCES = \
debugger/hash.cpp \
debugger/interpreter.cpp \
debugger/script.cpp \
$(BITCOIN_CORE_H)
# bitcoin: shared between all the tools
libbitcoin_a_LIBADD = $(LIBSECP256K1)
libbitcoin_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES)
libbitcoin_a_CXXFLAGS = $(AM_CXXFLAGS)
libbitcoin_a_SOURCES = \
base58.cpp \
bech32.cpp \
crypto/hmac_sha512.cpp \
crypto/ripemd160.cpp \
crypto/sha1.cpp \
crypto/sha256.cpp \
crypto/sha512.cpp \
hash.cpp \
merkle.cpp \
primitives/transaction.cpp \
pubkey.cpp \
script/interpreter.cpp \
script/script.cpp \
script/script_error.cpp \
support/cleanse.cpp \
support/lockedpool.cpp \
uint256.cpp \
utilstrencodings.cpp \
value.cpp \
$(BITCOIN_CORE_H)
# kerl library #
libkerl_a_CPPFLAGS = $(AM_CPPFLAGS) -Ikerl
libkerl_a_CFLAGS = -std=gnu99
libkerl_a_SOURCES = kerl/kerl.c kerl/kerl.h
# btcdeb binary #
btcdeb_SOURCES = \
instance.h \
instance.cpp \
btcdeb.cpp \
cliargs.h
btcdeb_CPPFLAGS = $(AM_CPPFLAGS)
btcdeb_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
btcdeb_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_AP_LDFLAGS)
btcdeb_LDADD = \
$(LIBBITCOIN_DEB) \
$(LIBBITCOIN) \
$(LIBSECP256K1) \
$(LIBKERL)
# btcc binary #
btcc_SOURCES = \
btcc.cpp
btcc_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES)
btcc_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
btcc_LDADD = \
$(LIBBITCOIN_DEB) \
$(LIBBITCOIN)
# test-btcdeb binary #
test_btcdeb_SOURCES = \
instance.h \
instance.cpp \
test/catch.hpp \
test/signing.cpp \
test/test-btcdeb.cpp \
test/value.cpp
test_btcdeb_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES)
test_btcdeb_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
test_btcdeb_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_AP_LDFLAGS)
test_btcdeb_LDADD = \
$(LIBBITCOIN_DEB) \
$(LIBBITCOIN) \
$(LIBKERL) \
$(LIBSECP256K1)
clean-local:
-rm -f config.h $(LIBBITCOIN) $(LIBKERL) $(LIBSECP256K1)
.rc.o:
@test -f $(WINDRES)
## FIXME: How to get the appropriate modulename_CPPFLAGS in here?
$(AM_V_GEN) $(WINDRES) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(CPPFLAGS) -DWINDRES_PREPROC -i $< -o $@
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
%.pb.cc %.pb.h: %.proto
@test -f $(PROTOC)
$(AM_V_GEN) $(PROTOC) --cpp_out=$(@D) --proto_path=$(<D) $<