summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
Diffstat (limited to 'main')
-rw-r--r--main/jni/Android.mk15
-rw-r--r--main/src/main/java/de/blinkt/openvpn/core/NativeUtils.java4
2 files changed, 16 insertions, 3 deletions
diff --git a/main/jni/Android.mk b/main/jni/Android.mk
index df8cbb34..342c66dc 100644
--- a/main/jni/Android.mk
+++ b/main/jni/Android.mk
@@ -46,13 +46,22 @@ endif
LOCAL_PATH := $(JNI_DIR)
-# The only real JNI library
+# The only real JNI libraries
include $(CLEAR_VARS)
LOCAL_LDLIBS := -llog -lz
LOCAL_CFLAGS = --std=c99
-LOCAL_C_INCLUDES := openssl/include openssl/crypto openssl
-LOCAL_SRC_FILES:= jniglue.c jbcrypto.cpp scan_ifs.c
+LOCAL_SRC_FILES:= jniglue.c scan_ifs.c
LOCAL_MODULE = opvpnutil
+include $(BUILD_SHARED_LIBRARY)
+
+
+# The only real JNI libraries
+include $(CLEAR_VARS)
+LOCAL_LDLIBS := -llog -lz
+LOCAL_CFLAGS = --std=c99
+LOCAL_C_INCLUDES := openssl/include openssl/crypto openssl
+LOCAL_SRC_FILES:= jbcrypto.cpp
+LOCAL_MODULE = jbcrypto
LOCAL_SHARED_LIBRARIES := libcrypto
include $(BUILD_SHARED_LIBRARY)
diff --git a/main/src/main/java/de/blinkt/openvpn/core/NativeUtils.java b/main/src/main/java/de/blinkt/openvpn/core/NativeUtils.java
index f67b7730..27c9120a 100644
--- a/main/src/main/java/de/blinkt/openvpn/core/NativeUtils.java
+++ b/main/src/main/java/de/blinkt/openvpn/core/NativeUtils.java
@@ -5,6 +5,8 @@
package de.blinkt.openvpn.core;
+import android.os.Build;
+
import java.security.InvalidKeyException;
public class NativeUtils {
@@ -15,5 +17,7 @@ public class NativeUtils {
static {
System.loadLibrary("stlport_shared");
System.loadLibrary("opvpnutil");
+ if (Build.VERSION.SDK_INT== Build.VERSION_CODES.JELLY_BEAN)
+ System.loadLibrary("jbcrypto");
}
}