2013-06-12 22:25:59 +02:00
|
|
|
# Copyright 2013 The Android Open Source Project
|
|
|
|
|
|
|
|
LOCAL_PATH := $(call my-dir)
|
2013-08-14 00:50:42 +02:00
|
|
|
|
2016-11-01 16:29:30 +01:00
|
|
|
include $(CLEAR_VARS)
|
|
|
|
|
2017-07-14 00:10:35 +02:00
|
|
|
LOCAL_MODULE := libhealthd_draw
|
|
|
|
|
|
|
|
LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
|
|
|
|
LOCAL_STATIC_LIBRARIES := \
|
|
|
|
libminui \
|
|
|
|
libbase
|
|
|
|
LOCAL_SRC_FILES := healthd_draw.cpp
|
|
|
|
|
|
|
|
ifneq ($(TARGET_HEALTHD_DRAW_SPLIT_SCREEN),)
|
|
|
|
LOCAL_CFLAGS += -DHEALTHD_DRAW_SPLIT_SCREEN=$(TARGET_HEALTHD_DRAW_SPLIT_SCREEN)
|
|
|
|
else
|
|
|
|
LOCAL_CFLAGS += -DHEALTHD_DRAW_SPLIT_SCREEN=0
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq ($(TARGET_HEALTHD_DRAW_SPLIT_OFFSET),)
|
|
|
|
LOCAL_CFLAGS += -DHEALTHD_DRAW_SPLIT_OFFSET=$(TARGET_HEALTHD_DRAW_SPLIT_OFFSET)
|
|
|
|
else
|
|
|
|
LOCAL_CFLAGS += -DHEALTHD_DRAW_SPLIT_OFFSET=0
|
|
|
|
endif
|
|
|
|
|
2018-05-04 22:53:41 +02:00
|
|
|
LOCAL_HEADER_LIBRARIES := libbatteryservice_headers
|
|
|
|
|
2017-07-14 00:10:35 +02:00
|
|
|
include $(BUILD_STATIC_LIBRARY)
|
|
|
|
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
|
2016-11-01 16:29:30 +01:00
|
|
|
LOCAL_CFLAGS := -Werror
|
|
|
|
ifeq ($(strip $(BOARD_CHARGER_DISABLE_INIT_BLANK)),true)
|
|
|
|
LOCAL_CFLAGS += -DCHARGER_DISABLE_INIT_BLANK
|
|
|
|
endif
|
2016-10-24 22:35:47 +02:00
|
|
|
ifeq ($(strip $(BOARD_CHARGER_ENABLE_SUSPEND)),true)
|
|
|
|
LOCAL_CFLAGS += -DCHARGER_ENABLE_SUSPEND
|
|
|
|
endif
|
2016-11-01 16:29:30 +01:00
|
|
|
|
2016-08-12 00:29:50 +02:00
|
|
|
LOCAL_SRC_FILES := \
|
|
|
|
healthd_mode_charger.cpp \
|
2016-11-01 16:29:30 +01:00
|
|
|
AnimationParser.cpp
|
2016-08-12 00:29:50 +02:00
|
|
|
|
2016-11-01 16:29:30 +01:00
|
|
|
LOCAL_MODULE := libhealthd_charger
|
2018-09-07 00:13:47 +02:00
|
|
|
LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
|
2016-08-12 00:29:50 +02:00
|
|
|
LOCAL_EXPORT_C_INCLUDE_DIRS := \
|
|
|
|
$(LOCAL_PATH) \
|
2016-11-01 16:29:30 +01:00
|
|
|
$(LOCAL_PATH)/include
|
2016-08-12 00:29:50 +02:00
|
|
|
|
|
|
|
LOCAL_STATIC_LIBRARIES := \
|
2017-11-08 19:57:52 +01:00
|
|
|
android.hardware.health@2.0 \
|
2017-12-12 02:32:22 +01:00
|
|
|
android.hardware.health@2.0-impl \
|
2017-11-08 19:57:52 +01:00
|
|
|
android.hardware.health@1.0 \
|
2018-01-13 02:44:33 +01:00
|
|
|
android.hardware.health@1.0-convert \
|
2018-01-11 01:14:28 +01:00
|
|
|
libhealthstoragedefault \
|
2016-08-12 00:29:50 +02:00
|
|
|
libminui \
|
|
|
|
libpng \
|
|
|
|
libz \
|
|
|
|
libutils \
|
|
|
|
libbase \
|
|
|
|
libcutils \
|
2017-07-14 00:10:35 +02:00
|
|
|
libhealthd_draw \
|
2016-08-12 00:29:50 +02:00
|
|
|
liblog \
|
|
|
|
libm \
|
|
|
|
libc \
|
|
|
|
|
2016-11-01 16:29:30 +01:00
|
|
|
ifeq ($(strip $(BOARD_CHARGER_ENABLE_SUSPEND)),true)
|
|
|
|
LOCAL_STATIC_LIBRARIES += libsuspend
|
|
|
|
endif
|
2016-08-12 00:29:50 +02:00
|
|
|
|
2016-11-01 16:29:30 +01:00
|
|
|
include $(BUILD_STATIC_LIBRARY)
|
2016-08-12 00:29:50 +02:00
|
|
|
|
2016-11-01 16:45:19 +01:00
|
|
|
### charger ###
|
2013-06-12 22:25:59 +02:00
|
|
|
include $(CLEAR_VARS)
|
2016-02-13 04:53:15 +01:00
|
|
|
ifeq ($(strip $(BOARD_CHARGER_NO_UI)),true)
|
|
|
|
LOCAL_CHARGER_NO_UI := true
|
|
|
|
endif
|
|
|
|
|
2013-06-12 22:25:59 +02:00
|
|
|
LOCAL_SRC_FILES := \
|
2016-11-02 00:41:56 +01:00
|
|
|
charger.cpp \
|
2016-02-13 04:53:15 +01:00
|
|
|
|
2016-11-01 16:45:19 +01:00
|
|
|
LOCAL_MODULE := charger
|
2013-06-12 22:25:59 +02:00
|
|
|
LOCAL_MODULE_TAGS := optional
|
|
|
|
LOCAL_FORCE_STATIC_EXECUTABLE := true
|
|
|
|
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT_SBIN)
|
|
|
|
LOCAL_UNSTRIPPED_PATH := $(TARGET_ROOT_OUT_SBIN_UNSTRIPPED)
|
2016-11-01 16:29:30 +01:00
|
|
|
LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
|
2013-06-12 22:25:59 +02:00
|
|
|
|
2016-11-01 16:29:30 +01:00
|
|
|
LOCAL_CFLAGS := -Werror
|
2016-02-13 04:53:15 +01:00
|
|
|
ifeq ($(strip $(LOCAL_CHARGER_NO_UI)),true)
|
|
|
|
LOCAL_CFLAGS += -DCHARGER_NO_UI
|
|
|
|
endif
|
2016-10-22 04:16:40 +02:00
|
|
|
|
2017-11-14 03:47:03 +01:00
|
|
|
CHARGER_STATIC_LIBRARIES := \
|
2017-11-08 19:57:52 +01:00
|
|
|
android.hardware.health@2.0-impl \
|
|
|
|
android.hardware.health@2.0 \
|
|
|
|
android.hardware.health@1.0 \
|
2018-01-13 02:44:33 +01:00
|
|
|
android.hardware.health@1.0-convert \
|
2018-10-02 00:50:07 +02:00
|
|
|
libbinderthreadstate \
|
2017-11-08 19:57:52 +01:00
|
|
|
libhidltransport \
|
|
|
|
libhidlbase \
|
2018-04-09 19:40:06 +02:00
|
|
|
libhwbinder_noltopgo \
|
2018-01-11 01:14:28 +01:00
|
|
|
libhealthstoragedefault \
|
2017-11-08 19:57:52 +01:00
|
|
|
libvndksupport \
|
2016-11-01 16:29:30 +01:00
|
|
|
libhealthd_charger \
|
2017-07-14 00:10:35 +02:00
|
|
|
libhealthd_draw \
|
2016-08-12 00:29:50 +02:00
|
|
|
libbatterymonitor \
|
|
|
|
libbase \
|
2016-09-13 17:37:37 +02:00
|
|
|
libutils \
|
2016-08-12 00:29:50 +02:00
|
|
|
libcutils \
|
2018-12-21 21:30:16 +01:00
|
|
|
libprocessgroup \
|
2016-08-12 00:29:50 +02:00
|
|
|
liblog \
|
|
|
|
libm \
|
2016-09-13 17:37:37 +02:00
|
|
|
libc \
|
2013-09-09 21:09:08 +02:00
|
|
|
|
2017-11-14 03:47:03 +01:00
|
|
|
LOCAL_STATIC_LIBRARIES := $(CHARGER_STATIC_LIBRARIES)
|
|
|
|
|
2016-11-01 16:29:30 +01:00
|
|
|
ifneq ($(strip $(LOCAL_CHARGER_NO_UI)),true)
|
|
|
|
LOCAL_STATIC_LIBRARIES += \
|
|
|
|
libminui \
|
|
|
|
libpng \
|
|
|
|
libz \
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
2013-09-09 21:09:08 +02:00
|
|
|
ifeq ($(strip $(BOARD_CHARGER_ENABLE_SUSPEND)),true)
|
|
|
|
LOCAL_STATIC_LIBRARIES += libsuspend
|
|
|
|
endif
|
|
|
|
|
2013-08-14 00:50:42 +02:00
|
|
|
LOCAL_HAL_STATIC_LIBRARIES := libhealthd
|
2013-08-08 00:25:14 +02:00
|
|
|
|
2016-11-01 16:45:19 +01:00
|
|
|
# Symlink /charger to /sbin/charger
|
2013-09-20 19:37:42 +02:00
|
|
|
LOCAL_POST_INSTALL_CMD := $(hide) mkdir -p $(TARGET_ROOT_OUT) \
|
2016-11-01 16:45:19 +01:00
|
|
|
&& ln -sf /sbin/charger $(TARGET_ROOT_OUT)/charger
|
2013-09-09 21:09:08 +02:00
|
|
|
|
2013-09-20 19:37:42 +02:00
|
|
|
include $(BUILD_EXECUTABLE)
|
2013-09-09 21:09:08 +02:00
|
|
|
|
2017-11-14 03:47:03 +01:00
|
|
|
include $(CLEAR_VARS)
|
|
|
|
LOCAL_MODULE := charger_test
|
|
|
|
LOCAL_MODULE_TAGS := optional
|
|
|
|
LOCAL_FORCE_STATIC_EXECUTABLE := true
|
|
|
|
LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
|
|
|
|
LOCAL_CFLAGS := -Wall -Werror -DCHARGER_TEST -DCHARGER_NO_UI
|
|
|
|
LOCAL_STATIC_LIBRARIES := $(CHARGER_STATIC_LIBRARIES)
|
|
|
|
LOCAL_SRC_FILES := \
|
|
|
|
charger.cpp \
|
|
|
|
charger_test.cpp \
|
|
|
|
|
|
|
|
include $(BUILD_EXECUTABLE)
|
|
|
|
|
|
|
|
CHARGER_STATIC_LIBRARIES :=
|
|
|
|
|
2016-02-13 04:53:15 +01:00
|
|
|
ifneq ($(strip $(LOCAL_CHARGER_NO_UI)),true)
|
2013-09-09 21:09:08 +02:00
|
|
|
define _add-charger-image
|
|
|
|
include $$(CLEAR_VARS)
|
2016-08-12 00:29:50 +02:00
|
|
|
LOCAL_MODULE := system_core_charger_res_images_$(notdir $(1))
|
2013-09-09 21:09:08 +02:00
|
|
|
LOCAL_MODULE_STEM := $(notdir $(1))
|
|
|
|
_img_modules += $$(LOCAL_MODULE)
|
|
|
|
LOCAL_SRC_FILES := $1
|
|
|
|
LOCAL_MODULE_TAGS := optional
|
|
|
|
LOCAL_MODULE_CLASS := ETC
|
|
|
|
LOCAL_MODULE_PATH := $$(TARGET_ROOT_OUT)/res/images/charger
|
|
|
|
include $$(BUILD_PREBUILT)
|
|
|
|
endef
|
|
|
|
|
|
|
|
_img_modules :=
|
|
|
|
_images :=
|
|
|
|
$(foreach _img, $(call find-subdir-subdir-files, "images", "*.png"), \
|
|
|
|
$(eval $(call _add-charger-image,$(_img))))
|
|
|
|
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
LOCAL_MODULE := charger_res_images
|
|
|
|
LOCAL_MODULE_TAGS := optional
|
|
|
|
LOCAL_REQUIRED_MODULES := $(_img_modules)
|
|
|
|
include $(BUILD_PHONY_PACKAGE)
|
|
|
|
|
|
|
|
_add-charger-image :=
|
|
|
|
_img_modules :=
|
2016-02-13 04:53:15 +01:00
|
|
|
endif # LOCAL_CHARGER_NO_UI
|