]> Git Repo - VerusCoin.git/blob - src/Makefile.am
Move non-trivial uint256.h methods to uint256.cpp
[VerusCoin.git] / src / Makefile.am
1 AM_CPPFLAGS =  $(INCLUDES)
2 AM_LDFLAGS = $(PTHREAD_CFLAGS)
3
4
5 if EMBEDDED_LEVELDB
6 LEVELDB_CPPFLAGS += -I$(srcdir)/leveldb/include
7 LEVELDB_CPPFLAGS += -I$(srcdir)/leveldb/helpers/memenv
8 LIBLEVELDB += $(builddir)/leveldb/libleveldb.a
9 LIBMEMENV  += $(builddir)/leveldb/libmemenv.a
10
11 # NOTE: This dependency is not strictly necessary, but without it make may try to build both in parallel, which breaks the LevelDB build system in a race
12 $(LIBLEVELDB): $(LIBMEMENV)
13
14 $(LIBLEVELDB) $(LIBMEMENV):
15         @echo "Building LevelDB ..." && $(MAKE) -C $(@D) $(@F) CXX="$(CXX)" \
16           CC="$(CC)" PLATFORM=$(TARGET_OS) AR="$(AR)" $(LEVELDB_TARGET_FLAGS) \
17           OPT="$(CXXFLAGS) $(CPPFLAGS)"
18 endif
19
20 BITCOIN_CONFIG_INCLUDES=-I$(builddir)/config
21 BITCOIN_INCLUDES=-I$(builddir) -I$(builddir)/obj $(BOOST_CPPFLAGS) $(LEVELDB_CPPFLAGS)
22
23 LIBBITCOIN_SERVER=libbitcoin_server.a
24 LIBBITCOIN_WALLET=libbitcoin_wallet.a
25 LIBBITCOIN_COMMON=libbitcoin_common.a
26 LIBBITCOIN_CLI=libbitcoin_cli.a
27 LIBBITCOIN_UTIL=libbitcoin_util.a
28 LIBBITCOIN_CRYPTO=crypto/libbitcoin_crypto.a
29 LIBBITCOINQT=qt/libbitcoinqt.a
30
31 noinst_LIBRARIES = \
32   libbitcoin_server.a \
33   libbitcoin_common.a \
34   libbitcoin_cli.a \
35   libbitcoin_util.a \
36   crypto/libbitcoin_crypto.a
37 if ENABLE_WALLET
38 BITCOIN_INCLUDES += $(BDB_CPPFLAGS)
39 noinst_LIBRARIES += libbitcoin_wallet.a
40 endif
41
42 bin_PROGRAMS =
43 TESTS =
44
45 if BUILD_BITCOIND
46   bin_PROGRAMS += bitcoind
47 endif
48
49 if BUILD_BITCOIN_CLI
50   bin_PROGRAMS += bitcoin-cli
51 endif
52
53 .PHONY: FORCE
54 # bitcoin core #
55 BITCOIN_CORE_H = \
56   addrman.h \
57   alert.h \
58   allocators.h \
59   base58.h \
60   bloom.h \
61   chainparams.h \
62   chainparamsbase.h \
63   checkpoints.h \
64   checkqueue.h \
65   clientversion.h \
66   coincontrol.h \
67   coins.h \
68   compat.h \
69   core.h \
70   crypter.h \
71   db.h \
72   hash.h \
73   init.h \
74   key.h \
75   keystore.h \
76   leveldbwrapper.h \
77   limitedmap.h \
78   main.h \
79   miner.h \
80   mruset.h \
81   netbase.h \
82   net.h \
83   noui.h \
84   pow.h \
85   protocol.h \
86   rpcclient.h \
87   rpcprotocol.h \
88   rpcserver.h \
89   script.h \
90   serialize.h \
91   sync.h \
92   threadsafety.h \
93   timedata.h \
94   tinyformat.h \
95   txdb.h \
96   txmempool.h \
97   ui_interface.h \
98   uint256.h \
99   util.h \
100   version.h \
101   walletdb.h \
102   wallet.h \
103   compat/sanity.h
104
105 JSON_H = \
106   json/json_spirit.h \
107   json/json_spirit_error_position.h \
108   json/json_spirit_reader.h \
109   json/json_spirit_reader_template.h \
110   json/json_spirit_stream_reader.h \
111   json/json_spirit_utils.h \
112   json/json_spirit_value.h \
113   json/json_spirit_writer.h \
114   json/json_spirit_writer_template.h
115
116 obj/build.h: FORCE
117         @$(MKDIR_P) $(builddir)/obj
118         @$(top_srcdir)/share/genbuild.sh $(abs_top_builddir)/src/obj/build.h \
119           $(abs_top_srcdir)
120 libbitcoin_util_a-version.$(OBJEXT): obj/build.h
121
122 # server: shared between bitcoind and bitcoin-qt
123 libbitcoin_server_a_CPPFLAGS = $(BITCOIN_INCLUDES)
124 libbitcoin_server_a_SOURCES = \
125   addrman.cpp \
126   alert.cpp \
127   bloom.cpp \
128   checkpoints.cpp \
129   init.cpp \
130   leveldbwrapper.cpp \
131   main.cpp \
132   miner.cpp \
133   net.cpp \
134   noui.cpp \
135   pow.cpp \
136   rpcblockchain.cpp \
137   rpcmining.cpp \
138   rpcmisc.cpp \
139   rpcnet.cpp \
140   rpcrawtransaction.cpp \
141   rpcserver.cpp \
142   timedata.cpp \
143   txdb.cpp \
144   txmempool.cpp \
145   $(JSON_H) \
146   $(BITCOIN_CORE_H)
147
148 # wallet: shared between bitcoind and bitcoin-qt, but only linked
149 # when wallet enabled
150 libbitcoin_wallet_a_CPPFLAGS = $(BITCOIN_INCLUDES)
151 libbitcoin_wallet_a_SOURCES = \
152   db.cpp \
153   crypter.cpp \
154   rpcdump.cpp \
155   rpcwallet.cpp \
156   wallet.cpp \
157   walletdb.cpp \
158   $(BITCOIN_CORE_H)
159
160 # crypto primitives library
161 crypto_libbitcoin_crypto_a_CPPFLAGS = $(BITCOIN_CONFIG_INCLUDES)
162 crypto_libbitcoin_crypto_a_SOURCES = \
163   crypto/sha1.cpp \
164   crypto/sha2.cpp \
165   crypto/ripemd160.cpp \
166   crypto/common.h \
167   crypto/sha2.h \
168   crypto/sha1.h \
169   crypto/ripemd160.h
170
171 # common: shared between bitcoind, and bitcoin-qt and non-server tools
172 libbitcoin_common_a_CPPFLAGS = $(BITCOIN_INCLUDES)
173 libbitcoin_common_a_SOURCES = \
174   allocators.cpp \
175   base58.cpp \
176   chainparams.cpp \
177   coins.cpp \
178   core.cpp \
179   hash.cpp \
180   key.cpp \
181   keystore.cpp \
182   netbase.cpp \
183   protocol.cpp \
184   script.cpp \
185   $(BITCOIN_CORE_H)
186
187 # util: shared between all executables.
188 # This library *must* be included to make sure that the glibc
189 # backward-compatibility objects and their sanity checks are linked.
190 libbitcoin_util_a_CPPFLAGS = $(BITCOIN_INCLUDES)
191 libbitcoin_util_a_SOURCES = \
192   chainparamsbase.cpp \
193   rpcprotocol.cpp \
194   sync.cpp \
195   uint256.cpp \
196   util.cpp \
197   version.cpp \
198   compat/glibc_sanity.cpp \
199   compat/glibcxx_sanity.cpp \
200   $(BITCOIN_CORE_H)
201
202 if GLIBC_BACK_COMPAT
203 libbitcoin_util_a_SOURCES += compat/glibc_compat.cpp
204 libbitcoin_util_a_SOURCES += compat/glibcxx_compat.cpp
205 endif
206
207 # cli: shared between bitcoin-cli and bitcoin-qt
208 libbitcoin_cli_a_SOURCES = \
209   rpcclient.cpp \
210   $(BITCOIN_CORE_H)
211
212 nodist_libbitcoin_util_a_SOURCES = $(srcdir)/obj/build.h
213 #
214
215 # bitcoind binary #
216 bitcoind_LDADD = \
217   $(LIBBITCOIN_SERVER) \
218   $(LIBBITCOIN_COMMON) \
219   $(LIBBITCOIN_UTIL) \
220   $(LIBBITCOIN_CRYPTO) \
221   $(LIBLEVELDB) \
222   $(LIBMEMENV)
223 if ENABLE_WALLET
224 bitcoind_LDADD += libbitcoin_wallet.a
225 endif
226 bitcoind_SOURCES = bitcoind.cpp
227 #
228
229 if TARGET_WINDOWS
230 bitcoind_SOURCES += bitcoind-res.rc
231 endif
232
233 bitcoind_LDADD += $(BOOST_LIBS) $(BDB_LIBS)
234 bitcoind_CPPFLAGS = $(BITCOIN_INCLUDES)
235
236 # bitcoin-cli binary #
237 bitcoin_cli_LDADD = \
238   $(LIBBITCOIN_CLI) \
239   $(LIBBITCOIN_COMMON) \
240   $(LIBBITCOIN_UTIL) \
241   $(LIBBITCOIN_CRYPTO) \
242   $(BOOST_LIBS)
243 bitcoin_cli_SOURCES = \
244   bitcoin-cli.cpp
245 bitcoin_cli_CPPFLAGS = $(BITCOIN_INCLUDES)
246 #
247
248 if TARGET_WINDOWS
249 bitcoin_cli_SOURCES += bitcoin-cli-res.rc
250 endif
251
252 CLEANFILES = leveldb/libleveldb.a leveldb/libmemenv.a *.gcda *.gcno
253
254 DISTCLEANFILES = obj/build.h
255
256 EXTRA_DIST = leveldb
257
258 clean-local:
259         -$(MAKE) -C leveldb clean
260         rm -f leveldb/*/*.gcno leveldb/helpers/memenv/*.gcno
261         -rm -f config.h
262
263 .rc.o:
264         @test -f $(WINDRES)
265         $(AM_V_GEN) $(WINDRES) -i $< -o $@
266
267 .mm.o:
268         $(AM_V_CXX) $(OBJCXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
269           $(CPPFLAGS) $(AM_CXXFLAGS) $(QT_INCLUDES) $(CXXFLAGS)  -c -o $@ $<
270
271 %.pb.cc %.pb.h: %.proto
272         @test -f $(PROTOC)
273         $(AM_V_GEN) $(PROTOC) --cpp_out=$(@D) --proto_path=$(abspath $(<D) $<)
274
275 if ENABLE_TESTS
276 include Makefile.test.include
277 endif
278
279 if ENABLE_QT
280 include Makefile.qt.include
281 endif
282
283 if ENABLE_QT_TESTS
284 include Makefile.qttest.include
285 endif
This page took 0.038339 seconds and 4 git commands to generate.