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