Merge pull request #409 from fyrz/RocksJava-Make-cleanup

[RocksJava] Build improvements
This commit is contained in:
Yueh-Hsuan Chiang 2014-11-20 00:01:48 -08:00
commit 1fd1aecb39
2 changed files with 11 additions and 3 deletions

View file

@ -594,9 +594,10 @@ libsnappy.a:
rocksdbjavastatic: libz.a libbz2.a libsnappy.a
OPT="-fPIC -DNDEBUG -O2" $(MAKE) $(LIBRARY) -j
cd java;$(MAKE) java;
cd java;$(MAKE) javalib;
rm -f ./java/$(ROCKSDBJNILIB)
$(CXX) $(CXXFLAGS) -I./java/. $(JAVA_INCLUDE) -shared -fPIC -o ./java/$(ROCKSDBJNILIB) $(JNI_NATIVE_SOURCES) $(LIBOBJECTS) $(COVERAGEFLAGS) libz.a libbz2.a libsnappy.a
cd java;strip $(ROCKSDBJNILIB)
cd java;jar -cf $(ROCKSDB_JAR) org/rocksdb/*.class org/rocksdb/util/*.class HISTORY*.md $(ROCKSDBJNILIB)
cd java/javadoc;jar -cf ../$(ROCKSDB_JAVADOCS_JAR) *
cd java;jar -cf $(ROCKSDB_SOURCES_JAR) org
@ -615,7 +616,7 @@ rocksdbjavastaticpublish: rocksdbjavastaticrelease
rocksdbjava:
OPT="-fPIC -DNDEBUG -O2" $(MAKE) $(LIBRARY) -j32
cd java;$(MAKE) java;
cd java;$(MAKE) javalib;
rm -f ./java/$(ROCKSDBJNILIB)
$(CXX) $(CXXFLAGS) -I./java/. $(JAVA_INCLUDE) -shared -fPIC -o ./java/$(ROCKSDBJNILIB) $(JNI_NATIVE_SOURCES) $(LIBOBJECTS) $(JAVA_LDFLAGS) $(COVERAGEFLAGS)
cd java;jar -cf $(ROCKSDB_JAR) org/rocksdb/*.class org/rocksdb/util/*.class HISTORY*.md $(ROCKSDBJNILIB)

View file

@ -86,13 +86,20 @@ JAVA_TESTCLASSPATH = $(ROCKSDB_JAR):$(JAVA_JUNIT_JAR):$(JAVA_HAMCR_JAR):$(JAVA_M
clean:
-find . -name "*.class" -exec rm {} \;
-find . -name "hs*.log" -exec rm {} \;
rm -rf include/*
rm -rf javadoc/*
rm -rf test-libs/
rm -rf target
rm librocksdbjni*
rm rocksdbjni*
javadocs:
mkdir -p javadoc; javadoc -d javadoc -sourcepath . -subpackages org -exclude org.rocksdb.test
java: javadocs resolve_test_deps
javalib: java javadocs
java: resolve_test_deps
javac org/rocksdb/util/*.java org/rocksdb/*.java
javac -cp $(JAVA_TESTCLASSPATH) org/rocksdb/test/*.java
@cp ../HISTORY.md ./HISTORY-CPP.md