File tree Expand file tree Collapse file tree 3 files changed +22
-7
lines changed Expand file tree Collapse file tree 3 files changed +22
-7
lines changed Original file line number Diff line number Diff line change @@ -328,6 +328,14 @@ AC_TRY_COMPILE([#include <sys/socket.h>],
328
328
[ AC_MSG_RESULT ( no ) ]
329
329
)
330
330
331
+ LEVELDB_CPPFLAGS=
332
+ LIBLEVELDB=
333
+ LIBMEMENV=
334
+ AM_CONDITIONAL([ EMBEDDED_LEVELDB] ,[ true] )
335
+ AC_SUBST ( LEVELDB_CPPFLAGS )
336
+ AC_SUBST ( LIBLEVELDB )
337
+ AC_SUBST ( LIBMEMENV )
338
+
331
339
if test x$enable_wallet != xno; then
332
340
dnl Check for libdb_cxx only if wallet enabled
333
341
BITCOIN_FIND_BDB48
Original file line number Diff line number Diff line change 1
1
include Makefile.include
2
2
3
- AM_CPPFLAGS += -I$(top_srcdir ) /src/leveldb/helpers/memenv \
4
- -I$(builddir )
3
+ AM_CPPFLAGS += -I$(builddir )
5
4
6
5
noinst_LIBRARIES = \
7
6
libbitcoin_server.a \
@@ -140,8 +139,8 @@ bitcoind_LDADD = \
140
139
libbitcoin_server.a \
141
140
libbitcoin_cli.a \
142
141
libbitcoin_common.a \
143
- leveldb/libleveldb.a \
144
- leveldb/libmemenv.a
142
+ $( LIBLEVELDB ) \
143
+ $( LIBMEMENV )
145
144
if ENABLE_WALLET
146
145
bitcoind_LDADD += libbitcoin_wallet.a
147
146
endif
@@ -167,6 +166,7 @@ if TARGET_WINDOWS
167
166
bitcoin_cli_SOURCES += bitcoin-cli-res.rc
168
167
endif
169
168
169
+ # 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
170
170
leveldb/libleveldb.a : leveldb/libmemenv.a
171
171
172
172
leveldb/% .a :
Original file line number Diff line number Diff line change
1
+ if EMBEDDED_LEVELDB
2
+ LEVELDB_CPPFLAGS += -I$(top_srcdir)/src/leveldb/include
3
+ LEVELDB_CPPFLAGS += -I$(top_srcdir)/src/leveldb/helpers/memenv
4
+ LIBLEVELDB += $(top_builddir)/src/leveldb/libleveldb.a
5
+ LIBMEMENV += $(top_builddir)/src/leveldb/libmemenv.a
6
+ endif
7
+
1
8
AM_CPPFLAGS = $(INCLUDES) \
2
9
-I$(top_builddir)/src/obj \
3
- -I$(top_srcdir)/src/leveldb/include \
4
10
$(BDB_CPPFLAGS) \
5
11
$(BOOST_INCLUDES)
12
+ AM_CPPFLAGS += $(LEVELDB_CPPFLAGS)
6
13
AM_LDFLAGS = $(PTHREAD_CFLAGS)
7
14
8
15
LIBBITCOIN_SERVER=$(top_builddir)/src/libbitcoin_server.a
9
16
LIBBITCOIN_WALLET=$(top_builddir)/src/libbitcoin_wallet.a
10
17
LIBBITCOIN_COMMON=$(top_builddir)/src/libbitcoin_common.a
11
18
LIBBITCOIN_CLI=$(top_builddir)/src/libbitcoin_cli.a
12
- LIBLEVELDB=$(top_builddir)/src/leveldb/libleveldb.a
13
- LIBMEMENV=$(top_builddir)/src/leveldb/libmemenv.a
14
19
LIBBITCOINQT=$(top_builddir)/src/qt/libbitcoinqt.a
15
20
16
21
$(LIBBITCOIN):
17
22
$(MAKE) -C $(top_builddir)/src $(@F)
18
23
24
+ if EMBEDDED_LEVELDB
19
25
$(LIBLEVELDB) $(LIBMEMENV):
20
26
$(MAKE) -C $(top_builddir)/src leveldb/$(@F)
27
+ endif
21
28
22
29
$(LIBBITCOINQT):
23
30
$(MAKE) -C $(top_builddir)/src/qt $(@F)
You can’t perform that action at this time.
0 commit comments