diff options
author | Ying Wang <wangying@google.com> | 2013-04-10 19:17:41 -0700 |
---|---|---|
committer | Ying Wang <wangying@google.com> | 2013-04-10 22:06:02 -0700 |
commit | 3e55609134381cadfc3b69657a5598dc3d8f2e35 (patch) | |
tree | f48df39a0e62ffb82e7c49aa412c08e2b110a63a /core/package.mk | |
parent | c04a8282229b624eb3aff506fb72e5fcf27b258f (diff) | |
download | build-3e55609134381cadfc3b69657a5598dc3d8f2e35.zip build-3e55609134381cadfc3b69657a5598dc3d8f2e35.tar.gz build-3e55609134381cadfc3b69657a5598dc3d8f2e35.tar.bz2 |
Support to dist unbundled files for bundled build
Usage:
LOCAL_DIST_BUNDLED_BINARIES := true
The dist files will include the jni shared libraries and the apk with
jni libraries stripped.
Bug: 8181626
Change-Id: I4a047d786ad35b948b4ad7a51adf37321dbe395c
Diffstat (limited to 'core/package.mk')
-rw-r--r-- | core/package.mk | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/core/package.mk b/core/package.mk index 25af8da..2012351 100644 --- a/core/package.mk +++ b/core/package.mk @@ -447,6 +447,29 @@ endif PACKAGES := $(PACKAGES) $(LOCAL_PACKAGE_NAME) +# Dist the files that can be bundled in system.img. +# They include the jni shared libraries and the apk with jni libraries stripped. +ifeq ($(LOCAL_DIST_BUNDLED_BINARIES),true) +ifneq ($(filter $(LOCAL_PACKAGE_NAME),$(TARGET_BUILD_APPS)),) +ifneq ($(strip $(jni_shared_libraries)),) +dist_subdir := bundled_$(LOCAL_PACKAGE_NAME) +$(foreach f, $(jni_shared_libraries), \ + $(call dist-for-goals, apps_only, $(f):$(dist_subdir)/$(notdir $(f)))) + +apk_jni_stripped := $(intermediates)/jni_stripped/package.apk +$(apk_jni_stripped): PRIVATE_JNI_SHARED_LIBRARIES := $(notdir $(jni_shared_libraries)) +$(apk_jni_stripped) : $(LOCAL_BUILT_MODULE) | $(ZIPALIGN) + @rm -rf $(dir $@) && mkdir -p $(dir $@) + $(hide) cp $< $@ + $(hide) zip -d $@ $(foreach f,$(PRIVATE_JNI_SHARED_LIBRARIES),\*/$(f)) + $(call align-package) + +$(call dist-for-goals, apps_only, $(apk_jni_stripped):$(dist_subdir)/$(LOCAL_PACKAGE_NAME).apk) + +endif # jni_shared_libraries +endif # apps_only build +endif # LOCAL_DIST_BUNDLED_BINARIES + # Lint phony targets .PHONY: lint-$(LOCAL_PACKAGE_NAME) lint-$(LOCAL_PACKAGE_NAME): PRIVATE_PATH := $(LOCAL_PATH) |