diff options
Diffstat (limited to 'healthd/Android.mk')
-rw-r--r-- | healthd/Android.mk | 36 |
1 files changed, 34 insertions, 2 deletions
diff --git a/healthd/Android.mk b/healthd/Android.mk index 07e1d73..f509ace 100644 --- a/healthd/Android.mk +++ b/healthd/Android.mk @@ -9,6 +9,12 @@ LOCAL_CFLAGS := -Werror include $(BUILD_STATIC_LIBRARY) include $(CLEAR_VARS) +LOCAL_SRC_FILES := healthd_board_msm.cpp +LOCAL_MODULE := libhealthd.qcom +LOCAL_CFLAGS := -Werror +include $(BUILD_STATIC_LIBRARY) + +include $(CLEAR_VARS) LOCAL_SRC_FILES := \ healthd.cpp \ @@ -25,6 +31,19 @@ LOCAL_UNSTRIPPED_PATH := $(TARGET_ROOT_OUT_SBIN_UNSTRIPPED) LOCAL_CFLAGS := -D__STDC_LIMIT_MACROS -Werror +HEALTHD_CHARGER_DEFINES := RED_LED_PATH \ + GREEN_LED_PATH \ + BLUE_LED_PATH \ + BLINK_PATH \ + BACKLIGHT_PATH \ + CHARGING_ENABLED_PATH + +$(foreach healthd_charger_define,$(HEALTHD_CHARGER_DEFINES), \ + $(if $($(healthd_charger_define)), \ + $(eval LOCAL_CFLAGS += -D$(healthd_charger_define)=\"$($(healthd_charger_define))\") \ + ) \ +) + ifeq ($(strip $(BOARD_CHARGER_DISABLE_INIT_BLANK)),true) LOCAL_CFLAGS += -DCHARGER_DISABLE_INIT_BLANK endif @@ -33,6 +52,10 @@ ifeq ($(strip $(BOARD_CHARGER_ENABLE_SUSPEND)),true) LOCAL_CFLAGS += -DCHARGER_ENABLE_SUSPEND endif +ifeq ($(strip $(BOARD_NO_CHARGER_LED)),true) +LOCAL_CFLAGS += -DNO_CHARGER_LED +endif + LOCAL_C_INCLUDES := bootable/recovery LOCAL_STATIC_LIBRARIES := libbatteryservice libbinder libminui libpng libz libutils libstdc++ libcutils liblog libm libc @@ -43,9 +66,13 @@ endif LOCAL_HAL_STATIC_LIBRARIES := libhealthd +ifeq ($(BOARD_USES_QCOM_HARDWARE),true) +BOARD_HAL_STATIC_LIBRARIES ?= libhealthd.qcom +endif + # Symlink /charger to /sbin/healthd LOCAL_POST_INSTALL_CMD := $(hide) mkdir -p $(TARGET_ROOT_OUT) \ - && ln -sf /sbin/healthd $(TARGET_ROOT_OUT)/charger + && rm -f $(TARGET_ROOT_OUT)/charger && ln -sf /sbin/healthd $(TARGET_ROOT_OUT)/charger include $(BUILD_EXECUTABLE) @@ -63,8 +90,13 @@ include $$(BUILD_PREBUILT) endef _img_modules := +ifeq ($(strip $(BOARD_HEALTHD_CUSTOM_CHARGER_RES)),) +IMAGES_DIR := images +else +IMAGES_DIR := ../../../$(BOARD_HEALTHD_CUSTOM_CHARGER_RES) +endif _images := -$(foreach _img, $(call find-subdir-subdir-files, "images", "*.png"), \ +$(foreach _img, $(call find-subdir-subdir-files, "$(IMAGES_DIR)", "*.png"), \ $(eval $(call _add-charger-image,$(_img)))) include $(CLEAR_VARS) |