Skip to content

Commit

Permalink
Makefile Fix use USE_LEVELDB=1
Browse files Browse the repository at this point in the history
  • Loading branch information
metaspartan committed Sep 6, 2017
1 parent 61ffee6 commit 2291d5c
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/makefile.unix
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# Distributed under the MIT/X11 software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.

USE_LEVELDB:=0
USE_UPNP:=1

LINK:=$(CXX)
Expand Down Expand Up @@ -145,14 +146,21 @@ OBJS= \

all: denariusd

#
# LevelDB support
#
ifeq (${USE_LEVELDB}, 1)
LIBS += $(CURDIR)/leveldb/libleveldb.a $(CURDIR)/leveldb/libmemenv.a
DEFS += $(addprefix -I,$(CURDIR)/leveldb/include)
DEFS += $(addprefix -I,$(CURDIR)/leveldb/include) -DUSE_LEVELDB
DEFS += $(addprefix -I,$(CURDIR)/leveldb/helpers)
OBJS += obj/txdb-leveldb.o
leveldb/libleveldb.a:
@echo "Building LevelDB ..."; cd leveldb; make libleveldb.a libmemenv.a; cd ..;
@echo "Building LevelDB ..."; cd leveldb; CC=$(CC) CXX=$(CXX) make libleveldb.a libmemenv.a; cd ..;
obj/txdb-leveldb.o: leveldb/libleveldb.a

endif
ifneq (${USE_LEVELDB}, 1)
OBJS += obj/txdb-bdb.o
endif

# auto-generated dependencies:
-include obj/*.P
Expand Down

0 comments on commit 2291d5c

Please sign in to comment.