summaryrefslogtreecommitdiffstats
path: root/core/product_config.mk
diff options
context:
space:
mode:
Diffstat (limited to 'core/product_config.mk')
-rw-r--r--core/product_config.mk55
1 files changed, 46 insertions, 9 deletions
diff --git a/core/product_config.mk b/core/product_config.mk
index 5240ae7..259d983 100644
--- a/core/product_config.mk
+++ b/core/product_config.mk
@@ -117,7 +117,7 @@ ifdef product_goals
# which really means TARGET_PRODUCT=dream make installclean.
ifneq ($(filter-out $(INTERNAL_VALID_VARIANTS),$(TARGET_BUILD_VARIANT)),)
MAKECMDGOALS := $(MAKECMDGOALS) $(TARGET_BUILD_VARIANT)
- TARGET_BUILD_VARIANT := eng
+ TARGET_BUILD_VARIANT := userdebug
default_goal_substitution :=
else
default_goal_substitution := $(DEFAULT_GOAL)
@@ -179,16 +179,22 @@ include $(BUILD_SYSTEM)/node_fns.mk
include $(BUILD_SYSTEM)/product.mk
include $(BUILD_SYSTEM)/device.mk
-ifneq ($(strip $(TARGET_BUILD_APPS)),)
-# An unbundled app build needs only the core product makefiles.
-all_product_configs := $(call get-product-makefiles,\
- $(SRC_TARGET_DIR)/product/AndroidProducts.mk)
+# A CM build needs only the CM product makefiles.
+ifneq ($(CM_BUILD),)
+ all_product_configs := $(shell find device -path "*/$(CM_BUILD)/cm.mk")
else
-# Read in all of the product definitions specified by the AndroidProducts.mk
-# files in the tree.
-all_product_configs := $(get-all-product-makefiles)
-endif
+ ifneq ($(strip $(TARGET_BUILD_APPS)),)
+ # An unbundled app build needs only the core product makefiles.
+ all_product_configs := $(call get-product-makefiles,\
+ $(SRC_TARGET_DIR)/product/AndroidProducts.mk)
+ else
+ # Read in all of the product definitions specified by the AndroidProducts.mk
+ # files in the tree.
+ all_product_configs := $(get-all-product-makefiles)
+ endif # TARGET_BUILD_APPS
+endif # CM_BUILD
+ifeq ($(CM_BUILD),)
# Find the product config makefile for the current product.
# all_product_configs consists items like:
# <product_name>:<path_to_the_product_makefile>
@@ -207,12 +213,18 @@ $(foreach f, $(all_product_configs),\
$(eval all_product_makefiles += $(f))\
$(if $(filter $(TARGET_PRODUCT),$(basename $(notdir $(f)))),\
$(eval current_product_makefile += $(f)),)))
+
_cpm_words :=
_cpm_word1 :=
_cpm_word2 :=
+else
+ current_product_makefile := $(strip $(all_product_configs))
+ all_product_makefiles := $(strip $(all_product_configs))
+endif
current_product_makefile := $(strip $(current_product_makefile))
all_product_makefiles := $(strip $(all_product_makefiles))
+
ifneq (,$(filter product-graph dump-products, $(MAKECMDGOALS)))
# Import all product makefiles.
$(call import-products, $(all_product_makefiles))
@@ -331,6 +343,28 @@ endif
# The optional :<owner> is used to indicate the owner of a vendor file.
PRODUCT_COPY_FILES := \
$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_COPY_FILES))
+_boot_animation := $(strip $(lastword $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_BOOTANIMATION)))
+ifneq ($(_boot_animation),)
+PRODUCT_COPY_FILES += \
+ $(_boot_animation):system/media/bootanimation.zip
+endif
+_boot_animation :=
+
+# We might want to skip items listed in PRODUCT_COPY_FILES for
+# various reasons. This is useful for replacing a binary module with one
+# built from source. This should be a list of destination files under $OUT
+PRODUCT_COPY_FILES_OVERRIDES := \
+ $(addprefix %:, $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_COPY_FILES_OVERRIDES)))
+
+ifneq ($(PRODUCT_COPY_FILES_OVERRIDES),)
+ PRODUCT_COPY_FILES := $(filter-out $(PRODUCT_COPY_FILES_OVERRIDES), $(PRODUCT_COPY_FILES))
+endif
+
+.PHONY: listcopies
+listcopies:
+ @echo "Copy files: $(PRODUCT_COPY_FILES)"
+ @echo "Overrides: $(PRODUCT_COPY_FILES_OVERRIDES)"
+
# A list of property assignments, like "key = value", with zero or more
# whitespace characters on either side of the '='.
@@ -343,6 +377,9 @@ PRODUCT_PROPERTY_OVERRIDES := \
PRODUCT_DEFAULT_PROPERTY_OVERRIDES := \
$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_DEFAULT_PROPERTY_OVERRIDES))
+PRODUCT_BUILD_PROP_OVERRIDES := \
+ $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_BUILD_PROP_OVERRIDES))
+
# Should we use the default resources or add any product specific overlays
PRODUCT_PACKAGE_OVERLAYS := \
$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PACKAGE_OVERLAYS))