@ -55,50 +55,25 @@ DEBUG_LEVEL?=1
# Set the default LIB_MODE to static
# Set the default LIB_MODE to static
LIB_MODE ?= static
LIB_MODE ?= static
i f e q ( $( MAKECMDGOALS ) , d b g )
# OBJ_DIR is where the object files reside. Default to the current directory
DEBUG_LEVEL = 2
OBJ_DIR ?= .
e n d i f
i f e q ( $( MAKECMDGOALS ) , c l e a n )
# Check the MAKECMDGOALS to set the DEBUG_LEVEL and LIB_MODE appropriately
DEBUG_LEVEL = 0
e n d i f
i f e q ( $( MAKECMDGOALS ) , r e l e a s e )
i f n e q ( $( filter clean release install , $ ( MAKECMDGOALS ) ) , )
DEBUG_LEVEL = 0
DEBUG_LEVEL = 0
e n d i f
e n d i f
i f n e q ( $( filter dbg , $ ( MAKECMDGOALS ) ) , )
i f e q ( $( MAKECMDGOALS ) , s h a r e d _ l i b )
DEBUG_LEVEL = 2
LIB_MODE = shared
e l s e i f n e q ( $( filter shared_lib install -shared , $ ( MAKECMDGOALS ) ) , )
DEBUG_LEVEL = 0
DEBUG_LEVEL = 0
e n d i f
i f e q ( $( MAKECMDGOALS ) , i n s t a l l - s h a r e d )
LIB_MODE = shared
LIB_MODE = shared
DEBUG_LEVEL = 0
e l s e i f n e q ( $( filter static_lib install -static , $ ( MAKECMDGOALS ) ) , )
e n d i f
i f e q ( $( MAKECMDGOALS ) , s t a t i c _ l i b )
DEBUG_LEVEL = 0
LIB_MODE = static
e n d i f
i f e q ( $( MAKECMDGOALS ) , i n s t a l l - s t a t i c )
DEBUG_LEVEL = 0
DEBUG_LEVEL = 0
LIB_MODE = static
LIB_MODE = static
e n d i f
e l s e i f n e q ( $( filter jtest rocksdbjava %, $ ( MAKECMDGOALS ) ) , )
i f e q ( $( MAKECMDGOALS ) , i n s t a l l )
DEBUG_LEVEL = 0
e n d i f
i f n e q ( $( findstring jtest , $ ( MAKECMDGOALS ) ) , )
OBJ_DIR = jl
OBJ_DIR = jl
LIB_MODE = shared
LIB_MODE = shared
e n d i f
i f n e q ( $( findstring rocksdbjava , $ ( MAKECMDGOALS ) ) , )
LIB_MODE = shared
ifneq ( $( findstring rocksdbjavastatic, $( MAKECMDGOALS) ) ,)
ifneq ( $( findstring rocksdbjavastatic, $( MAKECMDGOALS) ) ,)
OBJ_DIR = jls
OBJ_DIR = jls
ifneq ( $( DEBUG_LEVEL) ,2)
ifneq ( $( DEBUG_LEVEL) ,2)
@ -107,8 +82,6 @@ ifneq ($(findstring rocksdbjava, $(MAKECMDGOALS)),)
ifeq ( $( MAKECMDGOALS) ,rocksdbjavastaticpublish)
ifeq ( $( MAKECMDGOALS) ,rocksdbjavastaticpublish)
DEBUG_LEVEL = 0
DEBUG_LEVEL = 0
endif
endif
else
OBJ_DIR = jl
endif
endif
e n d i f
e n d i f
@ -491,7 +464,6 @@ CXXFLAGS += $(WARNING_FLAGS) -I. -I./include $(PLATFORM_CXXFLAGS) $(OPT) -Woverl
LDFLAGS += $( PLATFORM_LDFLAGS)
LDFLAGS += $( PLATFORM_LDFLAGS)
OBJ_DIR ?= .
LIB_OBJECTS = $( patsubst %.cc, $( OBJ_DIR) /%.o, $( LIB_SOURCES) )
LIB_OBJECTS = $( patsubst %.cc, $( OBJ_DIR) /%.o, $( LIB_SOURCES) )
LIB_OBJECTS += $( patsubst %.cc, $( OBJ_DIR) /%.o, $( ROCKSDB_PLUGIN_SOURCES) )
LIB_OBJECTS += $( patsubst %.cc, $( OBJ_DIR) /%.o, $( ROCKSDB_PLUGIN_SOURCES) )
i f e q ( $( HAVE_POWER 8) , 1 )
i f e q ( $( HAVE_POWER 8) , 1 )
@ -651,8 +623,8 @@ else
LIBRARY = $( STATIC_LIBRARY)
LIBRARY = $( STATIC_LIBRARY)
TEST_LIBRARY = $( STATIC_TEST_LIBRARY)
TEST_LIBRARY = $( STATIC_TEST_LIBRARY)
TOOLS_LIBRARY = $( STATIC_TOOLS_LIBRARY)
TOOLS_LIBRARY = $( STATIC_TOOLS_LIBRARY)
STRESS_LIBRARY = $( STATIC_STRESS_LIBRARY)
e n d i f
e n d i f
STRESS_LIBRARY = $( STATIC_STRESS_LIBRARY)
ROCKSDB_MAJOR = $( shell egrep "ROCKSDB_MAJOR.[0-9]" include/rocksdb/version.h | cut -d ' ' -f 3)
ROCKSDB_MAJOR = $( shell egrep "ROCKSDB_MAJOR.[0-9]" include/rocksdb/version.h | cut -d ' ' -f 3)
ROCKSDB_MINOR = $( shell egrep "ROCKSDB_MINOR.[0-9]" include/rocksdb/version.h | cut -d ' ' -f 3)
ROCKSDB_MINOR = $( shell egrep "ROCKSDB_MINOR.[0-9]" include/rocksdb/version.h | cut -d ' ' -f 3)
@ -1246,7 +1218,7 @@ $(STATIC_TOOLS_LIBRARY): $(TOOL_OBJECTS)
$( AM_V_AR) rm -f $@ $( SHARED_TOOLS_LIBRARY)
$( AM_V_AR) rm -f $@ $( SHARED_TOOLS_LIBRARY)
$( AM_V_at) $( AR) $( ARFLAGS) $@ $^
$( AM_V_at) $( AR) $( ARFLAGS) $@ $^
$(STATIC_STRESS_LIBRARY) : $( ANALYZE_OBJECTS ) $( STRESS_OBJECTS )
$(STATIC_STRESS_LIBRARY) : $( ANALYZE_OBJECTS ) $( STRESS_OBJECTS ) $( TESTUTIL )
$( AM_V_AR) rm -f $@ $( SHARED_STRESS_LIBRARY)
$( AM_V_AR) rm -f $@ $( SHARED_STRESS_LIBRARY)
$( AM_V_at) $( AR) $( ARFLAGS) $@ $^
$( AM_V_at) $( AR) $( ARFLAGS) $@ $^
@ -1258,7 +1230,7 @@ $(SHARED_TOOLS_LIBRARY): $(TOOL_OBJECTS) $(SHARED1)
$( AM_V_AR) rm -f $@ $( STATIC_TOOLS_LIBRARY)
$( AM_V_AR) rm -f $@ $( STATIC_TOOLS_LIBRARY)
$( AM_SHARE)
$( AM_SHARE)
$(SHARED_STRESS_LIBRARY) : $( ANALYZE_OBJECTS ) $( STRESS_OBJECTS ) $( SHARED_TOOLS_LIBRARY ) $( SHARED 1)
$(SHARED_STRESS_LIBRARY) : $( ANALYZE_OBJECTS ) $( STRESS_OBJECTS ) $( TESTUTIL ) $( SHARED_TOOLS_LIBRARY ) $( SHARED 1)
$( AM_V_AR) rm -f $@ $( STATIC_STRESS_LIBRARY)
$( AM_V_AR) rm -f $@ $( STATIC_STRESS_LIBRARY)
$( AM_SHARE)
$( AM_SHARE)
@ -1292,7 +1264,7 @@ memtablerep_bench: $(OBJ_DIR)/memtable/memtablerep_bench.o $(LIBRARY)
filter_bench : $( OBJ_DIR ) /util /filter_bench .o $( LIBRARY )
filter_bench : $( OBJ_DIR ) /util /filter_bench .o $( LIBRARY )
$( AM_LINK)
$( AM_LINK)
db_stress : $( OBJ_DIR ) /db_stress_tool /db_stress .o $( STRESS_LIBRARY ) $( TOOLS_LIBRARY ) $( TESTUTIL ) $( LIBRARY )
db_stress : $( OBJ_DIR ) /db_stress_tool /db_stress .o $( STRESS_LIBRARY ) $( TOOLS_LIBRARY ) $( LIBRARY )
$( AM_LINK)
$( AM_LINK)
write_stress : $( OBJ_DIR ) /tools /write_stress .o $( LIBRARY )
write_stress : $( OBJ_DIR ) /tools /write_stress .o $( LIBRARY )