@ -34,10 +34,22 @@ ifeq ($(MAKECMDGOALS),shared_lib)
OPT += -DNDEBUG
e n d i f
i f e q ( $( MAKECMDGOALS ) , i n s t a l l - s h a r e d )
OPT += -DNDEBUG
e n d i f
i f e q ( $( MAKECMDGOALS ) , s t a t i c _ l i b )
OPT += -DNDEBUG
e n d i f
i f e q ( $( MAKECMDGOALS ) , i n s t a l l - s t a t i c )
OPT += -DNDEBUG
e n d i f
i f e q ( $( MAKECMDGOALS ) , i n s t a l l )
OPT += -DNDEBUG
e n d i f
#-----------------------------------------------
i n c l u d e s r c . m k
@ -124,27 +136,6 @@ PLATFORM_CXXFLAGS += -isystem $(GTEST_DIR)
# This (the first rule) must depend on "all".
default : all
#-------------------------------------------------
# make install related stuff
INSTALL_PATH ?= /usr/local
uninstall :
rm -rf $( INSTALL_PATH) /include/rocksdb \
$( INSTALL_PATH) /lib/$( LIBRARY) \
$( INSTALL_PATH) /lib/$( SHARED)
install :
install -d $( INSTALL_PATH) /lib
for header_dir in ` find "include/rocksdb" -type d` ; do \
install -d $( INSTALL_PATH) /$$ header_dir; \
done
for header in ` find "include/rocksdb" -type f -name *.h` ; do \
install -C -m 644 $$ header $( INSTALL_PATH) /$$ header; \
done
[ ! -e $( LIBRARY) ] || install -C -m 755 $( LIBRARY) $( INSTALL_PATH) /lib
[ -n '$(SHARED)' ] && install -C -m 755 $( SHARED) $( INSTALL_PATH) /lib
#-------------------------------------------------
WARNING_FLAGS = -W -Wextra -Wall -Wsign-compare -Wshadow \
-Wno-unused-parameter
@ -325,7 +316,8 @@ endif # PLATFORM_SHARED_EXT
.PHONY : blackbox_crash_test check clean coverage crash_test ldb_tests package \
release tags valgrind_check whitebox_crash_test format static_lib shared_lib all \
dbg rocksdbjavastatic rocksdbjava install uninstall analyze
dbg rocksdbjavastatic rocksdbjava install install-static install-shared uninstall \
analyze
all : $( LIBRARY ) $( BENCHMARKS ) $( TOOLS ) $( TESTS )
@ -812,6 +804,43 @@ sst_dump: tools/sst_dump.o $(LIBOBJECTS)
ldb : tools /ldb .o $( LIBOBJECTS )
$( AM_LINK)
#-------------------------------------------------
# make install related stuff
INSTALL_PATH ?= /usr/local
uninstall :
rm -rf $( INSTALL_PATH) /include/rocksdb \
$( INSTALL_PATH) /lib/$( LIBRARY) \
$( INSTALL_PATH) /lib/$( SHARED4) \
$( INSTALL_PATH) /lib/$( SHARED3) \
$( INSTALL_PATH) /lib/$( SHARED2) \
$( INSTALL_PATH) /lib/$( SHARED1)
install-headers :
install -d $( INSTALL_PATH) /lib
for header_dir in ` find "include/rocksdb" -type d` ; do \
install -d $( INSTALL_PATH) /$$ header_dir; \
done
for header in ` find "include/rocksdb" -type f -name *.h` ; do \
install -C -m 644 $$ header $( INSTALL_PATH) /$$ header; \
done
install-static : install -headers $( LIBRARY )
install -C -m 755 $( LIBRARY) $( INSTALL_PATH) /lib
install-shared : install -headers $( SHARED 4)
install -C -m 755 $( SHARED4) $( INSTALL_PATH) /lib && \
ln -fs $( SHARED4) $( INSTALL_PATH) /lib/$( SHARED3) && \
ln -fs $( SHARED4) $( INSTALL_PATH) /lib/$( SHARED2) && \
ln -fs $( SHARED4) $( INSTALL_PATH) /lib/$( SHARED1)
# install static by default + install shared if it exists
install : install -static
[ -e $( SHARED4) ] && $( MAKE) install-shared
#-------------------------------------------------
# ---------------------------------------------------------------------------
# Jni stuff
# ---------------------------------------------------------------------------