diff options
author | Ying Wang <wangying@google.com> | 2011-10-13 17:31:45 -0700 |
---|---|---|
committer | Ying Wang <wangying@google.com> | 2011-10-13 17:31:45 -0700 |
commit | 32fa8a313cf7b94396761dd09addb2d80848b336 (patch) | |
tree | 1d215f246837fcccd456862807ceeb60646e9da5 /core | |
parent | df9a8ab186f1b8ed7df7a9a59932c6a8d0a04b25 (diff) | |
download | build-32fa8a313cf7b94396761dd09addb2d80848b336.zip build-32fa8a313cf7b94396761dd09addb2d80848b336.tar.gz build-32fa8a313cf7b94396761dd09addb2d80848b336.tar.bz2 |
Support to package prebuilt NDK libstlport_shared.so into apk
To package libstlport_shared.so, use the following syntax in the app
module definition:
LOCAL_NDK_STL_VARIANT := stlport_shared
LOCAL_NDK_VERSION := <num>
The rationale behind is:
The NDK prebiult libstlport_shared.so is intentionally different from
the system libstlport.so.
Essentially they are slightly different versions of the library so
shouldn't be mixed up.
libstlport.so is used by the system, but not exposed by the NDK, it is
routinely tweaked in various ways between platform releases, and there
is no guarantee that its ABI is stable, or that it will not be replaced
by something else in the future.
libstlport_shared.so is typically distributed with application packages,
and should not be part of the system.
Change-Id: I72c9911781f7d8402687e9891f3f605f3a60be22
Diffstat (limited to 'core')
-rw-r--r-- | core/package.mk | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/core/package.mk b/core/package.mk index 398e487..b894f99 100644 --- a/core/package.mk +++ b/core/package.mk @@ -289,6 +289,18 @@ jni_shared_libraries := \ $(addsuffix $(so_suffix), \ $(LOCAL_JNI_SHARED_LIBRARIES))) +# App explicitly requires the prebuilt NDK libstlport_shared.so. +# libstlport_shared.so should never go to the system image. +# Instead it should be packaged into the apk. +ifeq (stlport_shared,$(LOCAL_NDK_STL_VARIANT)) +ifndef LOCAL_NDK_VERSION +$(error LOCAL_NDK_VERSION has to be defined together with LOCAL_NDK_STL_VARIANT, \ + LOCAL_PACKAGE_NAME=$(LOCAL_PACKAGE_NAME)) +endif +jni_shared_libraries += \ + $(HISTORICAL_NDK_VERSIONS_ROOT)/android-ndk-r$(LOCAL_NDK_VERSION)/sources/cxx-stl/stlport/libs/$(TARGET_CPU_ABI)/libstlport_shared.so +endif + # Set the abi directory used by the local JNI shared libraries. # (Doesn't change how the local shared libraries are compiled, just # sets where they are stored in the apk.) |