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) |
Luca Stefani | 5c60e4f | 2017-08-17 19:28:48 +0200 | [diff] [blame] | 18 | LOCAL_SRC_FILES := healthd_board_lineage.cpp |
| 19 | LOCAL_MODULE := libhealthd.lineage |
Steve Kondik | 7595620 | 2016-08-07 23:21:29 -0700 | [diff] [blame] | 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 \ |
Adrian DC | f69910d | 2017-07-24 16:41:53 +0200 | [diff] [blame] | 23 | system/core/base/include \ |
| 24 | bootable/recovery/minui/include |
Adrian DC | cadd0be | 2016-08-14 11:44:31 +0200 | [diff] [blame] | 25 | ifneq ($(BACKLIGHT_PATH),) |
| 26 | LOCAL_CFLAGS += -DHEALTHD_BACKLIGHT_PATH=\"$(BACKLIGHT_PATH)\" |
| 27 | endif |
| 28 | ifneq ($(SECONDARY_BACKLIGHT_PATH),) |
| 29 | LOCAL_CFLAGS += -DHEALTHD_SECONDARY_BACKLIGHT_PATH=\"$(SECONDARY_BACKLIGHT_PATH)\" |
| 30 | endif |
| 31 | ifneq ($(HEALTHD_BACKLIGHT_LEVEL),) |
| 32 | LOCAL_CFLAGS += -DHEALTHD_BACKLIGHT_LEVEL=$(HEALTHD_BACKLIGHT_LEVEL) |
| 33 | endif |
Steve Kondik | 7595620 | 2016-08-07 23:21:29 -0700 | [diff] [blame] | 34 | include $(BUILD_STATIC_LIBRARY) |
| 35 | |
| 36 | include $(CLEAR_VARS) |
| 37 | LOCAL_MODULE := font_log.png |
Ricardo Cerqueira | 5bf4527 | 2016-10-13 13:24:39 +0100 | [diff] [blame] | 38 | LOCAL_SRC_FILES := fonts/$(healthd_density)/font_log.png |
Steve Kondik | 7595620 | 2016-08-07 23:21:29 -0700 | [diff] [blame] | 39 | LOCAL_MODULE_TAGS := optional |
| 40 | LOCAL_MODULE_CLASS := ETC |
| 41 | LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)/res/images |
| 42 | include $(BUILD_PREBUILT) |
| 43 | |
| 44 | include $(CLEAR_VARS) |
| 45 | |
| 46 | define _add-charger-image |
| 47 | include $$(CLEAR_VARS) |
Luca Stefani | 5c60e4f | 2017-08-17 19:28:48 +0200 | [diff] [blame] | 48 | LOCAL_MODULE := vendor_lineage_charger_$(notdir $(1)) |
Steve Kondik | 7595620 | 2016-08-07 23:21:29 -0700 | [diff] [blame] | 49 | LOCAL_MODULE_STEM := $(notdir $(1)) |
| 50 | _img_modules += $$(LOCAL_MODULE) |
| 51 | LOCAL_SRC_FILES := $1 |
| 52 | LOCAL_MODULE_TAGS := optional |
| 53 | LOCAL_MODULE_CLASS := ETC |
| 54 | LOCAL_MODULE_PATH := $$(TARGET_ROOT_OUT)/res/images/charger |
| 55 | include $$(BUILD_PREBUILT) |
| 56 | endef |
| 57 | |
| 58 | _img_modules := |
| 59 | _images := |
Ricardo Cerqueira | 5bf4527 | 2016-10-13 13:24:39 +0100 | [diff] [blame] | 60 | $(foreach _img, $(call find-subdir-subdir-files, "images/$(healthd_density)", "*.png"), \ |
Steve Kondik | 7595620 | 2016-08-07 23:21:29 -0700 | [diff] [blame] | 61 | $(eval $(call _add-charger-image,$(_img)))) |
| 62 | |
| 63 | include $(CLEAR_VARS) |
Luca Stefani | 5c60e4f | 2017-08-17 19:28:48 +0200 | [diff] [blame] | 64 | LOCAL_MODULE := lineage_charger_res_images |
Steve Kondik | 7595620 | 2016-08-07 23:21:29 -0700 | [diff] [blame] | 65 | LOCAL_MODULE_TAGS := optional |
| 66 | LOCAL_REQUIRED_MODULES := $(_img_modules) |
| 67 | LOCAL_OVERRIDES_PACKAGES := charger_res_images |
| 68 | include $(BUILD_PHONY_PACKAGE) |
| 69 | |
| 70 | _add-charger-image := |
| 71 | _img_modules := |