build: Add support for linking against a system librocksdb
Add a new USE_SYSTEM_ROCKSDB make variable to select whether to link against the system librocksdb.
This commit is contained in:
parent
ae130d1a7f
commit
d67c65867a
2
deps/Makefile
vendored
2
deps/Makefile
vendored
@ -40,7 +40,9 @@ distclean:
|
||||
ifneq ($(USE_SYSTEM_JEMALLOC),yes)
|
||||
-(cd jemalloc && [ -f Makefile ] && $(MAKE) distclean) > /dev/null || true
|
||||
endif
|
||||
ifneq ($(USE_SYSTEM_ROCKSDB),yes)
|
||||
-(cd rocksdb && $(MAKE) clean) > /dev/null || true
|
||||
endif
|
||||
-(cd hdr_histogram && $(MAKE) clean) > /dev/null || true
|
||||
-(rm -f .make-*)
|
||||
|
||||
|
11
src/Makefile
11
src/Makefile
@ -73,12 +73,19 @@ ifneq ($(strip $(SANITIZE)),)
|
||||
endif
|
||||
|
||||
ifeq ($(ENABLE_FLASH),yes)
|
||||
STORAGE_OBJ+= storage/rocksdb.o storage/rocksdbfactory.o
|
||||
ifeq ($(USE_SYSTEM_ROCKSDB),yes)
|
||||
FINAL_LIBS+= $(shell pkg-config --libs rocksdb)
|
||||
FINAL_CXXFLAGS+= $(shell pkg-config --cflags rocksdb) -DENABLE_ROCKSDB
|
||||
|
||||
else
|
||||
FINAL_LIBS+= -lz -lcrypto -lbz2 -lzstd -llz4 -lsnappy
|
||||
CXXFLAGS+= -I../deps/rocksdb/include/ -DENABLE_ROCKSDB
|
||||
STORAGE_OBJ+= storage/rocksdb.o storage/rocksdbfactory.o
|
||||
FINAL_CXXFLAGS+= -I../deps/rocksdb/include/
|
||||
FINAL_LIBS+= ../deps/rocksdb/librocksdb.a
|
||||
DEPENDENCY_TARGETS+= rocksdb
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
ifeq ($(CHECKED),true)
|
||||
@ -268,7 +275,7 @@ endif
|
||||
|
||||
# Include paths to dependencies
|
||||
FINAL_CFLAGS+= -I../deps/hiredis -I../deps/linenoise -I../deps/lua/src -I../deps/hdr_histogram
|
||||
FINAL_CXXFLAGS+= -I../deps/hiredis -I../deps/linenoise -I../deps/lua/src -I../deps/hdr_histogram -I../deps/rocksdb/include/
|
||||
FINAL_CXXFLAGS+= -I../deps/hiredis -I../deps/linenoise -I../deps/lua/src -I../deps/hdr_histogram
|
||||
|
||||
ifeq ($(USE_SYSTEM_CONCURRENTQUEUE),yes)
|
||||
FINAL_CXXFLAGS+= -I/usr/include/concurrentqueue/moodycamel
|
||||
|
Loading…
x
Reference in New Issue
Block a user