Tao Bao | e3f09a7 | 2019-10-01 11:55:36 -0700 | [diff] [blame] | 1 | // Copyright (C) 2019 The Android Open Source Project |
| 2 | // |
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | // you may not use this file except in compliance with the License. |
| 5 | // You may obtain a copy of the License at |
| 6 | // |
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | // |
| 9 | // Unless required by applicable law or agreed to in writing, software |
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | // See the License for the specific language governing permissions and |
| 13 | // limitations under the License. |
| 14 | |
Tao Bao | 832c9cd | 2019-09-27 23:32:00 -0700 | [diff] [blame] | 15 | cc_defaults { |
| 16 | name: "librecovery_utils_defaults", |
| 17 | |
| 18 | defaults: [ |
| 19 | "recovery_defaults", |
| 20 | ], |
| 21 | |
| 22 | shared_libs: [ |
| 23 | "android.hardware.health@2.0", |
| 24 | "libbase", |
| 25 | "libext4_utils", |
| 26 | "libfs_mgr", |
| 27 | "libhidlbase", |
| 28 | "libselinux", |
| 29 | "libutils", |
| 30 | ], |
| 31 | |
| 32 | static_libs: [ |
| 33 | "libotautil", |
| 34 | |
| 35 | // External dependencies. |
| 36 | "libfstab", |
| 37 | "libhealthhalutils", |
| 38 | ], |
| 39 | } |
| 40 | |
Tao Bao | e3f09a7 | 2019-10-01 11:55:36 -0700 | [diff] [blame] | 41 | // A utility lib that's local to recovery (in contrast, libotautil is exposed to device-specific |
| 42 | // recovery_ui lib as well as device-specific updater). |
| 43 | cc_library_static { |
| 44 | name: "librecovery_utils", |
| 45 | |
| 46 | recovery_available: true, |
| 47 | |
| 48 | defaults: [ |
Tao Bao | 832c9cd | 2019-09-27 23:32:00 -0700 | [diff] [blame] | 49 | "librecovery_utils_defaults", |
Tao Bao | e3f09a7 | 2019-10-01 11:55:36 -0700 | [diff] [blame] | 50 | ], |
| 51 | |
| 52 | srcs: [ |
Tao Bao | 832c9cd | 2019-09-27 23:32:00 -0700 | [diff] [blame] | 53 | "battery_utils.cpp", |
Tao Bao | e3f09a7 | 2019-10-01 11:55:36 -0700 | [diff] [blame] | 54 | "logging.cpp", |
| 55 | "parse_install_logs.cpp", |
| 56 | "roots.cpp", |
| 57 | "thermalutil.cpp", |
| 58 | ], |
| 59 | |
Tao Bao | e3f09a7 | 2019-10-01 11:55:36 -0700 | [diff] [blame] | 60 | export_include_dirs: [ |
| 61 | "include", |
| 62 | ], |
| 63 | |
| 64 | include_dirs: [ |
| 65 | "system/vold", |
| 66 | ], |
| 67 | |
Tao Bao | e3f09a7 | 2019-10-01 11:55:36 -0700 | [diff] [blame] | 68 | export_static_lib_headers: [ |
| 69 | "libfstab", |
| 70 | ], |
| 71 | |
| 72 | // Should avoid exposing to the libs that might be used in device-specific codes (e.g. |
| 73 | // libedify, libotautil, librecovery_ui). |
| 74 | visibility: [ |
| 75 | "//bootable/recovery", |
| 76 | "//bootable/recovery/install", |
| 77 | "//bootable/recovery/tests", |
| 78 | ], |
| 79 | } |