mirror of
https://github.com/twisterarmy/twister-core.git
synced 2025-01-11 07:17:53 +00:00
Makefile integration of LevelDB
This commit is contained in:
parent
9f56678fce
commit
3ff3a2bd60
@ -90,6 +90,29 @@ contains(BITCOIN_NEED_QT_PLUGINS, 1) {
|
|||||||
QTPLUGIN += qcncodecs qjpcodecs qtwcodecs qkrcodecs qtaccessiblewidgets
|
QTPLUGIN += qcncodecs qjpcodecs qtwcodecs qkrcodecs qtaccessiblewidgets
|
||||||
}
|
}
|
||||||
|
|
||||||
|
contains(USE_LEVELDB, -) {
|
||||||
|
message(Building without LevelDB)
|
||||||
|
} else {
|
||||||
|
message(Building with LevelDB)
|
||||||
|
DEFINES += USE_LEVELDB
|
||||||
|
INCLUDEPATH += src/leveldb/include src/leveldb/helpers
|
||||||
|
LIBS += $$PWD/src/leveldb/libleveldb.a $$PWD/src/leveldb/libmemenv.a
|
||||||
|
!windows {
|
||||||
|
genleveldb.commands = cd $$PWD/src/leveldb ; $(MAKE) libleveldb.a libmemenv.a
|
||||||
|
} else {
|
||||||
|
# make an educated guess about what the ranlib command is called
|
||||||
|
isEmpty(QMAKE_RANLIB) {
|
||||||
|
QMAKE_RANLIB = $$replace(QMAKE_STRIP, strip, ranlib)
|
||||||
|
}
|
||||||
|
genleveldb.commands = cd $$PWD/src/leveldb ; CC=$$QMAKE_CC CXX=$$QMAKE_CXX TARGET_OS=OS_WINDOWS_CROSSCOMPILE CXXFLAGS="-I$$BOOST_INCLUDE_PATH" LDFLAGS="-L$$BOOST_LIB_PATH" $(MAKE) libleveldb.a libmemenv.a ; $$QMAKE_RANLIB $$PWD/src/leveldb/libleveldb.a ; $$QMAKE_RANLIB $$PWD/src/leveldb/libmemenv.a
|
||||||
|
}
|
||||||
|
genleveldb.target = $$PWD/src/leveldb/libleveldb.a
|
||||||
|
genleveldb.depends = FORCE
|
||||||
|
PRE_TARGETDEPS += $$PWD/src/leveldb/libleveldb.a
|
||||||
|
QMAKE_EXTRA_TARGETS += genleveldb
|
||||||
|
# Gross ugly hack that depends on qmake internals, unfortunately there's no other way to do it.
|
||||||
|
QMAKE_CLEAN += $$PWD/src/leveldb/libleveldb.a; cd $$PWD/src/leveldb ; $(MAKE) clean
|
||||||
|
}
|
||||||
|
|
||||||
# regenerate src/build.h
|
# regenerate src/build.h
|
||||||
!windows|contains(USE_BUILD_INFO, 1) {
|
!windows|contains(USE_BUILD_INFO, 1) {
|
||||||
|
@ -6,6 +6,7 @@ DEPSDIR:=/usr/i586-mingw32msvc
|
|||||||
|
|
||||||
USE_UPNP:=0
|
USE_UPNP:=0
|
||||||
USE_IPV6:=1
|
USE_IPV6:=1
|
||||||
|
USE_LEVELDB:=1
|
||||||
|
|
||||||
INCLUDEPATHS= \
|
INCLUDEPATHS= \
|
||||||
-I"$(CURDIR)" \
|
-I"$(CURDIR)" \
|
||||||
@ -86,6 +87,15 @@ OBJS= \
|
|||||||
|
|
||||||
all: bitcoind.exe
|
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
|
obj/build.h: FORCE
|
||||||
/bin/sh ../share/genbuild.sh obj/build.h
|
/bin/sh ../share/genbuild.sh obj/build.h
|
||||||
version.cpp: obj/build.h
|
version.cpp: obj/build.h
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
USE_UPNP:=0
|
USE_UPNP:=0
|
||||||
USE_IPV6:=1
|
USE_IPV6:=1
|
||||||
|
USE_LEVELDB:=1
|
||||||
|
|
||||||
INCLUDEPATHS= \
|
INCLUDEPATHS= \
|
||||||
-I"C:\boost-1.50.0-mgw" \
|
-I"C:\boost-1.50.0-mgw" \
|
||||||
@ -86,6 +87,18 @@ all: bitcoind.exe
|
|||||||
test check: test_bitcoin.exe FORCE
|
test check: test_bitcoin.exe FORCE
|
||||||
test_bitcoin.exe
|
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)
|
obj/%.o: %.cpp $(HEADERS)
|
||||||
g++ -c $(CFLAGS) -o $@ $<
|
g++ -c $(CFLAGS) -o $@ $<
|
||||||
|
|
||||||
|
@ -21,6 +21,7 @@ LIBPATHS= \
|
|||||||
|
|
||||||
USE_UPNP:=1
|
USE_UPNP:=1
|
||||||
USE_IPV6:=1
|
USE_IPV6:=1
|
||||||
|
USE_LEVELDB:=1
|
||||||
|
|
||||||
LIBS= -dead_strip
|
LIBS= -dead_strip
|
||||||
|
|
||||||
@ -119,6 +120,18 @@ all: bitcoind
|
|||||||
test check: test_bitcoin FORCE
|
test check: test_bitcoin FORCE
|
||||||
./test_bitcoin
|
./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:
|
# auto-generated dependencies:
|
||||||
-include obj/*.P
|
-include obj/*.P
|
||||||
-include obj-test/*.P
|
-include obj-test/*.P
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
USE_UPNP:=0
|
USE_UPNP:=0
|
||||||
USE_IPV6:=1
|
USE_IPV6:=1
|
||||||
|
USE_LEVELDB:=1
|
||||||
|
|
||||||
LINK:=$(CXX)
|
LINK:=$(CXX)
|
||||||
|
|
||||||
@ -135,6 +136,18 @@ all: bitcoind
|
|||||||
test check: test_bitcoin FORCE
|
test check: test_bitcoin FORCE
|
||||||
./test_bitcoin
|
./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:
|
# auto-generated dependencies:
|
||||||
-include obj/*.P
|
-include obj/*.P
|
||||||
-include obj-test/*.P
|
-include obj-test/*.P
|
||||||
|
Loading…
Reference in New Issue
Block a user