]> Git Repo - VerusCoin.git/blob - src/Makefile.am
Merge pull request #4381
[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 $(BITCOIN_CONFIG_INCLUDES) $(BOOST_CPPFLAGS) $(LEVELDB_CPPFLAGS)
22
23 noinst_LIBRARIES = \
24   libbitcoin_server.a \
25   libbitcoin_common.a \
26   libbitcoin_cli.a \
27   crypto/libbitcoin_crypto.a
28 if ENABLE_WALLET
29 BITCOIN_INCLUDES += $(BDB_CPPFLAGS)
30 noinst_LIBRARIES += libbitcoin_wallet.a
31 endif
32
33 bin_PROGRAMS =
34 TESTS =
35
36 if BUILD_BITCOIND
37   bin_PROGRAMS += bitcoind
38 endif
39
40 if BUILD_BITCOIN_CLI
41   bin_PROGRAMS += bitcoin-cli
42 endif
43
44 .PHONY: FORCE
45 # bitcoin core #
46 BITCOIN_CORE_H = \
47   addrman.h \
48   alert.h \
49   allocators.h \
50   base58.h \
51   bloom.h \
52   chainparams.h \
53   checkpoints.h \
54   checkqueue.h \
55   clientversion.h \
56   coincontrol.h \
57   coins.h \
58   compat.h \
59   core.h \
60   crypter.h \
61   db.h \
62   hash.h \
63   init.h \
64   key.h \
65   keystore.h \
66   leveldbwrapper.h \
67   limitedmap.h \
68   main.h \
69   miner.h \
70   mruset.h \
71   netbase.h \
72   net.h \
73   noui.h \
74   protocol.h \
75   rpcclient.h \
76   rpcprotocol.h \
77   rpcserver.h \
78   script.h \
79   serialize.h \
80   sync.h \
81   threadsafety.h \
82   tinyformat.h \
83   txdb.h \
84   txmempool.h \
85   ui_interface.h \
86   uint256.h \
87   util.h \
88   version.h \
89   walletdb.h \
90   wallet.h \
91   compat/sanity.h
92
93 JSON_H = \
94   json/json_spirit.h \
95   json/json_spirit_error_position.h \
96   json/json_spirit_reader.h \
97   json/json_spirit_reader_template.h \
98   json/json_spirit_stream_reader.h \
99   json/json_spirit_utils.h \
100   json/json_spirit_value.h \
101   json/json_spirit_writer.h \
102   json/json_spirit_writer_template.h
103
104 obj/build.h: FORCE
105         @$(MKDIR_P) $(builddir)/obj
106         @$(top_srcdir)/share/genbuild.sh $(abs_top_builddir)/src/obj/build.h \
107           $(abs_top_srcdir)
108 libbitcoin_common_a-version.$(OBJEXT): obj/build.h
109
110 libbitcoin_server_a_CPPFLAGS = $(BITCOIN_INCLUDES)
111 libbitcoin_server_a_SOURCES = \
112   addrman.cpp \
113   alert.cpp \
114   bloom.cpp \
115   checkpoints.cpp \
116   coins.cpp \
117   init.cpp \
118   keystore.cpp \
119   leveldbwrapper.cpp \
120   main.cpp \
121   miner.cpp \
122   net.cpp \
123   noui.cpp \
124   rpcblockchain.cpp \
125   rpcmining.cpp \
126   rpcmisc.cpp \
127   rpcnet.cpp \
128   rpcrawtransaction.cpp \
129   rpcserver.cpp \
130   txdb.cpp \
131   txmempool.cpp \
132   $(JSON_H) \
133   $(BITCOIN_CORE_H)
134
135 libbitcoin_wallet_a_CPPFLAGS = $(BITCOIN_INCLUDES)
136 libbitcoin_wallet_a_SOURCES = \
137   db.cpp \
138   crypter.cpp \
139   rpcdump.cpp \
140   rpcwallet.cpp \
141   wallet.cpp \
142   walletdb.cpp \
143   $(BITCOIN_CORE_H)
144
145 crypto_libbitcoin_crypto_a_CPPFLAGS = $(BITCOIN_CONFIG_INCLUDES)
146 crypto_libbitcoin_crypto_a_SOURCES = \
147   crypto/sha1.cpp \
148   crypto/sha2.cpp \
149   crypto/ripemd160.cpp \
150   crypto/common.h \
151   crypto/sha2.h \
152   crypto/sha1.h \
153   crypto/ripemd160.h
154
155 libbitcoin_common_a_CPPFLAGS = $(BITCOIN_INCLUDES)
156 libbitcoin_common_a_SOURCES = \
157   base58.cpp \
158   allocators.cpp \
159   chainparams.cpp \
160   core.cpp \
161   hash.cpp \
162   key.cpp \
163   netbase.cpp \
164   protocol.cpp \
165   rpcprotocol.cpp \
166   script.cpp \
167   sync.cpp \
168   util.cpp \
169   version.cpp \
170   compat/glibc_sanity.cpp \
171   compat/glibcxx_sanity.cpp \
172   $(BITCOIN_CORE_H)
173
174 if GLIBC_BACK_COMPAT
175 libbitcoin_common_a_SOURCES += compat/glibc_compat.cpp
176 libbitcoin_common_a_SOURCES += compat/glibcxx_compat.cpp
177 endif
178
179 libbitcoin_cli_a_SOURCES = \
180   rpcclient.cpp \
181   $(BITCOIN_CORE_H)
182
183 nodist_libbitcoin_common_a_SOURCES = $(srcdir)/obj/build.h
184 #
185
186 # bitcoind binary #
187 bitcoind_LDADD = \
188   libbitcoin_server.a \
189   libbitcoin_common.a \
190   crypto/libbitcoin_crypto.a \
191   $(LIBLEVELDB) \
192   $(LIBMEMENV)
193 if ENABLE_WALLET
194 bitcoind_LDADD += libbitcoin_wallet.a
195 endif
196 bitcoind_SOURCES = bitcoind.cpp
197 #
198
199 if TARGET_WINDOWS
200 bitcoind_SOURCES += bitcoind-res.rc
201 endif
202
203 bitcoind_LDADD += $(BOOST_LIBS) $(BDB_LIBS)
204 bitcoind_CPPFLAGS = $(BITCOIN_INCLUDES)
205
206 # bitcoin-cli binary #
207 bitcoin_cli_LDADD = \
208   libbitcoin_cli.a \
209   libbitcoin_common.a \
210   crypto/libbitcoin_crypto.a \
211   $(BOOST_LIBS)
212 bitcoin_cli_SOURCES = bitcoin-cli.cpp
213 bitcoin_cli_CPPFLAGS = $(BITCOIN_INCLUDES)
214 #
215
216 if TARGET_WINDOWS
217 bitcoin_cli_SOURCES += bitcoin-cli-res.rc
218 endif
219
220 CLEANFILES = leveldb/libleveldb.a leveldb/libmemenv.a *.gcda *.gcno
221
222 DISTCLEANFILES = obj/build.h
223
224 EXTRA_DIST = leveldb
225
226 clean-local:
227         -$(MAKE) -C leveldb clean
228         rm -f leveldb/*/*.gcno leveldb/helpers/memenv/*.gcno
229         -rm -f config.h
230
231 .rc.o:
232         @test -f $(WINDRES)
233         $(AM_V_GEN) $(WINDRES) -i $< -o $@
234
235 .mm.o:
236         $(AM_V_CXX) $(OBJCXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
237           $(CPPFLAGS) $(AM_CXXFLAGS) $(QT_INCLUDES) $(CXXFLAGS)  -c -o $@ $<
238
239 %.pb.cc %.pb.h: %.proto
240         @test -f $(PROTOC)
241         $(AM_V_GEN) $(PROTOC) --cpp_out=$(@D) --proto_path=$(abspath $(<D) $<)
242
243 LIBBITCOIN_SERVER=libbitcoin_server.a
244 LIBBITCOIN_WALLET=libbitcoin_wallet.a
245 LIBBITCOIN_COMMON=libbitcoin_common.a
246 LIBBITCOIN_CLI=libbitcoin_cli.a
247 LIBBITCOIN_CRYPTO=crypto/libbitcoin_crypto.a
248 LIBBITCOINQT=qt/libbitcoinqt.a
249
250 if ENABLE_TESTS
251 include Makefile.test.include
252 endif
253
254 if ENABLE_QT
255 include Makefile.qt.include
256 endif
257
258 if ENABLE_QT_TESTS
259 include Makefile.qttest.include
260 endif
This page took 0.046128 seconds and 4 git commands to generate.