diff --git a/deps/Makefile b/deps/Makefile index 37f1b4117..7112907ab 100644 --- a/deps/Makefile +++ b/deps/Makefile @@ -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-*) diff --git a/src/Makefile b/src/Makefile index 493a1db17..4476f7c96 100644 --- a/src/Makefile +++ b/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