Android mupdf for MIPS and x86 arch

im currently using MuPDF in my Android application, when I built it from a source (based on ReadMe.txt), it only generates a .so file for armeabi and armeabi-v7a , but not x86 and MIPS when I run the application on armature devices (Samsung Galaxy Tab 7), it looks good. But not in MIPS arch. my question is how can I generate x86 and MIPS file of shared objects? if any other solution, I will appreciate it ...

PS: I am using android ndk r8d , I tried changing using android-ndk-r6b , but I have the same problem.

+4
source share
1 answer

If you look in android / jni / Application.mk in the mupdf source, you will see the line:

 APP_ABI = armeabi armeabi-v7a 

You can do it:

 APP_ABI = armeabi armeabi-v7a x86 mips 

or even:

 APP_ABI = all 

to include other architectures.

This will cause problems now, since the android / jni / Core.mk and android / jni / Core2.mk files define -DARCH_ARM and -DARCH_THUMB (as of the time of writing, only ARM processors are supported by Android). For the preprocessor, this takes a bit of magic:

 ifeq ($(TARGET_ARCH),arm) LOCAL_CFLAGS += -DARCH_ARM -DARCH_THUMB -DARCH_ARM_CAN_LOAD_UNALIGNED ifdef NDK_PROFILER LOCAL_CFLAGS += -pg -DNDK_PROFILER -O2 endif endif LOCAL_CFLAGS += -DAA_BITS=8 

I'll get fixes for them - check out our git repository over the next few days. EDIT: Bug fix.

+7
source

All Articles