aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/makefile.linux-mingw10
-rw-r--r--src/makefile.mingw13
-rw-r--r--src/makefile.osx13
-rw-r--r--src/makefile.unix13
4 files changed, 49 insertions, 0 deletions
diff --git a/src/makefile.linux-mingw b/src/makefile.linux-mingw
index 0970469a98..8f8279c926 100644
--- a/src/makefile.linux-mingw
+++ b/src/makefile.linux-mingw
@@ -6,6 +6,7 @@ DEPSDIR:=/usr/i586-mingw32msvc
USE_UPNP:=0
USE_IPV6:=1
+USE_LEVELDB:=1
INCLUDEPATHS= \
-I"$(CURDIR)" \
@@ -86,6 +87,15 @@ OBJS= \
all: bitcoind.exe
+ifdef USE_LEVELDB
+LIBS += $(CURDIR)/leveldb/libleveldb.lib $(CURDIR)/leveldb/libmemenv.a
+DEFS += -I"$(CURDIR)/leveldb/include" -DUSE_LEVELDB
+DEFS += -I"$(CURDIR)/leveldb/helpers"
+leveldb/libleveldb.a:
+ @echo "Building LevelDB ..."; cd leveldb; TARGET_OS=OS_WINDOWS_CROSSCOMPILE CXXFLAGS="-I$(INCLUDEPATHS)" LDFLAGS="-L$(LIBPATHS)" make libleveldb.a libmemenv.a; cd ..
+obj/db.o: leveldb/libleveldb.a
+endif
+
obj/build.h: FORCE
/bin/sh ../share/genbuild.sh obj/build.h
version.cpp: obj/build.h
diff --git a/src/makefile.mingw b/src/makefile.mingw
index 54054c25f9..e2560d9912 100644
--- a/src/makefile.mingw
+++ b/src/makefile.mingw
@@ -4,6 +4,7 @@
USE_UPNP:=0
USE_IPV6:=1
+USE_LEVELDB:=1
INCLUDEPATHS= \
-I"C:\boost-1.50.0-mgw" \
@@ -86,6 +87,18 @@ all: bitcoind.exe
test check: test_bitcoin.exe FORCE
test_bitcoin.exe
+#
+# LevelDB support
+#
+ifdef USE_LEVELDB
+LIBS += $(CURDIR)/leveldb/libleveldb.a $(CURDIR)/leveldb/libmemenv.a
+DEFS += $(addprefix -I,$(CURDIR)/leveldb/include) -DUSE_LEVELDB
+DEFS += $(addprefix -I,$(CURDIR)/leveldb/helpers)
+leveldb/libleveldb.a:
+ cd leveldb; make libleveldb.a libmemenv.a; cd ..
+obj/db.o: leveldb/libleveldb.lib
+endif
+
obj/%.o: %.cpp $(HEADERS)
g++ -c $(CFLAGS) -o $@ $<
diff --git a/src/makefile.osx b/src/makefile.osx
index 359739bd5e..bfda788410 100644
--- a/src/makefile.osx
+++ b/src/makefile.osx
@@ -21,6 +21,7 @@ LIBPATHS= \
USE_UPNP:=1
USE_IPV6:=1
+USE_LEVELDB:=1
LIBS= -dead_strip
@@ -119,6 +120,18 @@ all: bitcoind
test check: test_bitcoin FORCE
./test_bitcoin
+#
+# LevelDB support
+#
+ifdef USE_LEVELDB
+LIBS += $(CURDIR)/leveldb/libleveldb.a $(CURDIR)/leveldb/libmemenv.a
+DEFS += $(addprefix -I,$(CURDIR)/leveldb/include) -DUSE_LEVELDB
+DEFS += $(addprefix -I,$(CURDIR)/leveldb/helpers)
+leveldb/libleveldb.a:
+ @echo "Building LevelDB ..."; cd leveldb; make libleveldb.a libmemenv.a; cd ..
+obj/db.o: leveldb/libleveldb.a
+endif
+
# auto-generated dependencies:
-include obj/*.P
-include obj-test/*.P
diff --git a/src/makefile.unix b/src/makefile.unix
index a41b57b4fc..01b637e9c6 100644
--- a/src/makefile.unix
+++ b/src/makefile.unix
@@ -4,6 +4,7 @@
USE_UPNP:=0
USE_IPV6:=1
+USE_LEVELDB:=1
LINK:=$(CXX)
@@ -135,6 +136,18 @@ all: bitcoind
test check: test_bitcoin FORCE
./test_bitcoin
+#
+# LevelDB support
+#
+ifdef USE_LEVELDB
+LIBS += $(CURDIR)/leveldb/libleveldb.a $(CURDIR)/leveldb/libmemenv.a
+DEFS += $(addprefix -I,$(CURDIR)/leveldb/include) -DUSE_LEVELDB
+DEFS += $(addprefix -I,$(CURDIR)/leveldb/helpers)
+leveldb/libleveldb.a:
+ @echo "Building LevelDB ..."; cd leveldb; make libleveldb.a libmemenv.a; cd ..;
+obj/db.o: leveldb/libleveldb.a
+endif
+
# auto-generated dependencies:
-include obj/*.P
-include obj-test/*.P