summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2011-01-17 11:47:21 +0000
committerRobin Watts <robin.watts@artifex.com>2011-01-17 11:47:21 +0000
commit2e9e24793634598b397786d6ebbcd3b7d5ffb64a (patch)
tree810c939d7000954c78ccebeeca998e016b59c33a
parent34182c66e954831dd455a07c601dfa6e01536ac8 (diff)
downloadmupdf-2e9e24793634598b397786d6ebbcd3b7d5ffb64a.tar.xz
Changes to make mupdf build under android ndk-r5.
-rw-r--r--android/AndroidManifest.xml2
-rw-r--r--android/ReadMe.txt12
-rw-r--r--android/jni/Android.mk15
-rw-r--r--android/jni/Core.mk19
-rw-r--r--android/jni/ThirdParty.mk12
5 files changed, 35 insertions, 25 deletions
diff --git a/android/AndroidManifest.xml b/android/AndroidManifest.xml
index f58ba5ca..1bea0f8a 100644
--- a/android/AndroidManifest.xml
+++ b/android/AndroidManifest.xml
@@ -7,7 +7,7 @@
android:normalScreens="true"
android:largeScreens="true"
android:anyDensity="true" />
- <uses-sdk android:minSdkVersion="3" />
+ <uses-sdk android:minSdkVersion="8" />
<application android:label="@string/app_name"
android:icon="@drawable/icon"
android:debuggable="true">
diff --git a/android/ReadMe.txt b/android/ReadMe.txt
index 2678d732..6ac64346 100644
--- a/android/ReadMe.txt
+++ b/android/ReadMe.txt
@@ -13,18 +13,24 @@ On linux/macos add the equivalent.
2) Download the android ndk, and install in. On windows I unpacked it as:
- C:\Program Files\android-ndk-r4b
+ C:\Program Files\android-ndk-r5
on Macos as:
- /Library/android-ndk-r4b
+ /Library/android-ndk-r5
-On windows add: C:/Progra~1/android-ndk-r4b to your patyh. On linux/macos
+On windows add: C:/Progra~1/android-ndk-r5 to your path. On linux/macos
add the equivalent.
3) On windows, to use the ndk, you *must* be running under cygwin. This means
you need to install Cygwin 1.7 or greater now.
+In the current release of the ndk (r5), when running under cygwin, there are
+bugs to do with the automatic conversion of dependencies from DOS format
+paths to cygwin format paths. The 2 fixes can be found in:
+
+ <http://groups.google.com/group/android-ndk/msg/b385e47e1484c2d4>
+
4) Bring up a shell, and run 'android'. This will bring up a graphical
gui for the sdk. From here you can install the different SDK components
for the different flavours of android. Download them all - bandwidth and disk
diff --git a/android/jni/Android.mk b/android/jni/Android.mk
index 66c69c9c..0291cded 100644
--- a/android/jni/Android.mk
+++ b/android/jni/Android.mk
@@ -1,17 +1,18 @@
-TOP_LOCAL_PATH := $(call my-dir)
+LOCAL_PATH := $(call my-dir)
+TOP_LOCAL_PATH := $(LOCAL_PATH)
-MUPDF_ROOT := ../..
+MUPDF_ROOT := ..
include $(TOP_LOCAL_PATH)/Core.mk
include $(TOP_LOCAL_PATH)/ThirdParty.mk
-LOCAL_PATH = $(TOP_LOCAL_PATH)
include $(CLEAR_VARS)
-LOCAL_CFLAGS := \
- -I$(LOCAL_PATH)/$(MY_ROOT)/draw \
- -I$(LOCAL_PATH)/$(MY_ROOT)/fitz \
- -I$(LOCAL_PATH)/$(MY_ROOT)/mupdf
+LOCAL_C_INCLUDES := \
+ $(MUPDF_ROOT)/draw \
+ $(MUPDF_ROOT)/fitz \
+ $(MUPDF_ROOT)/mupdf
+LOCAL_CFLAGS :=
LOCAL_MODULE := mupdf
LOCAL_SRC_FILES := mupdf.c
LOCAL_STATIC_LIBRARIES := mupdfcore mupdfthirdparty
diff --git a/android/jni/Core.mk b/android/jni/Core.mk
index 02ad14c2..92da2734 100644
--- a/android/jni/Core.mk
+++ b/android/jni/Core.mk
@@ -4,15 +4,16 @@ include $(CLEAR_VARS)
MY_ROOT := ../..
-LOCAL_CFLAGS := \
- -I$(LOCAL_PATH)/$(MY_ROOT)/thirdparty/jbig2dec \
- -I$(LOCAL_PATH)/$(MY_ROOT)/thirdparty/openjpeg/libopenjpeg \
- -I$(LOCAL_PATH)/$(MY_ROOT)/thirdparty/jpeg \
- -I$(LOCAL_PATH)/$(MY_ROOT)/thirdparty/zlib \
- -I$(LOCAL_PATH)/$(MY_ROOT)/thirdparty/freetype/include \
- -I$(LOCAL_PATH)/$(MY_ROOT)/draw \
- -I$(LOCAL_PATH)/$(MY_ROOT)/fitz \
- -I$(LOCAL_PATH)/$(MY_ROOT)/mupdf
+LOCAL_C_INCLUDES := \
+ ../thirdparty/jbig2dec \
+ ../thirdparty/openjpeg/libopenjpeg \
+ ../thirdparty/jpeg \
+ ../thirdparty/zlib \
+ ../thirdparty/freetype/include \
+ ../draw \
+ ../fitz \
+ ../mupdf \
+ ..
LOCAL_MODULE := mupdfcore
LOCAL_SRC_FILES := \
diff --git a/android/jni/ThirdParty.mk b/android/jni/ThirdParty.mk
index 6fa7ecf8..94c2c0ab 100644
--- a/android/jni/ThirdParty.mk
+++ b/android/jni/ThirdParty.mk
@@ -4,12 +4,14 @@ include $(CLEAR_VARS)
MY_ROOT := ../..
+LOCAL_C_INCLUDES := \
+ ../thirdparty/jbig2dec \
+ ../thirdparty/openjpeg/libopenjpeg \
+ ../thirdparty/jpeg \
+ ../thirdparty/zlib \
+ ../thirdparty/freetype/include \
+
LOCAL_CFLAGS := \
- -I$(LOCAL_PATH)/$(MY_ROOT)/thirdparty/jbig2dec \
- -I$(LOCAL_PATH)/$(MY_ROOT)/thirdparty/openjpeg/libopenjpeg \
- -I$(LOCAL_PATH)/$(MY_ROOT)/thirdparty/jpeg \
- -I$(LOCAL_PATH)/$(MY_ROOT)/thirdparty/zlib \
- -I$(LOCAL_PATH)/$(MY_ROOT)/thirdparty/freetype/include \
-DFT2_BUILD_LIBRARY -DDARWIN_NO_CARBON -DHAVE_STDINT_H
LOCAL_MODULE := mupdfthirdparty