|
|
e63c38 |
diff --git a/Makefile b/Makefile
|
|
|
e63c38 |
index 3495c8f..7b20f5c 100644
|
|
|
e63c38 |
--- a/Makefile
|
|
|
e63c38 |
+++ b/Makefile
|
|
|
e63c38 |
@@ -4,22 +4,24 @@ BUILD_DIR = build
|
|
|
e63c38 |
OBJECTS_DIR = $(BUILD_DIR)/objects
|
|
|
e63c38 |
JNI_HEADERS_DIR = $(BUILD_DIR)/jni-headers
|
|
|
e63c38 |
JNI_SOURCES_DIR = src/jni
|
|
|
e63c38 |
-INCLUDE = -I $(JAVA_HOME)/include -I $(JAVA_HOME)/include/linux
|
|
|
e63c38 |
+LZ4_LIB_DIR = src/lz4/lib
|
|
|
e63c38 |
+INCLUDE = -I $(JAVA_HOME)/include -I $(JAVA_HOME)/include/linux -I $(LZ4_LIB_DIR)
|
|
|
e63c38 |
|
|
|
e63c38 |
-LIBS = -llz4 -lxxhash
|
|
|
e63c38 |
JNI_PREFIX = net_jpountz_
|
|
|
e63c38 |
|
|
|
e63c38 |
default: all move_objects generate_so
|
|
|
e63c38 |
|
|
|
e63c38 |
all:
|
|
|
e63c38 |
+ $(CC) -shared -o $(BUILD_DIR)/liblz4.so -fPIC $(LZ4_LIB_DIR)/lz4.c
|
|
|
e63c38 |
+ $(CC) -shared -o $(BUILD_DIR)/liblz4hc.so -fPIC $(LZ4_LIB_DIR)/lz4hc.c
|
|
|
e63c38 |
+ $(CC) -shared -o $(BUILD_DIR)/liblz4frame.so -fPIC $(LZ4_LIB_DIR)/lz4frame.c
|
|
|
e63c38 |
+ $(CC) -shared -o $(BUILD_DIR)/libxxhash.so -fPIC $(LZ4_LIB_DIR)/xxhash.c
|
|
|
e63c38 |
$(CC) -fPIC -I $(JNI_HEADERS_DIR) \
|
|
|
e63c38 |
$(INCLUDE) \
|
|
|
e63c38 |
- $(LIBS) \
|
|
|
e63c38 |
-c $(JNI_SOURCES_DIR)/$(JNI_PREFIX)lz4_LZ4JNI.c
|
|
|
e63c38 |
|
|
|
e63c38 |
$(CC) -fPIC -I $(JNI_HEADERS_DIR) \
|
|
|
e63c38 |
$(INCLUDE) \
|
|
|
e63c38 |
- $(LIBS) \
|
|
|
e63c38 |
-c $(JNI_SOURCES_DIR)/$(JNI_PREFIX)xxhash_XXHashJNI.c
|
|
|
e63c38 |
|
|
|
e63c38 |
move_objects:
|
|
|
e63c38 |
@@ -28,6 +30,8 @@ move_objects:
|
|
|
e63c38 |
generate_so:
|
|
|
e63c38 |
gcc -fPIC -shared \
|
|
|
e63c38 |
$(OBJECTS_DIR)/*.o \
|
|
|
e63c38 |
- $(LIB_DIR)/liblz4.so \
|
|
|
e63c38 |
- $(LIB_DIR)/libxxhash.so \
|
|
|
e63c38 |
+ $(BUILD_DIR)/liblz4.so \
|
|
|
e63c38 |
+ $(BUILD_DIR)/liblz4hc.so \
|
|
|
e63c38 |
+ $(BUILD_DIR)/liblz4frame.so \
|
|
|
e63c38 |
+ $(BUILD_DIR)/libxxhash.so \
|
|
|
e63c38 |
-o $(BUILD_DIR)/jni/net/jpountz/util/$(PLATFORM)/$(ARCH)/liblz4-java.so
|