From 989e714bad5fa7a3332995c9953e8dd13ac9d60d Mon Sep 17 00:00:00 2001 From: "Taro L. Saito" Date: Wed, 15 Nov 2017 12:31:07 -0800 Subject: [PATCH] Run cmake only for Windows --- Makefile | 15 ++++++++++----- .../snappy/native/Windows/x86/snappyjava.dll | Bin 759296 -> 759296 bytes .../native/Windows/x86_64/snappyjava.dll | Bin 782336 -> 782336 bytes 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 4653a71..54940ad 100644 --- a/Makefile +++ b/Makefile @@ -72,6 +72,7 @@ $(SNAPPY_UNPACKED): $(SNAPPY_ARCHIVE) touch $@ $(SNAPPY_GIT_UNPACKED): + @mkdir -p $(SNAPPY_OUT) rm -rf $(SNAPPY_SRC_DIR) @mkdir -p $(SNAPPY_SRC_DIR) git clone $(SNAPPY_GIT_REPO_URL) $(SNAPPY_SRC_DIR) @@ -83,7 +84,9 @@ $(SNAPPY_CMAKE_CACHE): $(SNAPPY_GIT_UNPACKED) cd $(SNAPPY_OUT) && cmake $(SNAPPY_CMAKE_OPTS) -DCMAKE_CXX_COMPILER=$(CXX) ../../$(SNAPPY_SRC_DIR) touch $@ -jni-header: $(SNAPPY_CMAKE_CACHE) $(BITSHUFFLE_UNPACKED) $(SRC)/org/xerial/snappy/SnappyNative.h $(SRC)/org/xerial/snappy/BitShuffleNative.h +jni-header: $(SNAPPY_GIT_UNPACKED) $(BITSHUFFLE_UNPACKED) $(SRC)/org/xerial/snappy/SnappyNative.h $(SRC)/org/xerial/snappy/BitShuffleNative.h + +snappy-header: $(SNAPPY_CMAKE_CACHE) $(TARGET)/jni-classes/org/xerial/snappy/SnappyNative.class: $(SRC)/org/xerial/snappy/SnappyNative.java @mkdir -p $(TARGET)/jni-classes @@ -101,8 +104,10 @@ $(SRC)/org/xerial/snappy/BitShuffleNative.h: $(TARGET)/jni-classes/org/xerial/sn $(SNAPPY_SRC): $(SNAPPY_GIT_UNPACKED) -# Need to use cmake generated header stub -SNAPPY_CXX_OPTS:=-include $(SNAPPY_OUT)/snappy-stubs-public.h +# Need to use cmake generated header stub for Windows +ifeq ($(OS_NAME),Windows) +SNAPPY_CXX_OPTS:=-include$(SNAPPY_OUT)/snappy-stubs-public.h +endif $(SNAPPY_OUT)/%.o: $(SNAPPY_SRC_DIR)/%.cc @mkdir -p $(@D) @@ -157,10 +162,10 @@ test: $(NATIVE_DLL) DOCKER_RUN_OPTS:=--rm win32: jni-header - ./docker/dockcross-windows-x86 -a $(DOCKER_RUN_OPTS) bash -c 'make clean-native native CROSS_PREFIX=i686-w64-mingw32.static- OS_NAME=Windows OS_ARCH=x86 SNAPPY_CMAKE_OPTS="-DHAVE_SYS_UIO_H=0"' + ./docker/dockcross-windows-x86 -a $(DOCKER_RUN_OPTS) bash -c 'make clean-native snappy-header native CROSS_PREFIX=i686-w64-mingw32.static- OS_NAME=Windows OS_ARCH=x86 SNAPPY_CMAKE_OPTS="-DHAVE_SYS_UIO_H=0"' win64: jni-header - ./docker/dockcross-windows-x64 -a $(DOCKER_RUN_OPTS) bash -c 'make clean-native native CROSS_PREFIX=x86_64-w64-mingw32.static- OS_NAME=Windows OS_ARCH=x86_64 SNAPPY_CMAKE_OPTS="-DHAVE_SYS_UIO_H=0"' + ./docker/dockcross-windows-x64 -a $(DOCKER_RUN_OPTS) bash -c 'make clean-native snappy-header native CROSS_PREFIX=x86_64-w64-mingw32.static- OS_NAME=Windows OS_ARCH=x86_64 SNAPPY_CMAKE_OPTS="-DHAVE_SYS_UIO_H=0"' # deprecated mac32: jni-header diff --git a/src/main/resources/org/xerial/snappy/native/Windows/x86/snappyjava.dll b/src/main/resources/org/xerial/snappy/native/Windows/x86/snappyjava.dll index cc012be3f8959f3c1c50d2724840d36c791d852f..0d89ca2e80b560e7b3d8f8ee12782bbc33cf5383 100755 GIT binary patch delta 55 zcmV-70LcGED> diff --git a/src/main/resources/org/xerial/snappy/native/Windows/x86_64/snappyjava.dll b/src/main/resources/org/xerial/snappy/native/Windows/x86_64/snappyjava.dll index cd2e9d68dce2dc22a8dec2f8914c5dc3ead73541..5d2741489222cc385ebddc9d91a6c207c39d19a0 100755 GIT binary patch delta 57 zcmV-90LK4-;4gsSFOb**Bou+#h1vmy+5&~z1BKcIh1vy$+6IN%2Zh=Qh1v;)+6uMW P3o5|^)1$Wr!VCH>43QeQ delta 57 zcmV-90LK4-;4gsSFOb**tq_6Qh1vmy+5&~z1BKcIh1vy$+6IN%2Zh=Qh1v;)+6uMW P3o5|^T%flG!VCH>A-EdC