blob: f00a192b97bb6096de96dc6566109b0e40a0d134 [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
Tao Baoef5e38f2018-07-24 15:34:39 -070015cc_defaults {
Dan Willemsen5a678412020-01-15 09:38:09 -080016 name: "libupdater_static_libs",
Tao Bao673bb6f2018-08-03 20:56:25 -070017
Tao Bao673bb6f2018-08-03 20:56:25 -070018 static_libs: [
19 "libapplypatch",
20 "libbootloader_message",
21 "libbspatch",
22 "libedify",
Tao Bao673bb6f2018-08-03 20:56:25 -070023 "libotautil",
24 "libext4_utils",
Yifan Hong8ff84d72018-12-19 16:21:55 -080025 "libdm",
Tao Bao673bb6f2018-08-03 20:56:25 -070026 "libfec",
27 "libfec_rs",
Tianjie Xu2bb374a2019-11-22 13:46:19 -080028 "libavb",
Tao Bao673bb6f2018-08-03 20:56:25 -070029 "libverity_tree",
Tao Bao673bb6f2018-08-03 20:56:25 -070030 "libgtest_prod",
31 "liblog",
Yifan Hong8ff84d72018-12-19 16:21:55 -080032 "liblp",
Tao Bao673bb6f2018-08-03 20:56:25 -070033 "libselinux",
34 "libsparse",
35 "libsquashfs_utils",
36 "libbrotli",
37 "libbz",
38 "libziparchive",
39 "libz",
40 "libbase",
Tao Bao673bb6f2018-08-03 20:56:25 -070041 "libcrypto_utils",
42 "libcutils",
43 "libutils",
Tianjie Xuc1a5e262019-05-22 14:34:12 -070044 ],
Dan Willemsen5a678412020-01-15 09:38:09 -080045}
46
47cc_defaults {
48 name: "libupdater_defaults",
49
50 defaults: [
51 "recovery_defaults",
52 "libupdater_static_libs",
53 ],
Pete Bentley189d4242019-09-12 19:53:46 +010054
55 shared_libs: [
56 "libcrypto",
57 ],
Tianjie Xuc1a5e262019-05-22 14:34:12 -070058}
59
60cc_defaults {
61 name: "libupdater_device_defaults",
62
63 static_libs: [
64 "libfs_mgr",
Tao Bao673bb6f2018-08-03 20:56:25 -070065 "libtune2fs",
66
67 "libext2_com_err",
68 "libext2_blkid",
69 "libext2_quota",
70 "libext2_uuid",
71 "libext2_e2p",
72 "libext2fs",
Dan Willemsen5a678412020-01-15 09:38:09 -080073 ],
Tao Bao673bb6f2018-08-03 20:56:25 -070074}
Tao Baoef5e38f2018-07-24 15:34:39 -070075
76cc_library_static {
Tianjie Xuc1a5e262019-05-22 14:34:12 -070077 name: "libupdater_core",
78
79 host_supported: true,
Tao Baoef5e38f2018-07-24 15:34:39 -070080
81 defaults: [
82 "recovery_defaults",
83 "libupdater_defaults",
84 ],
85
86 srcs: [
87 "blockimg.cpp",
88 "commands.cpp",
89 "install.cpp",
Tao Baod628cfc2019-10-01 12:08:33 -070090 "mounts.cpp",
Tianjie Xu58d59122019-05-03 01:05:04 -070091 "updater.cpp",
Tianjie Xuc1a5e262019-05-22 14:34:12 -070092 ],
93
Tianjie Xu76e165d2019-05-30 10:24:47 -070094 target: {
95 darwin: {
96 enabled: false,
97 },
98 },
99
Tianjie Xuc1a5e262019-05-22 14:34:12 -0700100 export_include_dirs: [
101 "include",
102 ],
103}
104
105cc_library_static {
106 name: "libupdater_device",
107
108 defaults: [
109 "recovery_defaults",
110 "libupdater_defaults",
111 "libupdater_device_defaults",
112 ],
113
114 srcs: [
115 "dynamic_partitions.cpp",
Tianjie Xu1536db82019-05-14 10:54:43 -0700116 "updater_runtime.cpp",
Tianjie Xud1188332019-05-24 16:08:45 -0700117 "updater_runtime_dynamic_partitions.cpp",
Tao Baoef5e38f2018-07-24 15:34:39 -0700118 ],
119
Tianjie Xuc1a5e262019-05-22 14:34:12 -0700120 static_libs: [
121 "libupdater_core",
122 ],
123
Tao Baoef5e38f2018-07-24 15:34:39 -0700124 include_dirs: [
125 "external/e2fsprogs/misc",
126 ],
127
128 export_include_dirs: [
129 "include",
130 ],
131}
Tianjie Xuc1a5e262019-05-22 14:34:12 -0700132
133cc_library_host_static {
134 name: "libupdater_host",
135
136 defaults: [
137 "recovery_defaults",
138 "libupdater_defaults",
139 ],
140
141 srcs: [
Tianjie Xu74b0f7c2019-05-22 13:59:57 -0700142 "build_info.cpp",
Tianjie Xud1188332019-05-24 16:08:45 -0700143 "dynamic_partitions.cpp",
Tianjie Xuc1a5e262019-05-22 14:34:12 -0700144 "simulator_runtime.cpp",
145 "target_files.cpp",
146 ],
147
148 static_libs: [
149 "libupdater_core",
150 "libfstab",
Tianjie Xu74b0f7c2019-05-22 13:59:57 -0700151 "libc++fs",
Tianjie Xuc1a5e262019-05-22 14:34:12 -0700152 ],
153
Tianjie Xu76e165d2019-05-30 10:24:47 -0700154 target: {
155 darwin: {
156 enabled: false,
157 },
158 },
159
Tianjie Xuc1a5e262019-05-22 14:34:12 -0700160 export_include_dirs: [
161 "include",
162 ],
163}
Dan Willemsen5a678412020-01-15 09:38:09 -0800164
165cc_binary_host {
166 name: "update_host_simulator",
167 defaults: ["libupdater_static_libs"],
168
169 srcs: ["update_simulator_main.cpp"],
170
171 cflags: [
172 "-Wall",
173 "-Werror",
174 ],
175
176 static_libs: [
177 "libupdater_host",
178 "libupdater_core",
179 "libcrypto_static",
180 "libfstab",
181 "libc++fs",
182 ],
183
184 target: {
185 darwin: {
186 enabled: false,
187 },
188 },
189}