mirror of
https://github.com/fhgwright/SCSI2SD.git
synced 2025-01-08 13:29:54 +00:00
41 lines
1.3 KiB
Plaintext
41 lines
1.3 KiB
Plaintext
libzipper
|
|
Michael McMaster <michael@codesrc.com>
|
|
|
|
Pre-Requisites
|
|
Android NDK (tested with android-ndk-r6)
|
|
Existing Android project
|
|
|
|
NDK Limitations
|
|
* Your Application.mk file must enable C++ exceptions with:
|
|
APP_CPPFLAGS := -fexceptions -frtti
|
|
Although the NDK supports exceptions as of r5, they are disabled by
|
|
default for backwards compatibility.
|
|
|
|
* Your Application.mk file must specify a C++ STL implementation with
|
|
exception support. As of r6, only gnustl_static provides exception support.
|
|
APP_STL := gnustl_static
|
|
|
|
Note that this port doesn't include any JNI interface code. It is expected that
|
|
libzipper will be called from other native code libraries, and not directly
|
|
from Java.
|
|
|
|
Including libzipper in your NDK project:
|
|
1) Modify your Application.mk file to include the module, and
|
|
set APP_CPPFLAGS and APP_STL as stated under "NDK Limitations" above.
|
|
|
|
APP_CPPFLAGS += -fexceptions -frtti
|
|
APP_STL := gnustl_static
|
|
APP_MODULES += zipper
|
|
|
|
2) Modify your applications Android.mk file to import the libzipper module:
|
|
|
|
LOCAL_STATIC_LIBRARIES += libzipper
|
|
$(call import-module,zipper)
|
|
|
|
3) Set the NDK_MODULE_PATH variable to include the libzipper source directory
|
|
when calling ndk-build.
|
|
eg. If libzipper was extracted to /tmp/libzipper-1.0.3:
|
|
|
|
cd /path/to/your/ndk/application
|
|
ndk-build NDK_MODULE_PATH="/tmp/libzipper-1.0.3/android"
|