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 15cc_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 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). 43cc_library_static { 44 name: "librecovery_utils", 45 46 recovery_available: true, 47 48 defaults: [ 49 "librecovery_utils_defaults", 50 ], 51 52 srcs: [ 53 "battery_utils.cpp", 54 "logging.cpp", 55 "parse_install_logs.cpp", 56 "roots.cpp", 57 "thermalutil.cpp", 58 ], 59 60 header_libs: [ 61 "libvold_headers", 62 ], 63 64 export_include_dirs: [ 65 "include", 66 ], 67 68 export_static_lib_headers: [ 69 // roots.h includes <fstab/fstab.h>. 70 "libfstab", 71 ], 72 73 // Should avoid exposing to the libs that might be used in device-specific codes (e.g. 74 // libedify, libotautil, librecovery_ui). 75 visibility: [ 76 "//bootable/recovery", 77 "//bootable/recovery/install", 78 "//bootable/recovery/minadbd", 79 "//bootable/recovery/tests", 80 ], 81} 82