blob: 7a5ba2dc817094a735c6c42a01c14903a699faec [file] [log] [blame]
Tao Baoe3f09a72019-10-01 11:55:36 -07001// 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
Bob Badour29be3f62021-02-12 18:00:57 -080015package {
16 // See: http://go/android-license-faq
17 // A large-scale-change added 'default_applicable_licenses' to import
18 // all of the 'license_kinds' from "bootable_recovery_license"
19 // to get the below license kinds:
20 // SPDX-license-identifier-Apache-2.0
21 default_applicable_licenses: ["bootable_recovery_license"],
22}
23
Tao Bao832c9cd2019-09-27 23:32:00 -070024cc_defaults {
25 name: "librecovery_utils_defaults",
26
27 defaults: [
28 "recovery_defaults",
29 ],
30
31 shared_libs: [
32 "android.hardware.health@2.0",
33 "libbase",
34 "libext4_utils",
35 "libfs_mgr",
36 "libhidlbase",
37 "libselinux",
38 "libutils",
39 ],
40
41 static_libs: [
42 "libotautil",
43
44 // External dependencies.
45 "libfstab",
46 "libhealthhalutils",
47 ],
Alessandro Astone7a3ce382020-03-01 13:33:27 +010048
49 whole_static_libs: [
50 "libext2_blkid",
51 ],
Tao Bao832c9cd2019-09-27 23:32:00 -070052}
53
Tao Baoe3f09a72019-10-01 11:55:36 -070054// A utility lib that's local to recovery (in contrast, libotautil is exposed to device-specific
55// recovery_ui lib as well as device-specific updater).
56cc_library_static {
57 name: "librecovery_utils",
58
59 recovery_available: true,
60
61 defaults: [
Tao Bao832c9cd2019-09-27 23:32:00 -070062 "librecovery_utils_defaults",
Tao Baoe3f09a72019-10-01 11:55:36 -070063 ],
64
65 srcs: [
Tao Bao832c9cd2019-09-27 23:32:00 -070066 "battery_utils.cpp",
Tao Baoe3f09a72019-10-01 11:55:36 -070067 "logging.cpp",
68 "parse_install_logs.cpp",
69 "roots.cpp",
70 "thermalutil.cpp",
71 ],
72
Tao Bao640175e2019-10-01 23:24:30 -070073 header_libs: [
74 "libvold_headers",
75 ],
76
Tao Baoe3f09a72019-10-01 11:55:36 -070077 export_include_dirs: [
78 "include",
79 ],
80
Tao Baoe3f09a72019-10-01 11:55:36 -070081 export_static_lib_headers: [
Tao Bao640175e2019-10-01 23:24:30 -070082 // roots.h includes <fstab/fstab.h>.
Tao Baoe3f09a72019-10-01 11:55:36 -070083 "libfstab",
84 ],
85
86 // Should avoid exposing to the libs that might be used in device-specific codes (e.g.
87 // libedify, libotautil, librecovery_ui).
88 visibility: [
89 "//bootable/recovery",
90 "//bootable/recovery/install",
Tao Baob548bea2019-09-30 16:16:07 -070091 "//bootable/recovery/minadbd",
Tao Baoe3f09a72019-10-01 11:55:36 -070092 "//bootable/recovery/tests",
93 ],
94}