blob: 35debaaf1c13848044f1e773188f7fca5ac30891 [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 "liblog",
Yifan Hong8ff84d72018-12-19 16:21:55 -080040 "liblp",
Tao Bao673bb6f2018-08-03 20:56:25 -070041 "libselinux",
42 "libsparse",
43 "libsquashfs_utils",
44 "libbrotli",
45 "libbz",
46 "libziparchive",
47 "libz",
48 "libbase",
Tao Bao673bb6f2018-08-03 20:56:25 -070049 "libcrypto_utils",
50 "libcutils",
51 "libutils",
Tianjie Xuc1a5e262019-05-22 14:34:12 -070052 ],
Elliott Hughesa85d7a02021-04-20 11:58:05 -070053 header_libs: [
54 "libgtest_prod_headers",
55 ],
Dan Willemsen5a678412020-01-15 09:38:09 -080056}
57
58cc_defaults {
59 name: "libupdater_defaults",
60
61 defaults: [
62 "recovery_defaults",
63 "libupdater_static_libs",
64 ],
Pete Bentley189d4242019-09-12 19:53:46 +010065
66 shared_libs: [
67 "libcrypto",
68 ],
Tianjie Xuc1a5e262019-05-22 14:34:12 -070069}
70
71cc_defaults {
72 name: "libupdater_device_defaults",
73
74 static_libs: [
75 "libfs_mgr",
Tao Bao673bb6f2018-08-03 20:56:25 -070076 "libtune2fs",
77
78 "libext2_com_err",
79 "libext2_blkid",
80 "libext2_quota",
81 "libext2_uuid",
82 "libext2_e2p",
83 "libext2fs",
Dan Willemsen5a678412020-01-15 09:38:09 -080084 ],
Tao Bao673bb6f2018-08-03 20:56:25 -070085}
Tao Baoef5e38f2018-07-24 15:34:39 -070086
87cc_library_static {
Tianjie Xuc1a5e262019-05-22 14:34:12 -070088 name: "libupdater_core",
89
90 host_supported: true,
Tao Baoef5e38f2018-07-24 15:34:39 -070091
92 defaults: [
93 "recovery_defaults",
94 "libupdater_defaults",
95 ],
96
97 srcs: [
98 "blockimg.cpp",
99 "commands.cpp",
100 "install.cpp",
Tao Baod628cfc2019-10-01 12:08:33 -0700101 "mounts.cpp",
Tianjie Xu58d59122019-05-03 01:05:04 -0700102 "updater.cpp",
Tianjie Xuc1a5e262019-05-22 14:34:12 -0700103 ],
104
Tianjie Xu76e165d2019-05-30 10:24:47 -0700105 target: {
106 darwin: {
107 enabled: false,
108 },
109 },
110
Tianjie Xuc1a5e262019-05-22 14:34:12 -0700111 export_include_dirs: [
112 "include",
113 ],
114}
115
116cc_library_static {
117 name: "libupdater_device",
118
119 defaults: [
120 "recovery_defaults",
121 "libupdater_defaults",
122 "libupdater_device_defaults",
123 ],
124
125 srcs: [
126 "dynamic_partitions.cpp",
Tianjie Xu1536db82019-05-14 10:54:43 -0700127 "updater_runtime.cpp",
Tianjie Xud1188332019-05-24 16:08:45 -0700128 "updater_runtime_dynamic_partitions.cpp",
Tao Baoef5e38f2018-07-24 15:34:39 -0700129 ],
130
Tianjie Xuc1a5e262019-05-22 14:34:12 -0700131 static_libs: [
132 "libupdater_core",
133 ],
134
Tao Baoef5e38f2018-07-24 15:34:39 -0700135 include_dirs: [
136 "external/e2fsprogs/misc",
137 ],
138
139 export_include_dirs: [
140 "include",
141 ],
142}
Tianjie Xuc1a5e262019-05-22 14:34:12 -0700143
144cc_library_host_static {
145 name: "libupdater_host",
146
147 defaults: [
148 "recovery_defaults",
149 "libupdater_defaults",
150 ],
151
152 srcs: [
Tianjie Xu74b0f7c2019-05-22 13:59:57 -0700153 "build_info.cpp",
Tianjie Xud1188332019-05-24 16:08:45 -0700154 "dynamic_partitions.cpp",
Tianjie Xuc1a5e262019-05-22 14:34:12 -0700155 "simulator_runtime.cpp",
156 "target_files.cpp",
157 ],
158
159 static_libs: [
160 "libupdater_core",
161 "libfstab",
Tianjie Xu74b0f7c2019-05-22 13:59:57 -0700162 "libc++fs",
Tianjie Xuc1a5e262019-05-22 14:34:12 -0700163 ],
164
Tianjie Xu76e165d2019-05-30 10:24:47 -0700165 target: {
166 darwin: {
167 enabled: false,
168 },
169 },
170
Tianjie Xuc1a5e262019-05-22 14:34:12 -0700171 export_include_dirs: [
172 "include",
173 ],
174}
Dan Willemsen5a678412020-01-15 09:38:09 -0800175
176cc_binary_host {
177 name: "update_host_simulator",
178 defaults: ["libupdater_static_libs"],
179
180 srcs: ["update_simulator_main.cpp"],
181
182 cflags: [
183 "-Wall",
184 "-Werror",
185 ],
186
187 static_libs: [
188 "libupdater_host",
189 "libupdater_core",
190 "libcrypto_static",
191 "libfstab",
192 "libc++fs",
193 ],
194
195 target: {
196 darwin: {
197 enabled: false,
198 },
199 },
200}