Velocity/native/compile-osx.sh

12 lines
689 B
Bash
Raw Normal View History

2018-08-02 10:22:09 +08:00
#!/bin/bash
# Modify as you need.
2018-12-25 01:18:36 +08:00
MBEDTLS_ROOT=mbedtls
2018-08-02 10:22:09 +08:00
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home
CFLAGS="-O3 -I$JAVA_HOME/include/ -I$JAVA_HOME/include/darwin/ -fPIC -shared"
clang $CFLAGS -lz src/main/c/jni_util.c src/main/c/jni_zlib_deflate.c src/main/c/jni_zlib_inflate.c \
2019-01-12 03:13:13 +08:00
src/main/c/jni_zlib_common.c -o src/main/resources/macosx/velocity-compress.dylib
clang $CFLAGS -I $MBEDTLS_ROOT/include -shared $MBEDTLS_ROOT/library/aes.c $MBEDTLS_ROOT/library/aesni.c \
$MBEDTLS_ROOT/library/platform.c $MBEDTLS_ROOT/library/platform_util.c src/main/c/jni_util.c src/main/c/jni_cipher.c \
-o src/main/resources/macosx/velocity-cipher.dylib