From c01780611a2a5a2df6c53b47e8868d592d8ea40b Mon Sep 17 00:00:00 2001 From: keunyoung Date: Mon, 22 Jul 2013 14:54:58 -0700 Subject: [PATCH] add PDK_PLATFORM_ZIP_PRODUCT_BINARIES to allow adding product specific binaries to platform.zip - This can be used to deliver stuffs like kernel symbol file. - Files are added in relative path from the top of android source tree. - PDK_PLATFORM_ZIP_PRODUCT_BINARIES will be defined in BoardConfig.mk. - files under out dir will be rejected to prevent possible conflicts. bug: 9963432 Change-Id: Id1da643534cd86939df4941f39e4414d343bba99 --- core/Makefile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/core/Makefile b/core/Makefile index 171936f099..d6f4cfda6e 100644 --- a/core/Makefile +++ b/core/Makefile @@ -875,6 +875,11 @@ endif ####### ## platform.zip: system, plus other files to be used in PDK fusion build, ## in a zip file +## +## PDK_PLATFORM_ZIP_PRODUCT_BINARIES is used to store specified files to platform.zip. +## The variable will be typically set from BoardConfig.mk. +## Files under out dir will be rejected to prevent possible conflicts with other rules. +PDK_PLATFORM_ZIP_PRODUCT_BINARIES := $(filter-out $(OUT_DIR)/%,$(PDK_PLATFORM_ZIP_PRODUCT_BINARIES)) INSTALLED_PLATFORM_ZIP := $(PRODUCT_OUT)/platform.zip $(INSTALLED_PLATFORM_ZIP) : $(INTERNAL_SYSTEMIMAGE_FILES) $(call pretty,"Platform zip package: $(INSTALLED_PLATFORM_ZIP)") @@ -886,7 +891,9 @@ $(INSTALLED_PLATFORM_ZIP) : $(INTERNAL_SYSTEMIMAGE_FILES) ifeq (true,$(PLATFORM_ZIP_ADD_JAVA)) $(hide) cd $(OUT_DIR) && zip -qry $(patsubst $(OUT_DIR)/%,%,$@) $(PDK_PLATFORM_JAVA_ZIP_CONTENTS) endif - +ifneq ($(PDK_PLATFORM_ZIP_PRODUCT_BINARIES),) + $(hide) zip -qry $@ $(PDK_PLATFORM_ZIP_PRODUCT_BINARIES) +endif .PHONY: platform platform: $(INSTALLED_PLATFORM_ZIP)