summaryrefslogtreecommitdiff
path: root/platform/android/viewer/jni
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2016-11-15 17:41:15 +0000
committerRobin Watts <robin.watts@artifex.com>2016-11-15 18:30:57 +0000
commit0c28c2aad6bfebf436c13a06db70413166d15d6d (patch)
treef19d3465c12b572ebb283cdb4748149e0adade07 /platform/android/viewer/jni
parente84b0b0354a7ecf474600f55e1799d72affc2dfd (diff)
downloadmupdf-0c28c2aad6bfebf436c13a06db70413166d15d6d.tar.xz
Update JNI code to load 32 or 64 bit DLL as appropriate.
Make the JNI code detect whether it is running on a 32 or 64 bit machine, and change the name of the DLL appropriately. Update Android Makefile to make mupdf_java32 instead of mupdf_java. Update Java Makefile to make mupdf_java32 or mupdf_java64 based on the system it is running on. This choice can be overruled by defining BITS to be "32" or "64" before calling make. Update Windows Solution to make mupdf_java32 or mupdf_java64 as appropriate.
Diffstat (limited to 'platform/android/viewer/jni')
-rw-r--r--platform/android/viewer/jni/Android.mk2
-rw-r--r--platform/android/viewer/jni/mupdf.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/platform/android/viewer/jni/Android.mk b/platform/android/viewer/jni/Android.mk
index 27f481a8..4e6038d4 100644
--- a/platform/android/viewer/jni/Android.mk
+++ b/platform/android/viewer/jni/Android.mk
@@ -19,7 +19,7 @@ LOCAL_C_INCLUDES := \
$(MUPDF_ROOT)/source/pdf \
$(MUPDF_ROOT)/platform/java
LOCAL_CFLAGS := -DHAVE_ANDROID
-LOCAL_MODULE := mupdf_java
+LOCAL_MODULE := mupdf_java32
LOCAL_SRC_FILES := \
mupdf.c \
diff --git a/platform/android/viewer/jni/mupdf.c b/platform/android/viewer/jni/mupdf.c
index 701390a6..581da497 100644
--- a/platform/android/viewer/jni/mupdf.c
+++ b/platform/android/viewer/jni/mupdf.c
@@ -290,7 +290,7 @@ JNI_FN(MuPDFCore_openFile)(JNIEnv * env, jobject thiz, jstring jfilename)
jclass clazz;
#ifdef NDK_PROFILER
- monstartup("libmupdf_java.so");
+ monstartup("libmupdf_java32.so");
#endif
clazz = (*env)->GetObjectClass(env, thiz);
@@ -441,7 +441,7 @@ JNI_FN(MuPDFCore_openBuffer)(JNIEnv * env, jobject thiz, jstring jmagic)
const char *magic;
#ifdef NDK_PROFILER
- monstartup("libmupdf_java.so");
+ monstartup("libmupdf_java32.so");
#endif
clazz = (*env)->GetObjectClass(env, thiz);