Todd Poynor | 752faf2 | 2013-06-12 13:25:59 -0700 | [diff] [blame] | 1 | # Copyright 2013 The Android Open Source Project |
| 2 | |
Todd Poynor | 752faf2 | 2013-06-12 13:25:59 -0700 | [diff] [blame] | 3 | LOCAL_PATH := $(call my-dir) |
Todd Poynor | d65104c | 2013-08-13 15:50:42 -0700 | [diff] [blame] | 4 | |
Tao Bao | f2455d8 | 2018-09-07 12:52:46 -0700 | [diff] [blame^] | 5 | ### libhealthd_draw ### |
Todd Poynor | d65104c | 2013-08-13 15:50:42 -0700 | [diff] [blame] | 6 | include $(CLEAR_VARS) |
Sandeep Patil | fca8244 | 2016-11-01 08:29:30 -0700 | [diff] [blame] | 7 | |
Luke Song | 1d540dd | 2017-07-13 15:10:35 -0700 | [diff] [blame] | 8 | LOCAL_MODULE := libhealthd_draw |
| 9 | |
| 10 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH) |
Tao Bao | f2455d8 | 2018-09-07 12:52:46 -0700 | [diff] [blame^] | 11 | LOCAL_STATIC_LIBRARIES := libminui |
| 12 | LOCAL_SHARED_LIBRARIES := libbase |
Luke Song | 1d540dd | 2017-07-13 15:10:35 -0700 | [diff] [blame] | 13 | LOCAL_SRC_FILES := healthd_draw.cpp |
| 14 | |
| 15 | ifneq ($(TARGET_HEALTHD_DRAW_SPLIT_SCREEN),) |
| 16 | LOCAL_CFLAGS += -DHEALTHD_DRAW_SPLIT_SCREEN=$(TARGET_HEALTHD_DRAW_SPLIT_SCREEN) |
| 17 | else |
| 18 | LOCAL_CFLAGS += -DHEALTHD_DRAW_SPLIT_SCREEN=0 |
| 19 | endif |
| 20 | |
| 21 | ifneq ($(TARGET_HEALTHD_DRAW_SPLIT_OFFSET),) |
| 22 | LOCAL_CFLAGS += -DHEALTHD_DRAW_SPLIT_OFFSET=$(TARGET_HEALTHD_DRAW_SPLIT_OFFSET) |
| 23 | else |
| 24 | LOCAL_CFLAGS += -DHEALTHD_DRAW_SPLIT_OFFSET=0 |
| 25 | endif |
| 26 | |
Yifan Hong | 9a81d54 | 2018-05-04 13:53:41 -0700 | [diff] [blame] | 27 | LOCAL_HEADER_LIBRARIES := libbatteryservice_headers |
| 28 | |
Luke Song | 1d540dd | 2017-07-13 15:10:35 -0700 | [diff] [blame] | 29 | include $(BUILD_STATIC_LIBRARY) |
| 30 | |
Tao Bao | f2455d8 | 2018-09-07 12:52:46 -0700 | [diff] [blame^] | 31 | ### libhealthd_charger ### |
Luke Song | 1d540dd | 2017-07-13 15:10:35 -0700 | [diff] [blame] | 32 | include $(CLEAR_VARS) |
| 33 | |
Sandeep Patil | fca8244 | 2016-11-01 08:29:30 -0700 | [diff] [blame] | 34 | LOCAL_CFLAGS := -Werror |
| 35 | ifeq ($(strip $(BOARD_CHARGER_DISABLE_INIT_BLANK)),true) |
| 36 | LOCAL_CFLAGS += -DCHARGER_DISABLE_INIT_BLANK |
| 37 | endif |
| 38 | ifeq ($(strip $(BOARD_CHARGER_ENABLE_SUSPEND)),true) |
| 39 | LOCAL_CFLAGS += -DCHARGER_ENABLE_SUSPEND |
| 40 | endif |
| 41 | |
| 42 | LOCAL_SRC_FILES := \ |
| 43 | healthd_mode_charger.cpp \ |
| 44 | AnimationParser.cpp |
| 45 | |
| 46 | LOCAL_MODULE := libhealthd_charger |
Tao Bao | b6ccc78 | 2018-09-06 15:13:47 -0700 | [diff] [blame] | 47 | LOCAL_C_INCLUDES := $(LOCAL_PATH)/include |
Sandeep Patil | fca8244 | 2016-11-01 08:29:30 -0700 | [diff] [blame] | 48 | LOCAL_EXPORT_C_INCLUDE_DIRS := \ |
| 49 | $(LOCAL_PATH) \ |
| 50 | $(LOCAL_PATH)/include |
| 51 | |
| 52 | LOCAL_STATIC_LIBRARIES := \ |
Hridya Valsaraju | ffb1303 | 2017-12-11 17:32:22 -0800 | [diff] [blame] | 53 | android.hardware.health@2.0-impl \ |
Hridya Valsaraju | 7fa7225 | 2018-01-12 17:44:33 -0800 | [diff] [blame] | 54 | android.hardware.health@1.0-convert \ |
Hridya Valsaraju | 89178e7 | 2018-01-10 16:14:28 -0800 | [diff] [blame] | 55 | libhealthstoragedefault \ |
Tao Bao | f2455d8 | 2018-09-07 12:52:46 -0700 | [diff] [blame^] | 56 | libhealthd_draw \ |
Damien Bargiacchi | 565ba02 | 2016-08-11 15:29:50 -0700 | [diff] [blame] | 57 | libminui \ |
Tao Bao | f2455d8 | 2018-09-07 12:52:46 -0700 | [diff] [blame^] | 58 | |
| 59 | LOCAL_SHARED_LIBRARIES := \ |
| 60 | android.hardware.health@2.0 \ |
Damien Bargiacchi | 565ba02 | 2016-08-11 15:29:50 -0700 | [diff] [blame] | 61 | libbase \ |
| 62 | libcutils \ |
| 63 | liblog \ |
Tao Bao | f2455d8 | 2018-09-07 12:52:46 -0700 | [diff] [blame^] | 64 | libpng \ |
| 65 | libutils \ |
Damien Bargiacchi | 565ba02 | 2016-08-11 15:29:50 -0700 | [diff] [blame] | 66 | |
Sandeep Patil | fca8244 | 2016-11-01 08:29:30 -0700 | [diff] [blame] | 67 | ifeq ($(strip $(BOARD_CHARGER_ENABLE_SUSPEND)),true) |
Tao Bao | f2455d8 | 2018-09-07 12:52:46 -0700 | [diff] [blame^] | 68 | LOCAL_SHARED_LIBRARIES += libsuspend |
Sandeep Patil | fca8244 | 2016-11-01 08:29:30 -0700 | [diff] [blame] | 69 | endif |
| 70 | |
Damien Bargiacchi | 565ba02 | 2016-08-11 15:29:50 -0700 | [diff] [blame] | 71 | include $(BUILD_STATIC_LIBRARY) |
| 72 | |
Sandeep Patil | 6012db5 | 2016-11-01 08:45:19 -0700 | [diff] [blame] | 73 | ### charger ### |
Damien Bargiacchi | 565ba02 | 2016-08-11 15:29:50 -0700 | [diff] [blame] | 74 | include $(CLEAR_VARS) |
Todd Poynor | 7c5a3e1 | 2016-02-12 19:53:15 -0800 | [diff] [blame] | 75 | ifeq ($(strip $(BOARD_CHARGER_NO_UI)),true) |
| 76 | LOCAL_CHARGER_NO_UI := true |
| 77 | endif |
Todd Poynor | 7c5a3e1 | 2016-02-12 19:53:15 -0800 | [diff] [blame] | 78 | |
Todd Poynor | 752faf2 | 2013-06-12 13:25:59 -0700 | [diff] [blame] | 79 | LOCAL_SRC_FILES := \ |
Sandeep Patil | 526f8cf | 2016-11-01 16:41:56 -0700 | [diff] [blame] | 80 | charger.cpp \ |
Todd Poynor | 7c5a3e1 | 2016-02-12 19:53:15 -0800 | [diff] [blame] | 81 | |
Sandeep Patil | 6012db5 | 2016-11-01 08:45:19 -0700 | [diff] [blame] | 82 | LOCAL_MODULE := charger |
Sandeep Patil | fca8244 | 2016-11-01 08:29:30 -0700 | [diff] [blame] | 83 | LOCAL_C_INCLUDES := $(LOCAL_PATH)/include |
Todd Poynor | 752faf2 | 2013-06-12 13:25:59 -0700 | [diff] [blame] | 84 | |
Sandeep Patil | fca8244 | 2016-11-01 08:29:30 -0700 | [diff] [blame] | 85 | LOCAL_CFLAGS := -Werror |
Todd Poynor | 7c5a3e1 | 2016-02-12 19:53:15 -0800 | [diff] [blame] | 86 | ifeq ($(strip $(LOCAL_CHARGER_NO_UI)),true) |
| 87 | LOCAL_CFLAGS += -DCHARGER_NO_UI |
| 88 | endif |
Nick Vaccaro | 1f1a6fd | 2016-10-21 19:16:40 -0700 | [diff] [blame] | 89 | |
Yifan Hong | b7cd45f | 2017-11-13 18:47:03 -0800 | [diff] [blame] | 90 | CHARGER_STATIC_LIBRARIES := \ |
Yifan Hong | 10c2b40 | 2017-11-08 10:57:52 -0800 | [diff] [blame] | 91 | android.hardware.health@2.0-impl \ |
Hridya Valsaraju | 7fa7225 | 2018-01-12 17:44:33 -0800 | [diff] [blame] | 92 | android.hardware.health@1.0-convert \ |
Jayant Chowdhary | c2d3949 | 2018-10-01 22:50:07 +0000 | [diff] [blame] | 93 | libbinderthreadstate \ |
Yifan Hong | 10c2b40 | 2017-11-08 10:57:52 -0800 | [diff] [blame] | 94 | libhidltransport \ |
| 95 | libhidlbase \ |
Pirama Arumuga Nainar | 9dddfbc | 2018-04-09 10:40:06 -0700 | [diff] [blame] | 96 | libhwbinder_noltopgo \ |
Hridya Valsaraju | 89178e7 | 2018-01-10 16:14:28 -0800 | [diff] [blame] | 97 | libhealthstoragedefault \ |
Yifan Hong | 10c2b40 | 2017-11-08 10:57:52 -0800 | [diff] [blame] | 98 | libvndksupport \ |
Sandeep Patil | fca8244 | 2016-11-01 08:29:30 -0700 | [diff] [blame] | 99 | libhealthd_charger \ |
Luke Song | 1d540dd | 2017-07-13 15:10:35 -0700 | [diff] [blame] | 100 | libhealthd_draw \ |
Damien Bargiacchi | 565ba02 | 2016-08-11 15:29:50 -0700 | [diff] [blame] | 101 | libbatterymonitor \ |
Tao Bao | f2455d8 | 2018-09-07 12:52:46 -0700 | [diff] [blame^] | 102 | |
| 103 | CHARGER_SHARED_LIBRARIES := \ |
| 104 | android.hardware.health@2.0 \ |
Damien Bargiacchi | 565ba02 | 2016-08-11 15:29:50 -0700 | [diff] [blame] | 105 | libbase \ |
| 106 | libcutils \ |
Suren Baghdasaryan | 82b72a5 | 2018-12-21 11:41:50 -0800 | [diff] [blame] | 107 | libjsoncpp \ |
Suren Baghdasaryan | 9491078 | 2019-01-25 05:32:52 +0000 | [diff] [blame] | 108 | libprocessgroup \ |
Damien Bargiacchi | 565ba02 | 2016-08-11 15:29:50 -0700 | [diff] [blame] | 109 | liblog \ |
Tao Bao | f2455d8 | 2018-09-07 12:52:46 -0700 | [diff] [blame^] | 110 | libpng \ |
| 111 | libutils \ |
Todd Poynor | fea5b4d | 2013-09-09 12:09:08 -0700 | [diff] [blame] | 112 | |
Yifan Hong | b7cd45f | 2017-11-13 18:47:03 -0800 | [diff] [blame] | 113 | LOCAL_STATIC_LIBRARIES := $(CHARGER_STATIC_LIBRARIES) |
Tao Bao | f2455d8 | 2018-09-07 12:52:46 -0700 | [diff] [blame^] | 114 | LOCAL_SHARED_LIBRARIES := $(CHARGER_SHARED_LIBRARIES) |
Yifan Hong | b7cd45f | 2017-11-13 18:47:03 -0800 | [diff] [blame] | 115 | |
Sandeep Patil | fca8244 | 2016-11-01 08:29:30 -0700 | [diff] [blame] | 116 | ifneq ($(strip $(LOCAL_CHARGER_NO_UI)),true) |
Tao Bao | f2455d8 | 2018-09-07 12:52:46 -0700 | [diff] [blame^] | 117 | LOCAL_STATIC_LIBRARIES += libminui |
Sandeep Patil | fca8244 | 2016-11-01 08:29:30 -0700 | [diff] [blame] | 118 | endif |
| 119 | |
Todd Poynor | fea5b4d | 2013-09-09 12:09:08 -0700 | [diff] [blame] | 120 | ifeq ($(strip $(BOARD_CHARGER_ENABLE_SUSPEND)),true) |
Tao Bao | f2455d8 | 2018-09-07 12:52:46 -0700 | [diff] [blame^] | 121 | LOCAL_SHARED_LIBRARIES += libsuspend |
Todd Poynor | fea5b4d | 2013-09-09 12:09:08 -0700 | [diff] [blame] | 122 | endif |
| 123 | |
Todd Poynor | d65104c | 2013-08-13 15:50:42 -0700 | [diff] [blame] | 124 | LOCAL_HAL_STATIC_LIBRARIES := libhealthd |
Todd Poynor | 10b235e | 2013-08-07 15:25:14 -0700 | [diff] [blame] | 125 | |
Tao Bao | f2455d8 | 2018-09-07 12:52:46 -0700 | [diff] [blame^] | 126 | # Symlink /charger to /system/bin/charger |
Ying Wang | c4d6ade | 2013-09-20 10:37:42 -0700 | [diff] [blame] | 127 | LOCAL_POST_INSTALL_CMD := $(hide) mkdir -p $(TARGET_ROOT_OUT) \ |
Tao Bao | f2455d8 | 2018-09-07 12:52:46 -0700 | [diff] [blame^] | 128 | && ln -sf /system/bin/charger $(TARGET_ROOT_OUT)/charger |
Ying Wang | c4d6ade | 2013-09-20 10:37:42 -0700 | [diff] [blame] | 129 | |
Todd Poynor | 752faf2 | 2013-06-12 13:25:59 -0700 | [diff] [blame] | 130 | include $(BUILD_EXECUTABLE) |
| 131 | |
Tao Bao | f2455d8 | 2018-09-07 12:52:46 -0700 | [diff] [blame^] | 132 | ### charger_test ### |
Yifan Hong | b7cd45f | 2017-11-13 18:47:03 -0800 | [diff] [blame] | 133 | include $(CLEAR_VARS) |
| 134 | LOCAL_MODULE := charger_test |
Yifan Hong | b7cd45f | 2017-11-13 18:47:03 -0800 | [diff] [blame] | 135 | LOCAL_C_INCLUDES := $(LOCAL_PATH)/include |
| 136 | LOCAL_CFLAGS := -Wall -Werror -DCHARGER_TEST -DCHARGER_NO_UI |
| 137 | LOCAL_STATIC_LIBRARIES := $(CHARGER_STATIC_LIBRARIES) |
Tao Bao | f2455d8 | 2018-09-07 12:52:46 -0700 | [diff] [blame^] | 138 | LOCAL_SHARED_LIBRARIES := $(CHARGER_SHARED_LIBRARIES) |
Yifan Hong | b7cd45f | 2017-11-13 18:47:03 -0800 | [diff] [blame] | 139 | LOCAL_SRC_FILES := \ |
| 140 | charger.cpp \ |
| 141 | charger_test.cpp \ |
| 142 | |
| 143 | include $(BUILD_EXECUTABLE) |
| 144 | |
| 145 | CHARGER_STATIC_LIBRARIES := |
Tao Bao | f2455d8 | 2018-09-07 12:52:46 -0700 | [diff] [blame^] | 146 | CHARGER_SHARED_LIBRARIES := |
Yifan Hong | b7cd45f | 2017-11-13 18:47:03 -0800 | [diff] [blame] | 147 | |
Tao Bao | f2455d8 | 2018-09-07 12:52:46 -0700 | [diff] [blame^] | 148 | ### charger_res_images ### |
Todd Poynor | 7c5a3e1 | 2016-02-12 19:53:15 -0800 | [diff] [blame] | 149 | ifneq ($(strip $(LOCAL_CHARGER_NO_UI)),true) |
Todd Poynor | fea5b4d | 2013-09-09 12:09:08 -0700 | [diff] [blame] | 150 | define _add-charger-image |
| 151 | include $$(CLEAR_VARS) |
Damien Bargiacchi | 565ba02 | 2016-08-11 15:29:50 -0700 | [diff] [blame] | 152 | LOCAL_MODULE := system_core_charger_res_images_$(notdir $(1)) |
Todd Poynor | fea5b4d | 2013-09-09 12:09:08 -0700 | [diff] [blame] | 153 | LOCAL_MODULE_STEM := $(notdir $(1)) |
| 154 | _img_modules += $$(LOCAL_MODULE) |
| 155 | LOCAL_SRC_FILES := $1 |
| 156 | LOCAL_MODULE_TAGS := optional |
| 157 | LOCAL_MODULE_CLASS := ETC |
| 158 | LOCAL_MODULE_PATH := $$(TARGET_ROOT_OUT)/res/images/charger |
| 159 | include $$(BUILD_PREBUILT) |
| 160 | endef |
| 161 | |
| 162 | _img_modules := |
| 163 | _images := |
| 164 | $(foreach _img, $(call find-subdir-subdir-files, "images", "*.png"), \ |
| 165 | $(eval $(call _add-charger-image,$(_img)))) |
| 166 | |
| 167 | include $(CLEAR_VARS) |
| 168 | LOCAL_MODULE := charger_res_images |
| 169 | LOCAL_MODULE_TAGS := optional |
| 170 | LOCAL_REQUIRED_MODULES := $(_img_modules) |
| 171 | include $(BUILD_PHONY_PACKAGE) |
| 172 | |
| 173 | _add-charger-image := |
| 174 | _img_modules := |
Todd Poynor | 7c5a3e1 | 2016-02-12 19:53:15 -0800 | [diff] [blame] | 175 | endif # LOCAL_CHARGER_NO_UI |