@ -344,6 +344,8 @@ ifeq ($(HAVE_POWER8),1)
LIB_CC_OBJECTS = $( LIB_SOURCES:.cc= .o)
LIB_CC_OBJECTS = $( LIB_SOURCES:.cc= .o)
LIBOBJECTS += $( LIB_SOURCES_C:.c= .o)
LIBOBJECTS += $( LIB_SOURCES_C:.c= .o)
LIBOBJECTS += $( LIB_SOURCES_ASM:.S= .o)
LIBOBJECTS += $( LIB_SOURCES_ASM:.S= .o)
e l s e
LIB_CC_OBJECTS = $( LIB_SOURCES:.cc= .o)
e n d i f
e n d i f
LIBOBJECTS += $( TOOL_LIB_SOURCES:.cc= .o)
LIBOBJECTS += $( TOOL_LIB_SOURCES:.cc= .o)
@ -1653,8 +1655,9 @@ libzstd.a:
cp zstd-$( ZSTD_VER) /lib/libzstd.a .
cp zstd-$( ZSTD_VER) /lib/libzstd.a .
# A version of each $(LIBOBJECTS) compiled with -fPIC and a fixed set of static compression libraries
# A version of each $(LIBOBJECTS) compiled with -fPIC and a fixed set of static compression libraries
java_static_libobjects = $( patsubst %,jls/%,$( LIBOBJECTS) )
java_static_libobjects = $( patsubst %,jls/%,$( LIB_CC_ OBJECTS) )
CLEAN_FILES += jls
CLEAN_FILES += jls
java_static_all_libobjects = $( java_static_libobjects)
i f n e q ( $( ROCKSDB_JAVA_NO_COMPRESSION ) , 1 )
i f n e q ( $( ROCKSDB_JAVA_NO_COMPRESSION ) , 1 )
JAVA_COMPRESSIONS = libz.a libbz2.a libsnappy.a liblz4.a libzstd.a
JAVA_COMPRESSIONS = libz.a libbz2.a libsnappy.a liblz4.a libzstd.a
@ -1663,15 +1666,30 @@ endif
JAVA_STATIC_FLAGS = -DZLIB -DBZIP2 -DSNAPPY -DLZ4 -DZSTD
JAVA_STATIC_FLAGS = -DZLIB -DBZIP2 -DSNAPPY -DLZ4 -DZSTD
JAVA_STATIC_INCLUDES = -I./zlib-$( ZLIB_VER) -I./bzip2-$( BZIP2_VER) -I./snappy-$( SNAPPY_VER) -I./lz4-$( LZ4_VER) /lib -I./zstd-$( ZSTD_VER) /lib
JAVA_STATIC_INCLUDES = -I./zlib-$( ZLIB_VER) -I./bzip2-$( BZIP2_VER) -I./snappy-$( SNAPPY_VER) -I./lz4-$( LZ4_VER) /lib -I./zstd-$( ZSTD_VER) /lib
i f e q ( $( HAVE_POWER 8) , 1 )
JAVA_STATIC_C_LIBOBJECTS = $( patsubst %.c.o,jls/%.c.o,$( LIB_SOURCES_C:.c= .o) )
JAVA_STATIC_ASM_LIBOBJECTS = $( patsubst %.S.o,jls/%.S.o,$( LIB_SOURCES_ASM:.S= .o) )
java_static_ppc_libobjects = $( JAVA_STATIC_C_LIBOBJECTS) $( JAVA_STATIC_ASM_LIBOBJECTS)
jls/util/crc32c_ppc.o : util /crc 32c_ppc .c
$( AM_V_CC) $( CC) $( CFLAGS) $( JAVA_STATIC_FLAGS) $( JAVA_STATIC_INCLUDES) -c $< -o $@
jls/util/crc32c_ppc_asm.o : util /crc 32c_ppc_asm .S
$( AM_V_CC) $( CC) $( CFLAGS) $( JAVA_STATIC_FLAGS) $( JAVA_STATIC_INCLUDES) -c $< -o $@
java_static_all_libobjects += $( java_static_ppc_libobjects)
e n d i f
$(java_static_libobjects) : jls /%.o : %.cc $( JAVA_COMPRESSIONS )
$(java_static_libobjects) : jls /%.o : %.cc $( JAVA_COMPRESSIONS )
$( AM_V_CC) mkdir -p $( @D) && $( CXX) $( CXXFLAGS) $( JAVA_STATIC_FLAGS) $( JAVA_STATIC_INCLUDES) -fPIC -c $< -o $@ $( COVERAGEFLAGS)
$( AM_V_CC) mkdir -p $( @D) && $( CXX) $( CXXFLAGS) $( JAVA_STATIC_FLAGS) $( JAVA_STATIC_INCLUDES) -fPIC -c $< -o $@ $( COVERAGEFLAGS)
rocksdbjavastatic : $( java_static_libobjects )
rocksdbjavastatic : $( java_static_all_ libobjects )
cd java; $( MAKE) javalib;
cd java; $( MAKE) javalib;
rm -f ./java/target/$( ROCKSDBJNILIB)
rm -f ./java/target/$( ROCKSDBJNILIB)
$( CXX) $( CXXFLAGS) -I./java/. $( JAVA_INCLUDE) -shared -fPIC \
$( CXX) $( CXXFLAGS) -I./java/. $( JAVA_INCLUDE) -shared -fPIC \
-o ./java/target/$( ROCKSDBJNILIB) $( JNI_NATIVE_SOURCES) \
-o ./java/target/$( ROCKSDBJNILIB) $( JNI_NATIVE_SOURCES) \
$( java_static_libobjects) $( COVERAGEFLAGS) \
$( java_static_all_ libobjects) $( COVERAGEFLAGS) \
$( JAVA_COMPRESSIONS) $( JAVA_STATIC_LDFLAGS)
$( JAVA_COMPRESSIONS) $( JAVA_STATIC_LDFLAGS)
cd java/target; strip $( STRIPFLAGS) $( ROCKSDBJNILIB)
cd java/target; strip $( STRIPFLAGS) $( ROCKSDBJNILIB)
cd java; jar -cf target/$( ROCKSDB_JAR) HISTORY*.md
cd java; jar -cf target/$( ROCKSDB_JAR) HISTORY*.md