forked from libbtc/libbtc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.am
229 lines (203 loc) · 5.61 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
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
ACLOCAL_AMFLAGS = -I build-aux/m4
AUTOMAKE_OPTIONS = serial-tests
.PHONY: gen
.INTERMEDIATE: $(GENBIN)
DIST_SUBDIRS = src/secp256k1
LIBSECP256K1=src/secp256k1/libsecp256k1.la
$(LIBSECP256K1): $(wildcard src/secp256k1/src/*) $(wildcard src/secp256k1/include/*)
$(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C $(@D) $(@F)
lib_LTLIBRARIES = libbtc.la
libbtcincludedir = $(includedir)/btc
libbtcinclude_HEADERS = \
include/btc/aes256_cbc.h \
include/btc/base58.h \
include/btc/bip32.h \
include/btc/block.h \
include/btc/blockchain.h \
include/btc/btc.h \
include/btc/buffer.h \
include/btc/chainparams.h \
include/btc/cstr.h \
include/btc/ctaes.h \
include/btc/ecc_key.h \
include/btc/ecc.h \
include/btc/hash.h \
include/btc/hmac.h \
include/btc/memory.h \
include/btc/portable_endian.h \
include/btc/random.h \
include/btc/ripemd160.h \
include/btc/script.h \
include/btc/segwit_addr.h \
include/btc/serialize.h \
include/btc/sha2.h \
include/btc/tool.h \
include/btc/tx.h \
include/btc/utils.h \
include/btc/vector.h
trezorcryptoincludedir = $(includedir)/trezor-crypto
trezorcryptoinclude_HEADERS = \
src/trezor-crypto/base58.h \
src/trezor-crypto/blake2_common.h \
src/trezor-crypto/blake2b.h \
src/trezor-crypto/blake256.h \
src/trezor-crypto/groestl.h \
src/trezor-crypto/groestl_internal.h \
src/trezor-crypto/hasher.h \
src/trezor-crypto/hmac.h \
src/trezor-crypto/memzero.h \
src/trezor-crypto/options.h \
src/trezor-crypto/ripemd160.h \
src/trezor-crypto/segwit_addr.h \
src/trezor-crypto/sha2.h \
src/trezor-crypto/sha3.h
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libbtc.pc
libbtc_la_SOURCES = \
src/aes256_cbc.c \
src/base58.c \
src/bip32.c \
src/block.c \
src/buffer.c \
src/chainparams.c \
src/commontools.c \
src/cstr.c \
src/ctaes.c \
src/ecc_key.c \
src/ecc_libsecp256k1.c \
src/memory.c \
src/random.c \
src/ripemd160.c \
src/script.c \
src/serialize.c \
src/tx.c \
src/utils.c \
src/vector.c
libbtc_la_SOURCES += \
src/trezor-crypto/base58.c \
src/trezor-crypto/blake2b.c \
src/trezor-crypto/blake256.c \
src/trezor-crypto/groestl.c \
src/trezor-crypto/hasher.c \
src/trezor-crypto/hmac.c \
src/trezor-crypto/memzero.c \
src/trezor-crypto/ripemd160.c \
src/trezor-crypto/segwit_addr.c \
src/trezor-crypto/sha2.c \
src/trezor-crypto/sha3.c
libbtc_la_CFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src/logdb/include
libbtc_la_LIBADD = $(LIBSECP256K1)
if USE_TESTS
noinst_PROGRAMS = tests
tests_LDADD = libbtc.la
tests_SOURCES = \
test/aes_tests.c \
test/base58check_tests.c \
test/bip32_tests.c \
test/block_tests.c \
test/buffer_tests.c \
test/cstr_tests.c \
test/ecc_tests.c \
test/eckey_tests.c \
test/hash_tests.c \
test/memory_tests.c \
test/random_tests.c \
test/serialize_tests.c \
test/sha2_tests.c \
test/utest.h \
test/unittester.c \
test/tx_tests.c \
test/utils_tests.c \
test/vector_tests.c
tests_CFLAGS = $(libbtc_la_CFLAGS)
tests_CPPFLAGS = -I$(top_srcdir)/src
tests_LDFLAGS = -static
TESTS = tests
endif
if WITH_LOGDB
libbtc_la_SOURCES += \
src/logdb/logdb_core.c \
src/logdb/logdb_memdb_llist.c \
src/logdb/logdb_memdb_rbtree.c \
src/logdb/logdb_rec.c \
src/logdb/red_black_tree.c
logdbincludedir = $(includedir)/logdb
logdbinclude_HEADERS = \
src/logdb/include/logdb/logdb_base.h \
src/logdb/include/logdb/logdb_core.h \
src/logdb/include/logdb/logdb_memdb_llist.h \
src/logdb/include/logdb/logdb_memdb_rbtree.h \
src/logdb/include/logdb/logdb_rec.h \
src/logdb/include/logdb/logdb.h \
src/logdb/include/logdb/red_black_tree.h
if USE_TESTS
tests_SOURCES += \
src/logdb/test/logdb_tests.c \
src/logdb/test/tests_red_black_tree.c \
src/logdb/test/logdb_tests_sample.h
endif
endif
if WITH_WALLET
libbtcinclude_HEADERS += \
include/btc/wallet.h
libbtc_la_SOURCES += \
src/wallet.c
if USE_TESTS
tests_SOURCES += \
test/wallet_tests.c
endif
endif
if WITH_NET
libbtcinclude_HEADERS += \
include/btc/headersdb.h \
include/btc/headersdb_file.h \
include/btc/protocol.h \
include/btc/net.h \
include/btc/netspv.h
libbtc_la_SOURCES += \
src/headersdb_file.c \
src/net.c \
src/netspv.c \
src/protocol.c
libbtc_la_LIBADD += $(EVENT_PTHREADS_LIBS) $(EVENT_LIBS)
libbtc_la_CFLAGS += $(EVENT_CFLAGS) $(EVENT_PTHREADS_CFLAGS)
if USE_TESTS
tests_SOURCES += \
test/net_tests.c \
test/netspv_tests.c \
test/protocol_tests.c
tests_LDADD += $(EVENT_PTHREADS_LIBS) $(EVENT_LIBS)
endif
endif
if WITH_TOOLS
if USE_TESTS
tests_SOURCES += \
test/tool_tests.c
endif
instdir=$(prefix)/bin
inst_PROGRAMS = bitcointool
bitcointool_LDADD = libbtc.la
bitcointool_SOURCES = \
src/tools/bitcointool.c
bitcointool_CFLAGS = $(libbtc_la_CFLAGS)
bitcointool_CPPFLAGS = -I$(top_srcdir)/src
bitcointool_LDFLAGS = -static
if WITH_NET
inst_PROGRAMS += bitcoin-send-tx
bitcoin_send_tx_LDADD = libbtc.la $(EVENT_PTHREADS_LIBS) $(EVENT_LIBS)
bitcoin_send_tx_SOURCES = \
src/tools/bitcoin-send-tx.c
bitcoin_send_tx_CFLAGS = $(libbtc_la_CFLAGS) $(EVENT_CFLAGS) $(EVENT_PTHREADS_CFLAGS)
bitcoin_send_tx_CPPFLAGS = -I$(top_srcdir)/src
bitcoin_send_tx_LDFLAGS = -static
inst_PROGRAMS += bitcoin-spv
bitcoin_spv_LDADD = libbtc.la
bitcoin_spv_SOURCES = \
src/tools/bitcoin-spv.c
bitcoin_spv_CFLAGS = $(libbtc_la_CFLAGS)
bitcoin_spv_CPPFLAGS = -I$(top_srcdir)/src
bitcoin_spv_LDFLAGS = -static
endif
endif
clean-local:
-$(MAKE) -C src/secp256k1 clean