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) |
| 6 | LOCAL_SRC_FILES := healthd_board_default.cpp |
| 7 | LOCAL_MODULE := libhealthd.default |
Mark Salyzyn | 6f5b47f | 2014-05-15 15:00:59 -0700 | [diff] [blame] | 8 | LOCAL_CFLAGS := -Werror |
Yabin Cui | e98e177 | 2016-02-17 12:21:34 -0800 | [diff] [blame] | 9 | LOCAL_C_INCLUDES := $(LOCAL_PATH)/include |
| 10 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include |
Christopher Wiley | 2239908 | 2016-04-12 09:21:51 -0700 | [diff] [blame] | 11 | LOCAL_STATIC_LIBRARIES := libbinder |
Christopher Wiley | 8ac71c7 | 2016-04-18 09:33:53 -0700 | [diff] [blame] | 12 | LOCAL_EXPORT_STATIC_LIBRARY_HEADERS := libbinder |
Yabin Cui | e98e177 | 2016-02-17 12:21:34 -0800 | [diff] [blame] | 13 | include $(BUILD_STATIC_LIBRARY) |
| 14 | |
| 15 | include $(CLEAR_VARS) |
| 16 | LOCAL_SRC_FILES := BatteryMonitor.cpp |
| 17 | LOCAL_MODULE := libbatterymonitor |
| 18 | LOCAL_C_INCLUDES := $(LOCAL_PATH)/include |
| 19 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include |
Michael Scott | 3217c5c | 2016-06-05 11:20:13 -0700 | [diff] [blame] | 20 | LOCAL_STATIC_LIBRARIES := libutils libbase libbinder |
Todd Poynor | d65104c | 2013-08-13 15:50:42 -0700 | [diff] [blame] | 21 | include $(BUILD_STATIC_LIBRARY) |
| 22 | |
Todd Poynor | 752faf2 | 2013-06-12 13:25:59 -0700 | [diff] [blame] | 23 | include $(CLEAR_VARS) |
Damien Bargiacchi | 565ba02 | 2016-08-11 15:29:50 -0700 | [diff] [blame] | 24 | LOCAL_SRC_FILES := \ |
| 25 | healthd_mode_android.cpp \ |
Sandeep Patil | fca8244 | 2016-11-01 08:29:30 -0700 | [diff] [blame^] | 26 | BatteryPropertiesRegistrar.cpp |
Damien Bargiacchi | 565ba02 | 2016-08-11 15:29:50 -0700 | [diff] [blame] | 27 | |
Sandeep Patil | fca8244 | 2016-11-01 08:29:30 -0700 | [diff] [blame^] | 28 | LOCAL_MODULE := libhealthd_android |
Damien Bargiacchi | 565ba02 | 2016-08-11 15:29:50 -0700 | [diff] [blame] | 29 | LOCAL_EXPORT_C_INCLUDE_DIRS := \ |
| 30 | $(LOCAL_PATH) \ |
Sandeep Patil | fca8244 | 2016-11-01 08:29:30 -0700 | [diff] [blame^] | 31 | $(LOCAL_PATH)/include |
Damien Bargiacchi | 565ba02 | 2016-08-11 15:29:50 -0700 | [diff] [blame] | 32 | |
| 33 | LOCAL_STATIC_LIBRARIES := \ |
| 34 | libbatterymonitor \ |
| 35 | libbatteryservice \ |
Sandeep Patil | fca8244 | 2016-11-01 08:29:30 -0700 | [diff] [blame^] | 36 | libutils \ |
| 37 | libbase \ |
| 38 | libcutils \ |
| 39 | liblog \ |
| 40 | libc \ |
| 41 | |
| 42 | include $(BUILD_STATIC_LIBRARY) |
| 43 | |
| 44 | include $(CLEAR_VARS) |
| 45 | |
| 46 | LOCAL_CFLAGS := -Werror |
| 47 | ifeq ($(strip $(BOARD_CHARGER_DISABLE_INIT_BLANK)),true) |
| 48 | LOCAL_CFLAGS += -DCHARGER_DISABLE_INIT_BLANK |
| 49 | endif |
| 50 | ifeq ($(strip $(BOARD_CHARGER_ENABLE_SUSPEND)),true) |
| 51 | LOCAL_CFLAGS += -DCHARGER_ENABLE_SUSPEND |
| 52 | endif |
| 53 | |
| 54 | LOCAL_SRC_FILES := \ |
| 55 | healthd_mode_charger.cpp \ |
| 56 | AnimationParser.cpp |
| 57 | |
| 58 | LOCAL_MODULE := libhealthd_charger |
| 59 | LOCAL_C_INCLUDES := bootable/recovery $(LOCAL_PATH)/include |
| 60 | LOCAL_EXPORT_C_INCLUDE_DIRS := \ |
| 61 | $(LOCAL_PATH) \ |
| 62 | $(LOCAL_PATH)/include |
| 63 | |
| 64 | LOCAL_STATIC_LIBRARIES := \ |
Damien Bargiacchi | 565ba02 | 2016-08-11 15:29:50 -0700 | [diff] [blame] | 65 | libminui \ |
| 66 | libpng \ |
| 67 | libz \ |
| 68 | libutils \ |
| 69 | libbase \ |
| 70 | libcutils \ |
| 71 | liblog \ |
| 72 | libm \ |
| 73 | libc \ |
| 74 | |
Sandeep Patil | fca8244 | 2016-11-01 08:29:30 -0700 | [diff] [blame^] | 75 | ifeq ($(strip $(BOARD_CHARGER_ENABLE_SUSPEND)),true) |
| 76 | LOCAL_STATIC_LIBRARIES += libsuspend |
| 77 | endif |
| 78 | |
Damien Bargiacchi | 565ba02 | 2016-08-11 15:29:50 -0700 | [diff] [blame] | 79 | include $(BUILD_STATIC_LIBRARY) |
| 80 | |
Damien Bargiacchi | 565ba02 | 2016-08-11 15:29:50 -0700 | [diff] [blame] | 81 | include $(CLEAR_VARS) |
Todd Poynor | 7c5a3e1 | 2016-02-12 19:53:15 -0800 | [diff] [blame] | 82 | ifeq ($(strip $(BOARD_CHARGER_NO_UI)),true) |
| 83 | LOCAL_CHARGER_NO_UI := true |
| 84 | endif |
| 85 | ifdef BRILLO |
| 86 | LOCAL_CHARGER_NO_UI := true |
| 87 | endif |
| 88 | |
Todd Poynor | 752faf2 | 2013-06-12 13:25:59 -0700 | [diff] [blame] | 89 | LOCAL_SRC_FILES := \ |
Sandeep Patil | fca8244 | 2016-11-01 08:29:30 -0700 | [diff] [blame^] | 90 | healthd.cpp |
Todd Poynor | 7c5a3e1 | 2016-02-12 19:53:15 -0800 | [diff] [blame] | 91 | |
Todd Poynor | 752faf2 | 2013-06-12 13:25:59 -0700 | [diff] [blame] | 92 | LOCAL_MODULE := healthd |
| 93 | LOCAL_MODULE_TAGS := optional |
| 94 | LOCAL_FORCE_STATIC_EXECUTABLE := true |
| 95 | LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT_SBIN) |
| 96 | LOCAL_UNSTRIPPED_PATH := $(TARGET_ROOT_OUT_SBIN_UNSTRIPPED) |
Sandeep Patil | fca8244 | 2016-11-01 08:29:30 -0700 | [diff] [blame^] | 97 | LOCAL_C_INCLUDES := $(LOCAL_PATH)/include |
Todd Poynor | 752faf2 | 2013-06-12 13:25:59 -0700 | [diff] [blame] | 98 | |
Sandeep Patil | fca8244 | 2016-11-01 08:29:30 -0700 | [diff] [blame^] | 99 | LOCAL_CFLAGS := -Werror |
Todd Poynor | 7c5a3e1 | 2016-02-12 19:53:15 -0800 | [diff] [blame] | 100 | ifeq ($(strip $(LOCAL_CHARGER_NO_UI)),true) |
| 101 | LOCAL_CFLAGS += -DCHARGER_NO_UI |
| 102 | endif |
Nick Vaccaro | 1f1a6fd | 2016-10-21 19:16:40 -0700 | [diff] [blame] | 103 | ifneq ($(BOARD_PERIODIC_CHORES_INTERVAL_FAST),) |
| 104 | LOCAL_CFLAGS += -DBOARD_PERIODIC_CHORES_INTERVAL_FAST=$(BOARD_PERIODIC_CHORES_INTERVAL_FAST) |
| 105 | endif |
Nick Vaccaro | 1f1a6fd | 2016-10-21 19:16:40 -0700 | [diff] [blame] | 106 | ifneq ($(BOARD_PERIODIC_CHORES_INTERVAL_SLOW),) |
| 107 | LOCAL_CFLAGS += -DBOARD_PERIODIC_CHORES_INTERVAL_SLOW=$(BOARD_PERIODIC_CHORES_INTERVAL_SLOW) |
| 108 | endif |
| 109 | |
Damien Bargiacchi | 565ba02 | 2016-08-11 15:29:50 -0700 | [diff] [blame] | 110 | LOCAL_STATIC_LIBRARIES := \ |
Sandeep Patil | fca8244 | 2016-11-01 08:29:30 -0700 | [diff] [blame^] | 111 | libhealthd_android \ |
| 112 | libhealthd_charger \ |
Damien Bargiacchi | 565ba02 | 2016-08-11 15:29:50 -0700 | [diff] [blame] | 113 | libbatterymonitor \ |
| 114 | libbatteryservice \ |
| 115 | libbinder \ |
Damien Bargiacchi | 565ba02 | 2016-08-11 15:29:50 -0700 | [diff] [blame] | 116 | libbase \ |
Damien Bargiacchi | afd59e2 | 2016-09-13 08:37:37 -0700 | [diff] [blame] | 117 | libutils \ |
Damien Bargiacchi | 565ba02 | 2016-08-11 15:29:50 -0700 | [diff] [blame] | 118 | libcutils \ |
| 119 | liblog \ |
| 120 | libm \ |
Damien Bargiacchi | afd59e2 | 2016-09-13 08:37:37 -0700 | [diff] [blame] | 121 | libc \ |
Todd Poynor | fea5b4d | 2013-09-09 12:09:08 -0700 | [diff] [blame] | 122 | |
Sandeep Patil | fca8244 | 2016-11-01 08:29:30 -0700 | [diff] [blame^] | 123 | ifneq ($(strip $(LOCAL_CHARGER_NO_UI)),true) |
| 124 | LOCAL_STATIC_LIBRARIES += \ |
| 125 | libminui \ |
| 126 | libpng \ |
| 127 | libz \ |
| 128 | |
| 129 | endif |
| 130 | |
Todd Poynor | fea5b4d | 2013-09-09 12:09:08 -0700 | [diff] [blame] | 131 | ifeq ($(strip $(BOARD_CHARGER_ENABLE_SUSPEND)),true) |
| 132 | LOCAL_STATIC_LIBRARIES += libsuspend |
| 133 | endif |
| 134 | |
Todd Poynor | d65104c | 2013-08-13 15:50:42 -0700 | [diff] [blame] | 135 | LOCAL_HAL_STATIC_LIBRARIES := libhealthd |
Todd Poynor | 10b235e | 2013-08-07 15:25:14 -0700 | [diff] [blame] | 136 | |
Ying Wang | c4d6ade | 2013-09-20 10:37:42 -0700 | [diff] [blame] | 137 | # Symlink /charger to /sbin/healthd |
| 138 | LOCAL_POST_INSTALL_CMD := $(hide) mkdir -p $(TARGET_ROOT_OUT) \ |
| 139 | && ln -sf /sbin/healthd $(TARGET_ROOT_OUT)/charger |
| 140 | |
Todd Poynor | 752faf2 | 2013-06-12 13:25:59 -0700 | [diff] [blame] | 141 | include $(BUILD_EXECUTABLE) |
| 142 | |
Todd Poynor | fea5b4d | 2013-09-09 12:09:08 -0700 | [diff] [blame] | 143 | |
Todd Poynor | 7c5a3e1 | 2016-02-12 19:53:15 -0800 | [diff] [blame] | 144 | ifneq ($(strip $(LOCAL_CHARGER_NO_UI)),true) |
Todd Poynor | fea5b4d | 2013-09-09 12:09:08 -0700 | [diff] [blame] | 145 | define _add-charger-image |
| 146 | include $$(CLEAR_VARS) |
Damien Bargiacchi | 565ba02 | 2016-08-11 15:29:50 -0700 | [diff] [blame] | 147 | LOCAL_MODULE := system_core_charger_res_images_$(notdir $(1)) |
Todd Poynor | fea5b4d | 2013-09-09 12:09:08 -0700 | [diff] [blame] | 148 | LOCAL_MODULE_STEM := $(notdir $(1)) |
| 149 | _img_modules += $$(LOCAL_MODULE) |
| 150 | LOCAL_SRC_FILES := $1 |
| 151 | LOCAL_MODULE_TAGS := optional |
| 152 | LOCAL_MODULE_CLASS := ETC |
| 153 | LOCAL_MODULE_PATH := $$(TARGET_ROOT_OUT)/res/images/charger |
| 154 | include $$(BUILD_PREBUILT) |
| 155 | endef |
| 156 | |
| 157 | _img_modules := |
| 158 | _images := |
| 159 | $(foreach _img, $(call find-subdir-subdir-files, "images", "*.png"), \ |
| 160 | $(eval $(call _add-charger-image,$(_img)))) |
| 161 | |
| 162 | include $(CLEAR_VARS) |
| 163 | LOCAL_MODULE := charger_res_images |
| 164 | LOCAL_MODULE_TAGS := optional |
| 165 | LOCAL_REQUIRED_MODULES := $(_img_modules) |
| 166 | include $(BUILD_PHONY_PACKAGE) |
| 167 | |
| 168 | _add-charger-image := |
| 169 | _img_modules := |
Todd Poynor | 7c5a3e1 | 2016-02-12 19:53:15 -0800 | [diff] [blame] | 170 | endif # LOCAL_CHARGER_NO_UI |