From 637744ce155dd80e2d5faa923e9074f2fac2f2b3 Mon Sep 17 00:00:00 2001 From: Ankit Gupta Date: Mon, 7 Jul 2014 20:50:21 -0700 Subject: [PATCH] Package .so file with JNI jar --- java/Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/java/Makefile b/java/Makefile index 7a9c64732..287fe1021 100644 --- a/java/Makefile +++ b/java/Makefile @@ -3,6 +3,11 @@ NATIVE_JAVA_CLASSES = org.rocksdb.RocksDB org.rocksdb.Options org.rocksdb.WriteB NATIVE_INCLUDE = ./include ROCKSDB_JAR = rocksdbjni.jar +ROCKSDBJNILIB = ./librocksdbjni.so +ifeq ($(PLATFORM), OS_MACOSX) + ROCKSDBJNILIB = ./librocksdbjni.jnilib +endif + clean: -find . -name "*.class" -exec rm {} \; -find . -name "hs*.log" -exec rm {} \; @@ -11,7 +16,7 @@ clean: java: javac org/rocksdb/util/*.java org/rocksdb/*.java @cp ../HISTORY.md ./HISTORY-CPP.md - jar -cf $(ROCKSDB_JAR) org/rocksdb/*.class org/rocksdb/util/*.class HISTORY*.md + jar -cf $(ROCKSDB_JAR) org/rocksdb/*.class org/rocksdb/util/*.class HISTORY*.md $(ROCKSDBJNILIB) @rm -f ./HISTORY-CPP.md javah -d $(NATIVE_INCLUDE) -jni $(NATIVE_JAVA_CLASSES)