blob: ef18116be5dda8fee1b7e5b588aa6d3d8839657a [file] [log] [blame]
xunchang24788852019-03-22 16:08:52 -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
xunchang24788852019-03-22 16:08:52 -070024cc_defaults {
25 name: "libinstall_defaults",
26
27 defaults: [
28 "recovery_defaults",
Kelvin Zhange6312252021-05-14 17:15:50 -040029 "libspl_check_defaults",
xunchang24788852019-03-22 16:08:52 -070030 ],
31
bigbiff673c7ae2020-12-02 19:44:56 -050032 cflags: [
33 //"-DRECOVERY_API_VERSION=3"
xunchang95d67322019-04-05 16:16:07 -070034 ],
35
xunchang24788852019-03-22 16:08:52 -070036 shared_libs: [
37 "libbase",
38 "libbootloader_message",
39 "libcrypto",
40 "libext4_utils",
41 "libfs_mgr",
42 "libfusesideload",
43 "libhidl-gen-utils",
44 "libhidlbase",
xunchang24788852019-03-22 16:08:52 -070045 "liblog",
46 "libselinux",
47 "libtinyxml2",
48 "libutils",
49 "libz",
50 "libziparchive",
51 ],
52
53 static_libs: [
Tao Baoe3f09a72019-10-01 11:55:36 -070054 "librecovery_utils",
xunchang24788852019-03-22 16:08:52 -070055 "libotautil",
David Anderson89d2d052019-10-15 13:22:20 -070056 "libsnapshot_nobinder",
Kelvin Zhange6312252021-05-14 17:15:50 -040057 "ota_metadata_proto_cc",
xunchang24788852019-03-22 16:08:52 -070058
59 // external dependencies
xunchang24788852019-03-22 16:08:52 -070060 "libvintf",
xunchang24788852019-03-22 16:08:52 -070061 ],
62}
63
Kelvin Zhange6312252021-05-14 17:15:50 -040064cc_test_host {
65 name: "libinstall_host_unittests",
66 defaults: [
67 "libspl_check_defaults"
68 ],
69 srcs: [
70 "spl_check_unittests.cpp",
71 ],
72 static_libs: [
73 "libspl_check",
74 ],
75}
76
77cc_defaults {
78 name: "libspl_check_defaults",
79 static_libs: [
80 "libbase",
81 "ota_metadata_proto_cc",
82 "liblog",
83 "libziparchive",
84 "libz",
85 "libprotobuf-cpp-lite",
86 ],
87}
88
89cc_library_static {
90 name: "libspl_check",
91 recovery_available: true,
92 host_supported: true,
93 defaults: [
94 "libspl_check_defaults",
95 ],
96 srcs: ["spl_check.cpp"],
97 export_include_dirs: [
98 "include",
99 ],
100}
101
Tao Bao2f8afba2019-04-08 11:26:11 -0700102cc_library_static {
xunchang24788852019-03-22 16:08:52 -0700103 name: "libinstall",
104 recovery_available: true,
105
106 defaults: [
107 "libinstall_defaults",
108 ],
109
110 srcs: [
111 "adb_install.cpp",
112 "asn1_decoder.cpp",
Tianjie Xuf6158eb2019-06-11 16:09:07 -0700113 "fuse_install.cpp",
xunchang24788852019-03-22 16:08:52 -0700114 "install.cpp",
115 "package.cpp",
David Anderson89d2d052019-10-15 13:22:20 -0700116 "snapshot_utils.cpp",
xunchang24788852019-03-22 16:08:52 -0700117 "verifier.cpp",
xunchang388d2532019-04-12 16:22:15 -0700118 "wipe_data.cpp",
Tao Bao7f19d102019-04-26 22:56:56 -0700119 "wipe_device.cpp",
Kelvin Zhange6312252021-05-14 17:15:50 -0400120 "spl_check.cpp",
xunchang24788852019-03-22 16:08:52 -0700121 ],
122
Tao Bao3305d482019-09-26 00:02:29 -0700123 header_libs: [
124 "libminadbd_headers",
xunchang24788852019-03-22 16:08:52 -0700125 ],
126
127 shared_libs: [
128 "librecovery_ui",
129 ],
130
131 export_include_dirs: [
132 "include",
133 ],
134
135 export_shared_lib_headers: [
136 "librecovery_ui",
137 ],
138}