blob: 840e50ab96233f96473a7619f3b44e5908af1166 [file] [log] [blame]
Tao Bao673bb6f2018-08-03 20:56:25 -07001// Copyright (C) 2018 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 Baoef5e38f2018-07-24 15:34:39 -070024cc_defaults {
Dan Willemsen5a678412020-01-15 09:38:09 -080025 name: "libupdater_static_libs",
Tao Bao673bb6f2018-08-03 20:56:25 -070026
Tao Bao673bb6f2018-08-03 20:56:25 -070027 static_libs: [
28 "libapplypatch",
29 "libbootloader_message",
30 "libbspatch",
31 "libedify",
Tao Bao673bb6f2018-08-03 20:56:25 -070032 "libotautil",
33 "libext4_utils",
Yifan Hong8ff84d72018-12-19 16:21:55 -080034 "libdm",
Tao Bao673bb6f2018-08-03 20:56:25 -070035 "libfec",
36 "libfec_rs",
Tianjie Xu2bb374a2019-11-22 13:46:19 -080037 "libavb",
Tao Bao673bb6f2018-08-03 20:56:25 -070038 "libverity_tree",
Tao Bao673bb6f2018-08-03 20:56:25 -070039 "libgtest_prod",
40 "liblog",
Yifan Hong8ff84d72018-12-19 16:21:55 -080041 "liblp",
Tao Bao673bb6f2018-08-03 20:56:25 -070042 "libselinux",
43 "libsparse",
44 "libsquashfs_utils",
45 "libbrotli",
46 "libbz",
47 "libziparchive",
48 "libz",
49 "libbase",
Tao Bao673bb6f2018-08-03 20:56:25 -070050 "libcrypto_utils",
51 "libcutils",
52 "libutils",
Tianjie Xuc1a5e262019-05-22 14:34:12 -070053 ],
Dan Willemsen5a678412020-01-15 09:38:09 -080054}
55
56cc_defaults {
57 name: "libupdater_defaults",
58
59 defaults: [
60 "recovery_defaults",
61 "libupdater_static_libs",
62 ],
Pete Bentley189d4242019-09-12 19:53:46 +010063
64 shared_libs: [
65 "libcrypto",
66 ],
Tianjie Xuc1a5e262019-05-22 14:34:12 -070067}
68
69cc_defaults {
70 name: "libupdater_device_defaults",
71
72 static_libs: [
73 "libfs_mgr",
Tao Bao673bb6f2018-08-03 20:56:25 -070074 "libtune2fs",
75
76 "libext2_com_err",
77 "libext2_blkid",
78 "libext2_quota",
79 "libext2_uuid",
80 "libext2_e2p",
81 "libext2fs",
Dan Willemsen5a678412020-01-15 09:38:09 -080082 ],
Tao Bao673bb6f2018-08-03 20:56:25 -070083}
Tao Baoef5e38f2018-07-24 15:34:39 -070084
85cc_library_static {
Tianjie Xuc1a5e262019-05-22 14:34:12 -070086 name: "libupdater_core",
87
88 host_supported: true,
Tao Baoef5e38f2018-07-24 15:34:39 -070089
90 defaults: [
91 "recovery_defaults",
92 "libupdater_defaults",
93 ],
94
95 srcs: [
96 "blockimg.cpp",
97 "commands.cpp",
98 "install.cpp",
Tao Baod628cfc2019-10-01 12:08:33 -070099 "mounts.cpp",
Tianjie Xu58d59122019-05-03 01:05:04 -0700100 "updater.cpp",
Tianjie Xuc1a5e262019-05-22 14:34:12 -0700101 ],
102
Tianjie Xu76e165d2019-05-30 10:24:47 -0700103 target: {
104 darwin: {
105 enabled: false,
106 },
107 },
108
Tianjie Xuc1a5e262019-05-22 14:34:12 -0700109 export_include_dirs: [
110 "include",
111 ],
112}
113
114cc_library_static {
115 name: "libupdater_device",
116
117 defaults: [
118 "recovery_defaults",
119 "libupdater_defaults",
120 "libupdater_device_defaults",
121 ],
122
123 srcs: [
124 "dynamic_partitions.cpp",
Tianjie Xu1536db82019-05-14 10:54:43 -0700125 "updater_runtime.cpp",
Tianjie Xud1188332019-05-24 16:08:45 -0700126 "updater_runtime_dynamic_partitions.cpp",
Tao Baoef5e38f2018-07-24 15:34:39 -0700127 ],
128
Tianjie Xuc1a5e262019-05-22 14:34:12 -0700129 static_libs: [
130 "libupdater_core",
131 ],
132
Tao Baoef5e38f2018-07-24 15:34:39 -0700133 include_dirs: [
134 "external/e2fsprogs/misc",
135 ],
136
137 export_include_dirs: [
138 "include",
139 ],
140}
Tianjie Xuc1a5e262019-05-22 14:34:12 -0700141
142cc_library_host_static {
143 name: "libupdater_host",
144
145 defaults: [
146 "recovery_defaults",
147 "libupdater_defaults",
148 ],
149
150 srcs: [
Tianjie Xu74b0f7c2019-05-22 13:59:57 -0700151 "build_info.cpp",
Tianjie Xud1188332019-05-24 16:08:45 -0700152 "dynamic_partitions.cpp",
Tianjie Xuc1a5e262019-05-22 14:34:12 -0700153 "simulator_runtime.cpp",
154 "target_files.cpp",
155 ],
156
157 static_libs: [
158 "libupdater_core",
159 "libfstab",
Tianjie Xu74b0f7c2019-05-22 13:59:57 -0700160 "libc++fs",
Tianjie Xuc1a5e262019-05-22 14:34:12 -0700161 ],
162
Tianjie Xu76e165d2019-05-30 10:24:47 -0700163 target: {
164 darwin: {
165 enabled: false,
166 },
167 },
168
Tianjie Xuc1a5e262019-05-22 14:34:12 -0700169 export_include_dirs: [
170 "include",
171 ],
172}
Dan Willemsen5a678412020-01-15 09:38:09 -0800173
174cc_binary_host {
175 name: "update_host_simulator",
176 defaults: ["libupdater_static_libs"],
177
178 srcs: ["update_simulator_main.cpp"],
179
180 cflags: [
181 "-Wall",
182 "-Werror",
183 ],
184
185 static_libs: [
186 "libupdater_host",
187 "libupdater_core",
188 "libcrypto_static",
189 "libfstab",
190 "libc++fs",
191 ],
192
193 target: {
194 darwin: {
195 enabled: false,
196 },
197 },
198}