blob: f2bdde2d734735ebe35ffd15ab5d667204e42108 [file] [log] [blame]
Steve Kondik75956202016-08-07 23:21:29 -07001LOCAL_PATH := $(call my-dir)
2
Ricardo Cerqueira5bf45272016-10-13 13:24:39 +01003# Set healthd_density to the density bucket of the device.
4healthd_density := unknown
5ifneq (,$(TARGET_RECOVERY_DENSITY))
6healthd_density := $(filter %dpi,$(TARGET_RECOVERY_DENSITY))
7else
8ifneq (,$(PRODUCT_AAPT_PREF_CONFIG))
9# If PRODUCT_AAPT_PREF_CONFIG includes a dpi bucket, then use that value.
10healthd_density := $(filter %dpi,$(PRODUCT_AAPT_PREF_CONFIG))
11else
12# Otherwise, use the default medium density.
13healthd_density := mdpi
14endif
15endif
16
Steve Kondik75956202016-08-07 23:21:29 -070017include $(CLEAR_VARS)
18LOCAL_SRC_FILES := healthd_board_cm.cpp
19LOCAL_MODULE := libhealthd.cm
20LOCAL_CFLAGS := -Werror
21LOCAL_C_INCLUDES := \
Luca Stefani7d2b6d22016-08-25 14:41:17 +020022 system/core/healthd/include \
Steve Kondik75956202016-08-07 23:21:29 -070023 bootable/recovery
Adrian DCcadd0be2016-08-14 11:44:31 +020024ifneq ($(BACKLIGHT_PATH),)
25 LOCAL_CFLAGS += -DHEALTHD_BACKLIGHT_PATH=\"$(BACKLIGHT_PATH)\"
26endif
27ifneq ($(SECONDARY_BACKLIGHT_PATH),)
28 LOCAL_CFLAGS += -DHEALTHD_SECONDARY_BACKLIGHT_PATH=\"$(SECONDARY_BACKLIGHT_PATH)\"
29endif
30ifneq ($(HEALTHD_BACKLIGHT_LEVEL),)
31 LOCAL_CFLAGS += -DHEALTHD_BACKLIGHT_LEVEL=$(HEALTHD_BACKLIGHT_LEVEL)
32endif
Steve Kondik75956202016-08-07 23:21:29 -070033include $(BUILD_STATIC_LIBRARY)
34
35include $(CLEAR_VARS)
36LOCAL_MODULE := font_log.png
Ricardo Cerqueira5bf45272016-10-13 13:24:39 +010037LOCAL_SRC_FILES := fonts/$(healthd_density)/font_log.png
Steve Kondik75956202016-08-07 23:21:29 -070038LOCAL_MODULE_TAGS := optional
39LOCAL_MODULE_CLASS := ETC
40LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)/res/images
41include $(BUILD_PREBUILT)
42
43include $(CLEAR_VARS)
44
45define _add-charger-image
46include $$(CLEAR_VARS)
47LOCAL_MODULE := vendor_cm_charger_$(notdir $(1))
48LOCAL_MODULE_STEM := $(notdir $(1))
49_img_modules += $$(LOCAL_MODULE)
50LOCAL_SRC_FILES := $1
51LOCAL_MODULE_TAGS := optional
52LOCAL_MODULE_CLASS := ETC
53LOCAL_MODULE_PATH := $$(TARGET_ROOT_OUT)/res/images/charger
54include $$(BUILD_PREBUILT)
55endef
56
57_img_modules :=
58_images :=
Ricardo Cerqueira5bf45272016-10-13 13:24:39 +010059$(foreach _img, $(call find-subdir-subdir-files, "images/$(healthd_density)", "*.png"), \
Steve Kondik75956202016-08-07 23:21:29 -070060 $(eval $(call _add-charger-image,$(_img))))
61
62include $(CLEAR_VARS)
63LOCAL_MODULE := cm_charger_res_images
64LOCAL_MODULE_TAGS := optional
65LOCAL_REQUIRED_MODULES := $(_img_modules)
66LOCAL_OVERRIDES_PACKAGES := charger_res_images
67include $(BUILD_PHONY_PACKAGE)
68
69_add-charger-image :=
70_img_modules :=