summaryrefslogtreecommitdiff
path: root/android
diff options
context:
space:
mode:
authorPaul Gardiner <paulg.artifex@glidos.net>2012-10-10 16:14:39 +0100
committerPaul Gardiner <paulg.artifex@glidos.net>2012-10-10 16:14:39 +0100
commiteae647babea3730d2af1d1882707db355bd660ac (patch)
tree1be5613a162ede4cc875bcc9e2f80fd5f5a3ced1 /android
parent0567433564717b0cc34efde669b7e7489e00d07c (diff)
downloadmupdf-eae647babea3730d2af1d1882707db355bd660ac.tar.xz
android: v8 build
Diffstat (limited to 'android')
-rw-r--r--android/jni/Android.mk3
-rw-r--r--android/jni/Application.mk3
-rw-r--r--android/jni/Core.mk14
3 files changed, 19 insertions, 1 deletions
diff --git a/android/jni/Android.mk b/android/jni/Android.mk
index 2e84204e..91fface9 100644
--- a/android/jni/Android.mk
+++ b/android/jni/Android.mk
@@ -18,5 +18,8 @@ LOCAL_SRC_FILES := mupdf.c
LOCAL_STATIC_LIBRARIES := mupdfcore mupdfthirdparty
LOCAL_LDLIBS := -lm -llog -ljnigraphics
+ifdef V8_BUILD
+LOCAL_LDLIBS += -L$(MUPDF_ROOT)/thirdparty/v8-3.9/android -lv8_base -lv8_snapshot
+endif
include $(BUILD_SHARED_LIBRARY)
diff --git a/android/jni/Application.mk b/android/jni/Application.mk
index 50e03f81..441243d8 100644
--- a/android/jni/Application.mk
+++ b/android/jni/Application.mk
@@ -2,6 +2,9 @@
APP_PLATFORM=android-8
APP_ABI := armeabi armeabi-v7a
APP_OPTIM := debug
+ifdef V8_BUILD
+APP_STL := stlport_static
+endif
# Workaround bug in the ndk
NDK_TOOLCHAIN_VERSION=4.4.3
diff --git a/android/jni/Core.mk b/android/jni/Core.mk
index f1d309f3..202a8168 100644
--- a/android/jni/Core.mk
+++ b/android/jni/Core.mk
@@ -8,6 +8,7 @@ OPENJPEG := openjpeg
JPEG := jpeg
ZLIB := zlib
FREETYPE := freetype
+V8 := v8-3.9
LOCAL_CFLAGS += -DARCH_ARM -DARCH_THUMB -DARCH_ARM_CAN_LOAD_UNALIGNED
@@ -24,6 +25,9 @@ LOCAL_C_INCLUDES := \
../cbz \
../scripts \
..
+ifdef V8_BUILD
+LOCAL_C_INCLUDES += ../thirdparty/$(V8)/include
+endif
LOCAL_MODULE := mupdfcore
LOCAL_SRC_FILES := \
@@ -94,7 +98,6 @@ LOCAL_SRC_FILES := \
$(MY_ROOT)/pdf/pdf_function.c \
$(MY_ROOT)/pdf/pdf_image.c \
$(MY_ROOT)/pdf/pdf_interpret.c \
- $(MY_ROOT)/pdf/pdf_js_none.c \
$(MY_ROOT)/pdf/pdf_lex.c \
$(MY_ROOT)/pdf/pdf_metrics.c \
$(MY_ROOT)/pdf/pdf_nametree.c \
@@ -126,6 +129,15 @@ LOCAL_SRC_FILES := \
$(MY_ROOT)/xps/xps_xml.c \
$(MY_ROOT)/xps/xps_zip.c \
$(MY_ROOT)/cbz/mucbz.c
+ifdef V8_BUILD
+LOCAL_SRC_FILES += \
+ $(MY_ROOT)/pdf/pdf_js.c \
+ $(MY_ROOT)/pdf/pdf_jsimp_cpp.c \
+ $(MY_ROOT)/pdf/pdf_jsimp_v8.cpp
+else
+LOCAL_SRC_FILES += \
+ $(MY_ROOT)/pdf/pdf_js_none.c
+endif
LOCAL_LDLIBS := -lm -llog -ljnigraphics