blob: e04f70f723a7813ab505cd16f15b603a6875663a [file] [log] [blame]
Steven Moreland1b13eea2017-07-10 16:05:51 -07001cc_library_headers {
2 name: "libhealthd_headers",
3 vendor_available: true,
Yifan Hong90fdc722018-07-10 13:02:18 -07004 recovery_available: true,
Steven Moreland1b13eea2017-07-10 16:05:51 -07005 export_include_dirs: ["include"],
6 header_libs: ["libbatteryservice_headers"],
7 export_header_lib_headers: ["libbatteryservice_headers"],
8}
Yifan Hongffff9aa2017-06-01 14:34:29 -07009
10cc_library_static {
11 name: "libbatterymonitor",
12 srcs: ["BatteryMonitor.cpp"],
Chih-Hung Hsieh96352662017-11-29 14:24:50 -080013 cflags: ["-Wall", "-Werror"],
Yifan Hongffff9aa2017-06-01 14:34:29 -070014 vendor_available: true,
Yifan Hong90fdc722018-07-10 13:02:18 -070015 recovery_available: true,
Yifan Hongffff9aa2017-06-01 14:34:29 -070016 export_include_dirs: ["include"],
17 shared_libs: [
18 "libutils",
19 "libbase",
Yifan Hong1d4368b2019-10-07 11:18:04 -070020
21 // Need latest HealthInfo definition from headers of this shared
22 // library. Clients don't need to link to this.
23 "android.hardware.health@2.1",
Yifan Hongffff9aa2017-06-01 14:34:29 -070024 ],
25 header_libs: ["libhealthd_headers"],
26 export_header_lib_headers: ["libhealthd_headers"],
27}
Yifan Hong2763df82017-09-19 17:57:50 -070028
Yifan Hong1cf853f2018-04-04 14:08:57 -070029cc_defaults {
30 name: "android.hardware.health@2.0-service_defaults",
Yifan Hong2763df82017-09-19 17:57:50 -070031
Chih-Hung Hsieh96352662017-11-29 14:24:50 -080032 cflags: [
Chih-Hung Hsieh96352662017-11-29 14:24:50 -080033 "-Wall",
34 "-Werror",
35 ],
Yifan Hong2763df82017-09-19 17:57:50 -070036
37 static_libs: [
38 "android.hardware.health@2.0-impl",
39 "android.hardware.health@1.0-convert",
Yifan Hongaffa24f2018-01-19 15:53:25 -080040 "libhealthservice",
Hridya Valsaraju89178e72018-01-10 16:14:28 -080041 "libhealthstoragedefault",
Yifan Hong2763df82017-09-19 17:57:50 -070042 "libbatterymonitor",
43 ],
44
45 shared_libs: [
46 "libbase",
47 "libcutils",
48 "libhidlbase",
Yifan Hong2763df82017-09-19 17:57:50 -070049 "liblog",
50 "libutils",
51 "android.hardware.health@2.0",
52 ],
53}
Yifan Hong12df1b92017-09-25 17:25:00 -070054
55cc_binary {
Yifan Hong1cf853f2018-04-04 14:08:57 -070056 name: "android.hardware.health@2.0-service",
57 defaults: ["android.hardware.health@2.0-service_defaults"],
Yifan Hong31150c12018-05-01 14:59:43 -070058
Yifan Hongef26fe42018-07-10 13:07:08 -070059 vendor: true,
60 relative_install_path: "hw",
61 init_rc: ["android.hardware.health@2.0-service.rc"],
62 srcs: [
63 "HealthServiceDefault.cpp",
64 ],
65
Yifan Hong31150c12018-05-01 14:59:43 -070066 overrides: [
67 "healthd",
68 ]
Yifan Hong1cf853f2018-04-04 14:08:57 -070069}
70
71cc_binary {
Yifan Hong12df1b92017-09-25 17:25:00 -070072 name: "healthd",
Yifan Hongef26fe42018-07-10 13:07:08 -070073 defaults: ["android.hardware.health@2.0-service_defaults"],
74
Yifan Hongfd1aa702018-04-04 14:08:04 -070075 init_rc: ["healthd.rc"],
Yifan Hongcded9002017-11-06 16:47:54 -080076 srcs: [
Yifan Hongcded9002017-11-06 16:47:54 -080077 "HealthServiceHealthd.cpp",
78 ],
Yifan Hong12df1b92017-09-25 17:25:00 -070079 local_include_dirs: ["include"],
80
Yifan Hong12df1b92017-09-25 17:25:00 -070081 shared_libs: [
Yifan Hong31cc64a2017-11-06 16:48:36 -080082 "android.hardware.health@1.0",
Yifan Hong12df1b92017-09-25 17:25:00 -070083 ],
84
Yifan Hong3a39eec2018-04-27 15:03:32 -070085 vintf_fragments: [
86 "manifest_healthd.xml"
87 ],
Yifan Hong12df1b92017-09-25 17:25:00 -070088}
Tao Bao5747e222018-09-11 10:46:35 -070089
90cc_library_static {
91 name: "libhealthd_charger_nops",
92
93 srcs: [
94 "healthd_mode_charger_nops.cpp",
95 ],
96
97 cflags: [
98 "-Wall",
99 "-Werror",
100 ],
101
102 header_libs: [
103 "libhealthd_headers",
104 ],
105
106 static_libs: [
107 "android.hardware.health@2.0-impl",
108 ],
109
110 shared_libs: [
111 "android.hardware.health@2.0",
112 "libutils",
113 ],
114}
Yifan Hong97eecdc2019-07-03 11:07:37 -0700115
116sysprop_library {
117 name: "charger_sysprop",
118 srcs: ["charger.sysprop"],
119 property_owner: "Platform",
120 api_packages: ["android.sysprop"],
121}
Yifan Hongdbaa4772019-07-03 11:40:08 -0700122
123cc_library_static {
124 name: "libhealthd_draw",
125 export_include_dirs: ["."],
126 static_libs: [
127 "libcharger_sysprop",
128 "libminui",
129 ],
130 shared_libs: [
131 "libbase",
132 ],
133 header_libs: ["libbatteryservice_headers"],
134
135 srcs: ["healthd_draw.cpp"],
136}
137
138cc_library_static {
139 name: "libhealthd_charger",
140 local_include_dirs: ["include"],
141 export_include_dirs: [".", "include"],
142
143 static_libs: [
144 "android.hardware.health@2.0-impl",
145 "android.hardware.health@1.0-convert",
146 "libcharger_sysprop",
147 "libhealthstoragedefault",
148 "libhealthd_draw",
149 "libminui",
150 ],
151
152 shared_libs: [
153 "android.hardware.health@2.0",
154 "libbase",
155 "libcutils",
156 "liblog",
157 "libpng",
158 "libsuspend",
159 "libutils",
160 ],
161
162 srcs: [
163 "healthd_mode_charger.cpp",
164 "AnimationParser.cpp",
165 ],
166}