diff --git a/Makefile b/Makefile index a757d0462..9d5924bb1 100644 --- a/Makefile +++ b/Makefile @@ -75,7 +75,10 @@ TOOLS = \ PROGRAMS = db_bench signal_test $(TESTS) $(TOOLS) BENCHMARKS = db_bench_sqlite3 db_bench_tree_db -LIBRARY = librocksdb.a +# The library name is configurable since we are maintaining libraries of both +# debug/release mode. +LIBNAME = librocksdb +LIBRARY = ${LIBNAME}.a MEMENVLIBRARY = libmemenv.a default: all @@ -84,7 +87,7 @@ default: all ifneq ($(PLATFORM_SHARED_EXT),) ifneq ($(PLATFORM_SHARED_VERSIONED),true) -SHARED1 = librocksdb.$(PLATFORM_SHARED_EXT) +SHARED1 = ${LIBNAME}.$(PLATFORM_SHARED_EXT) SHARED2 = $(SHARED1) SHARED3 = $(SHARED1) SHARED = $(SHARED1) @@ -92,7 +95,7 @@ else # Update db.h if you change these. SHARED_MAJOR = 2 SHARED_MINOR = 0 -SHARED1 = librocksdb.$(PLATFORM_SHARED_EXT) +SHARED1 = ${LIBNAME}.$(PLATFORM_SHARED_EXT) SHARED2 = $(SHARED1).$(SHARED_MAJOR) SHARED3 = $(SHARED1).$(SHARED_MAJOR).$(SHARED_MINOR) SHARED = $(SHARED1) $(SHARED2) $(SHARED3) diff --git a/build_tools/build_detect_platform b/build_tools/build_detect_platform index bde280b8e..d0d1e61ca 100755 --- a/build_tools/build_detect_platform +++ b/build_tools/build_detect_platform @@ -78,7 +78,7 @@ case "$TARGET_OS" in ;; Linux) PLATFORM=OS_LINUX - COMMON_FLAGS="$COMMON_FLAGS -DOS_LINUX -fPIC" + COMMON_FLAGS="$COMMON_FLAGS -DOS_LINUX" if [ -z "$USE_CLANG" ]; then COMMON_FLAGS="$COMMON_FLAGS -fno-builtin-memcmp" fi