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