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