summaryrefslogtreecommitdiff
path: root/platform/java/Android.mk
diff options
context:
space:
mode:
Diffstat (limited to 'platform/java/Android.mk')
-rw-r--r--platform/java/Android.mk19
1 files changed, 19 insertions, 0 deletions
diff --git a/platform/java/Android.mk b/platform/java/Android.mk
index 1b880fac..7adf1487 100644
--- a/platform/java/Android.mk
+++ b/platform/java/Android.mk
@@ -10,6 +10,9 @@
# The top-level Makefile will invoke ndk-build with appropriate arguments
# if you run 'make android'.
#
+# Use the MUPDF_EXTRA_CFLAGS, MUPDF_EXTRA_CPPFLAGS, MUPDF_EXTRA_LDFLAGS,
+# and MUPDF_EXTRA_LDLIBS variables to add more compiler flags.
+#
# LOCAL_C_INCLUDES paths are relative to the NDK root directory.
# LOCAL_SRC_FILES paths are relative to LOCAL_PATH.
#
@@ -57,6 +60,9 @@ LOCAL_CFLAGS := \
-DTOFU_NOTO -DTOFU_CJK \
-DAA_BITS=8 \
+LOCAL_CFLAGS += \
+ $(MUPDF_EXTRA_CFLAGS)
+
LOCAL_SRC_FILES += \
$(wildcard $(MUPDF_PATH)/source/fitz/*.c) \
$(wildcard $(MUPDF_PATH)/source/pdf/*.c) \
@@ -98,6 +104,9 @@ LOCAL_CFLAGS := \
-DHAVE_STDINT_H \
-DOPJ_STATIC -DOPJ_HAVE_INTTYPES_H -DOPJ_HAVE_STDINT_H -DUSE_JPIP \
+LOCAL_CFLAGS += \
+ $(MUPDF_EXTRA_CFLAGS)
+
LOCAL_CPPFLAGS := \
-ffunction-sections -fdata-sections \
-fno-rtti -fno-exceptions -fvisibility-inlines-hidden --std=c++0x \
@@ -107,6 +116,9 @@ LOCAL_CPPFLAGS := \
-Dhb_realloc_impl=fz_hb_realloc \
-Dhb_free_impl=fz_hb_free \
+LOCAL_CPPFLAGS += \
+ $(MUPDF_EXTRA_CPPFLAGS)
+
LOCAL_SRC_FILES += \
$(MUPDF_PATH)/thirdparty/freetype/src/base/ftbase.c \
$(MUPDF_PATH)/thirdparty/freetype/src/base/ftbbox.c \
@@ -297,11 +309,18 @@ LOCAL_C_INCLUDES := \
LOCAL_CFLAGS := \
-DHAVE_ANDROID
+LOCAL_CFLAGS += \
+ $(MUPDF_EXTRA_CFLAGS)
+
LOCAL_SRC_FILES := \
$(MUPDF_PATH)/platform/java/mupdf_native.c
LOCAL_STATIC_LIBRARIES := mupdf_core mupdf_thirdparty
+
LOCAL_LDLIBS := -ljnigraphics -llog -lm
+LOCAL_LDLIBS += $(MUDPF_EXTRA_LDLIBS)
+
LOCAL_LDFLAGS := -Wl,--gc-sections
+LOCAL_LDFLAGS += $(MUDPF_EXTRA_LDFLAGS)
include $(BUILD_SHARED_LIBRARY)