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) |
Damien Bargiacchi | 565ba02 | 2016-08-11 15:29:50 -0700 | [diff] [blame] | 6 | LOCAL_SRC_FILES := \ |
| 7 | healthd_mode_android.cpp \ |
Sandeep Patil | fca8244 | 2016-11-01 08:29:30 -0700 | [diff] [blame] | 8 | BatteryPropertiesRegistrar.cpp |
Damien Bargiacchi | 565ba02 | 2016-08-11 15:29:50 -0700 | [diff] [blame] | 9 | |
Sandeep Patil | fca8244 | 2016-11-01 08:29:30 -0700 | [diff] [blame] | 10 | LOCAL_MODULE := libhealthd_android |
Damien Bargiacchi | 565ba02 | 2016-08-11 15:29:50 -0700 | [diff] [blame] | 11 | LOCAL_EXPORT_C_INCLUDE_DIRS := \ |
| 12 | $(LOCAL_PATH) \ |
Sandeep Patil | fca8244 | 2016-11-01 08:29:30 -0700 | [diff] [blame] | 13 | $(LOCAL_PATH)/include |
Damien Bargiacchi | 565ba02 | 2016-08-11 15:29:50 -0700 | [diff] [blame] | 14 | |
| 15 | LOCAL_STATIC_LIBRARIES := \ |
| 16 | libbatterymonitor \ |
| 17 | libbatteryservice \ |
Sandeep Patil | fca8244 | 2016-11-01 08:29:30 -0700 | [diff] [blame] | 18 | libutils \ |
| 19 | libbase \ |
| 20 | libcutils \ |
| 21 | liblog \ |
| 22 | libc \ |
| 23 | |
| 24 | include $(BUILD_STATIC_LIBRARY) |
| 25 | |
| 26 | include $(CLEAR_VARS) |
| 27 | |
Luke Song | 7f386dc | 2017-07-13 15:10:35 -0700 | [diff] [blame] | 28 | LOCAL_MODULE := libhealthd_draw |
| 29 | |
| 30 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH) |
| 31 | LOCAL_STATIC_LIBRARIES := \ |
| 32 | libminui \ |
| 33 | libbase |
| 34 | LOCAL_SRC_FILES := healthd_draw.cpp |
| 35 | |
| 36 | ifneq ($(TARGET_HEALTHD_DRAW_SPLIT_SCREEN),) |
| 37 | LOCAL_CFLAGS += -DHEALTHD_DRAW_SPLIT_SCREEN=$(TARGET_HEALTHD_DRAW_SPLIT_SCREEN) |
| 38 | else |
| 39 | LOCAL_CFLAGS += -DHEALTHD_DRAW_SPLIT_SCREEN=0 |
| 40 | endif |
| 41 | |
| 42 | ifneq ($(TARGET_HEALTHD_DRAW_SPLIT_OFFSET),) |
| 43 | LOCAL_CFLAGS += -DHEALTHD_DRAW_SPLIT_OFFSET=$(TARGET_HEALTHD_DRAW_SPLIT_OFFSET) |
| 44 | else |
| 45 | LOCAL_CFLAGS += -DHEALTHD_DRAW_SPLIT_OFFSET=0 |
| 46 | endif |
| 47 | |
| 48 | include $(BUILD_STATIC_LIBRARY) |
| 49 | |
| 50 | include $(CLEAR_VARS) |
| 51 | |
Sandeep Patil | fca8244 | 2016-11-01 08:29:30 -0700 | [diff] [blame] | 52 | LOCAL_CFLAGS := -Werror |
| 53 | ifeq ($(strip $(BOARD_CHARGER_DISABLE_INIT_BLANK)),true) |
| 54 | LOCAL_CFLAGS += -DCHARGER_DISABLE_INIT_BLANK |
| 55 | endif |
| 56 | ifeq ($(strip $(BOARD_CHARGER_ENABLE_SUSPEND)),true) |
| 57 | LOCAL_CFLAGS += -DCHARGER_ENABLE_SUSPEND |
| 58 | endif |
| 59 | |
| 60 | LOCAL_SRC_FILES := \ |
| 61 | healthd_mode_charger.cpp \ |
| 62 | AnimationParser.cpp |
| 63 | |
| 64 | LOCAL_MODULE := libhealthd_charger |
| 65 | LOCAL_C_INCLUDES := bootable/recovery $(LOCAL_PATH)/include |
| 66 | LOCAL_EXPORT_C_INCLUDE_DIRS := \ |
| 67 | $(LOCAL_PATH) \ |
| 68 | $(LOCAL_PATH)/include |
| 69 | |
| 70 | LOCAL_STATIC_LIBRARIES := \ |
Damien Bargiacchi | 565ba02 | 2016-08-11 15:29:50 -0700 | [diff] [blame] | 71 | libminui \ |
| 72 | libpng \ |
| 73 | libz \ |
| 74 | libutils \ |
| 75 | libbase \ |
| 76 | libcutils \ |
Luke Song | 7f386dc | 2017-07-13 15:10:35 -0700 | [diff] [blame] | 77 | libhealthd_draw \ |
Damien Bargiacchi | 565ba02 | 2016-08-11 15:29:50 -0700 | [diff] [blame] | 78 | liblog \ |
| 79 | libm \ |
| 80 | libc \ |
| 81 | |
Sandeep Patil | fca8244 | 2016-11-01 08:29:30 -0700 | [diff] [blame] | 82 | ifeq ($(strip $(BOARD_CHARGER_ENABLE_SUSPEND)),true) |
| 83 | LOCAL_STATIC_LIBRARIES += libsuspend |
| 84 | endif |
| 85 | |
Damien Bargiacchi | 565ba02 | 2016-08-11 15:29:50 -0700 | [diff] [blame] | 86 | include $(BUILD_STATIC_LIBRARY) |
| 87 | |
Sandeep Patil | 6012db5 | 2016-11-01 08:45:19 -0700 | [diff] [blame] | 88 | ### charger ### |
Damien Bargiacchi | 565ba02 | 2016-08-11 15:29:50 -0700 | [diff] [blame] | 89 | include $(CLEAR_VARS) |
Todd Poynor | 7c5a3e1 | 2016-02-12 19:53:15 -0800 | [diff] [blame] | 90 | ifeq ($(strip $(BOARD_CHARGER_NO_UI)),true) |
| 91 | LOCAL_CHARGER_NO_UI := true |
| 92 | endif |
Todd Poynor | 7c5a3e1 | 2016-02-12 19:53:15 -0800 | [diff] [blame] | 93 | |
Todd Poynor | 752faf2 | 2013-06-12 13:25:59 -0700 | [diff] [blame] | 94 | LOCAL_SRC_FILES := \ |
Sandeep Patil | 526f8cf | 2016-11-01 16:41:56 -0700 | [diff] [blame] | 95 | healthd_common.cpp \ |
| 96 | charger.cpp \ |
Todd Poynor | 7c5a3e1 | 2016-02-12 19:53:15 -0800 | [diff] [blame] | 97 | |
Sandeep Patil | 6012db5 | 2016-11-01 08:45:19 -0700 | [diff] [blame] | 98 | LOCAL_MODULE := charger |
Todd Poynor | 752faf2 | 2013-06-12 13:25:59 -0700 | [diff] [blame] | 99 | LOCAL_MODULE_TAGS := optional |
| 100 | LOCAL_FORCE_STATIC_EXECUTABLE := true |
| 101 | LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT_SBIN) |
| 102 | LOCAL_UNSTRIPPED_PATH := $(TARGET_ROOT_OUT_SBIN_UNSTRIPPED) |
Sandeep Patil | fca8244 | 2016-11-01 08:29:30 -0700 | [diff] [blame] | 103 | LOCAL_C_INCLUDES := $(LOCAL_PATH)/include |
Todd Poynor | 752faf2 | 2013-06-12 13:25:59 -0700 | [diff] [blame] | 104 | |
Sandeep Patil | fca8244 | 2016-11-01 08:29:30 -0700 | [diff] [blame] | 105 | LOCAL_CFLAGS := -Werror |
Todd Poynor | 7c5a3e1 | 2016-02-12 19:53:15 -0800 | [diff] [blame] | 106 | ifeq ($(strip $(LOCAL_CHARGER_NO_UI)),true) |
| 107 | LOCAL_CFLAGS += -DCHARGER_NO_UI |
| 108 | endif |
Nick Vaccaro | 1f1a6fd | 2016-10-21 19:16:40 -0700 | [diff] [blame] | 109 | ifneq ($(BOARD_PERIODIC_CHORES_INTERVAL_FAST),) |
| 110 | LOCAL_CFLAGS += -DBOARD_PERIODIC_CHORES_INTERVAL_FAST=$(BOARD_PERIODIC_CHORES_INTERVAL_FAST) |
| 111 | endif |
Nick Vaccaro | 1f1a6fd | 2016-10-21 19:16:40 -0700 | [diff] [blame] | 112 | ifneq ($(BOARD_PERIODIC_CHORES_INTERVAL_SLOW),) |
| 113 | LOCAL_CFLAGS += -DBOARD_PERIODIC_CHORES_INTERVAL_SLOW=$(BOARD_PERIODIC_CHORES_INTERVAL_SLOW) |
| 114 | endif |
| 115 | |
Damien Bargiacchi | 565ba02 | 2016-08-11 15:29:50 -0700 | [diff] [blame] | 116 | LOCAL_STATIC_LIBRARIES := \ |
Sandeep Patil | fca8244 | 2016-11-01 08:29:30 -0700 | [diff] [blame] | 117 | libhealthd_charger \ |
Luke Song | 7f386dc | 2017-07-13 15:10:35 -0700 | [diff] [blame] | 118 | libhealthd_draw \ |
Damien Bargiacchi | 565ba02 | 2016-08-11 15:29:50 -0700 | [diff] [blame] | 119 | libbatterymonitor \ |
Damien Bargiacchi | 565ba02 | 2016-08-11 15:29:50 -0700 | [diff] [blame] | 120 | libbase \ |
Damien Bargiacchi | afd59e2 | 2016-09-13 08:37:37 -0700 | [diff] [blame] | 121 | libutils \ |
Damien Bargiacchi | 565ba02 | 2016-08-11 15:29:50 -0700 | [diff] [blame] | 122 | libcutils \ |
| 123 | liblog \ |
| 124 | libm \ |
Damien Bargiacchi | afd59e2 | 2016-09-13 08:37:37 -0700 | [diff] [blame] | 125 | libc \ |
Todd Poynor | fea5b4d | 2013-09-09 12:09:08 -0700 | [diff] [blame] | 126 | |
Sandeep Patil | fca8244 | 2016-11-01 08:29:30 -0700 | [diff] [blame] | 127 | ifneq ($(strip $(LOCAL_CHARGER_NO_UI)),true) |
| 128 | LOCAL_STATIC_LIBRARIES += \ |
| 129 | libminui \ |
| 130 | libpng \ |
| 131 | libz \ |
| 132 | |
| 133 | endif |
| 134 | |
Todd Poynor | fea5b4d | 2013-09-09 12:09:08 -0700 | [diff] [blame] | 135 | ifeq ($(strip $(BOARD_CHARGER_ENABLE_SUSPEND)),true) |
| 136 | LOCAL_STATIC_LIBRARIES += libsuspend |
| 137 | endif |
| 138 | |
Todd Poynor | d65104c | 2013-08-13 15:50:42 -0700 | [diff] [blame] | 139 | LOCAL_HAL_STATIC_LIBRARIES := libhealthd |
Todd Poynor | 10b235e | 2013-08-07 15:25:14 -0700 | [diff] [blame] | 140 | |
Sandeep Patil | 6012db5 | 2016-11-01 08:45:19 -0700 | [diff] [blame] | 141 | # Symlink /charger to /sbin/charger |
Ying Wang | c4d6ade | 2013-09-20 10:37:42 -0700 | [diff] [blame] | 142 | LOCAL_POST_INSTALL_CMD := $(hide) mkdir -p $(TARGET_ROOT_OUT) \ |
Sandeep Patil | 6012db5 | 2016-11-01 08:45:19 -0700 | [diff] [blame] | 143 | && ln -sf /sbin/charger $(TARGET_ROOT_OUT)/charger |
Ying Wang | c4d6ade | 2013-09-20 10:37:42 -0700 | [diff] [blame] | 144 | |
Todd Poynor | 752faf2 | 2013-06-12 13:25:59 -0700 | [diff] [blame] | 145 | include $(BUILD_EXECUTABLE) |
| 146 | |
Todd Poynor | 7c5a3e1 | 2016-02-12 19:53:15 -0800 | [diff] [blame] | 147 | ifneq ($(strip $(LOCAL_CHARGER_NO_UI)),true) |
Todd Poynor | fea5b4d | 2013-09-09 12:09:08 -0700 | [diff] [blame] | 148 | define _add-charger-image |
| 149 | include $$(CLEAR_VARS) |
Damien Bargiacchi | 565ba02 | 2016-08-11 15:29:50 -0700 | [diff] [blame] | 150 | LOCAL_MODULE := system_core_charger_res_images_$(notdir $(1)) |
Todd Poynor | fea5b4d | 2013-09-09 12:09:08 -0700 | [diff] [blame] | 151 | LOCAL_MODULE_STEM := $(notdir $(1)) |
| 152 | _img_modules += $$(LOCAL_MODULE) |
| 153 | LOCAL_SRC_FILES := $1 |
| 154 | LOCAL_MODULE_TAGS := optional |
| 155 | LOCAL_MODULE_CLASS := ETC |
| 156 | LOCAL_MODULE_PATH := $$(TARGET_ROOT_OUT)/res/images/charger |
| 157 | include $$(BUILD_PREBUILT) |
| 158 | endef |
| 159 | |
| 160 | _img_modules := |
| 161 | _images := |
| 162 | $(foreach _img, $(call find-subdir-subdir-files, "images", "*.png"), \ |
| 163 | $(eval $(call _add-charger-image,$(_img)))) |
| 164 | |
| 165 | include $(CLEAR_VARS) |
| 166 | LOCAL_MODULE := charger_res_images |
| 167 | LOCAL_MODULE_TAGS := optional |
| 168 | LOCAL_REQUIRED_MODULES := $(_img_modules) |
| 169 | include $(BUILD_PHONY_PACKAGE) |
| 170 | |
| 171 | _add-charger-image := |
| 172 | _img_modules := |
Todd Poynor | 7c5a3e1 | 2016-02-12 19:53:15 -0800 | [diff] [blame] | 173 | endif # LOCAL_CHARGER_NO_UI |
Sandeep Patil | 6012db5 | 2016-11-01 08:45:19 -0700 | [diff] [blame] | 174 | |
| 175 | ### healthd ### |
| 176 | include $(CLEAR_VARS) |
| 177 | |
| 178 | LOCAL_SRC_FILES := \ |
Sandeep Patil | 526f8cf | 2016-11-01 16:41:56 -0700 | [diff] [blame] | 179 | healthd_common.cpp \ |
| 180 | healthd.cpp \ |
Sandeep Patil | 6012db5 | 2016-11-01 08:45:19 -0700 | [diff] [blame] | 181 | |
| 182 | LOCAL_MODULE := healthd |
| 183 | LOCAL_MODULE_TAGS := optional |
| 184 | LOCAL_C_INCLUDES := $(LOCAL_PATH)/include |
| 185 | |
| 186 | ifneq ($(BOARD_PERIODIC_CHORES_INTERVAL_FAST),) |
| 187 | LOCAL_CFLAGS += -DBOARD_PERIODIC_CHORES_INTERVAL_FAST=$(BOARD_PERIODIC_CHORES_INTERVAL_FAST) |
| 188 | endif |
| 189 | ifneq ($(BOARD_PERIODIC_CHORES_INTERVAL_SLOW),) |
| 190 | LOCAL_CFLAGS += -DBOARD_PERIODIC_CHORES_INTERVAL_SLOW=$(BOARD_PERIODIC_CHORES_INTERVAL_SLOW) |
| 191 | endif |
| 192 | |
| 193 | LOCAL_STATIC_LIBRARIES := \ |
| 194 | libhealthd_android \ |
Sandeep Patil | 6012db5 | 2016-11-01 08:45:19 -0700 | [diff] [blame] | 195 | libbatterymonitor \ |
| 196 | libbatteryservice \ |
Sandeep Patil | a368195 | 2016-11-08 16:27:54 -0800 | [diff] [blame] | 197 | android.hardware.health@1.0-convert \ |
Sandeep Patil | 6012db5 | 2016-11-01 08:45:19 -0700 | [diff] [blame] | 198 | |
| 199 | LOCAL_SHARED_LIBRARIES := \ |
| 200 | libbinder \ |
| 201 | libbase \ |
| 202 | libutils \ |
| 203 | libcutils \ |
| 204 | liblog \ |
| 205 | libm \ |
| 206 | libc \ |
Yifan Hong | 62e840f | 2016-11-17 13:00:55 -0800 | [diff] [blame] | 207 | libhidlbase \ |
| 208 | libhidltransport \ |
Sandeep Patil | a368195 | 2016-11-08 16:27:54 -0800 | [diff] [blame] | 209 | android.hardware.health@1.0 \ |
Sandeep Patil | 6012db5 | 2016-11-01 08:45:19 -0700 | [diff] [blame] | 210 | |
Sandeep Patil | 6012db5 | 2016-11-01 08:45:19 -0700 | [diff] [blame] | 211 | include $(BUILD_EXECUTABLE) |