summaryrefslogtreecommitdiff
path: root/jni
diff options
context:
space:
mode:
Diffstat (limited to 'jni')
-rw-r--r--jni/Android.mk2
-rw-r--r--jni/Application.mk2
-rw-r--r--jni/libmspack.mk15
-rw-r--r--jni/unshield.mk14
4 files changed, 32 insertions, 1 deletions
diff --git a/jni/Android.mk b/jni/Android.mk
index b0cbf4c..fd15b4e 100644
--- a/jni/Android.mk
+++ b/jni/Android.mk
@@ -15,6 +15,8 @@ include jni/SDL_mixer/Android.mk
LOCAL_PATH := .
include jni/SDL_mixer.vorbis.mk
include jni/boost.mk
+include jni/libmspack.mk
+include jni/unshield.mk
include jni/OpenAL.mk
include jni/SDL_sound.mk
include jni/physfs.mk
diff --git a/jni/Application.mk b/jni/Application.mk
index 91f5cd6..dd8341a 100644
--- a/jni/Application.mk
+++ b/jni/Application.mk
@@ -4,5 +4,5 @@ APP_OPTIM := release
APP_STL := c++_static
APP_CPPFLAGS := -std=c++11 -frtti -fexceptions
APP_CFLAGS := -fsigned-char -UNDEBUG
-APP_MODULES := mkxp easyrpg physfs-serve
+APP_MODULES := mkxp easyrpg physfs-serve cabextract unshield
APP_DEBUG := 1
diff --git a/jni/libmspack.mk b/jni/libmspack.mk
new file mode 100644
index 0000000..f7e53f8
--- /dev/null
+++ b/jni/libmspack.mk
@@ -0,0 +1,15 @@
+include $(CLEAR_VARS)
+LOCAL_C_INCLUDES := jni/libmspack/libmspack/mspack
+LOCAL_EXPORT_C_INCLUDES := $(LOCAL_C_INCLUDES)
+LOCAL_MODULE := mspack
+LOCAL_SRC_FILES := $(filter-out %/debug.c, $(wildcard jni/libmspack/libmspack/mspack/*.c))
+include $(BUILD_STATIC_LIBRARY)
+
+include $(CLEAR_VARS)
+LOCAL_CFLAGS := -DVERSION=\"1.9.1\" -DHAVE_MKDIR -DHAVE_ICONV -DHAVE_UMASK -DICONV_CONST= -pie
+LOCAL_C_INCLUDES := jni/libmspack/cabextract
+LOCAL_EXPORT_C_INCLUDES := $(LOCAL_C_INCLUDES)
+LOCAL_MODULE := cabextract
+LOCAL_SRC_FILES := jni/libmspack/cabextract/src/cabextract.c jni/libmspack/cabextract/md5.c
+LOCAL_STATIC_LIBRARIES := mspack iconv
+include $(BUILD_SHARED_LIBRARY)
diff --git a/jni/unshield.mk b/jni/unshield.mk
new file mode 100644
index 0000000..1d1d406
--- /dev/null
+++ b/jni/unshield.mk
@@ -0,0 +1,14 @@
+include $(CLEAR_VARS)
+LOCAL_CFLAGS := -DHAVE_ICONV -DUSE_OUR_OWN_MD5 -DSIZE_FORMAT=\"%%zu\" -pie
+LOCAL_C_INCLUDES := jni/unshield
+LOCAL_EXPORT_C_INCLUDES := $(LOCAL_C_INCLUDES)
+LOCAL_MODULE := unshield
+LOCAL_SRC_FILES := jni/unshield/src/unshield.c $(wildcard jni/unshield/lib/*.c) jni/unshield/lib/md5/md5c.c jni/unshield/lib/convert_utf/ConvertUTF.c
+LOCAL_STATIC_LIBRARIES := iconv
+LOCAL_LDLIBS := -lz
+
+jni/unshield/lib/unshield_config.h:
+ touch $@
+
+unshield: jni/unshield/lib/unshield_config.h
+include $(BUILD_SHARED_LIBRARY)