blob: cbef43099c21385474e3aee9510b414bc458b640 [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",
28 "libverity_tree",
Tao Bao673bb6f2018-08-03 20:56:25 -070029 "libgtest_prod",
30 "liblog",
Yifan Hong8ff84d72018-12-19 16:21:55 -080031 "liblp",
Tao Bao673bb6f2018-08-03 20:56:25 -070032 "libselinux",
33 "libsparse",
34 "libsquashfs_utils",
35 "libbrotli",
36 "libbz",
37 "libziparchive",
38 "libz",
39 "libbase",
Tao Bao673bb6f2018-08-03 20:56:25 -070040 "libcrypto_utils",
41 "libcutils",
42 "libutils",
Tianjie Xuc1a5e262019-05-22 14:34:12 -070043 ],
Dan Willemsen5a678412020-01-15 09:38:09 -080044}
45
46cc_defaults {
47 name: "libupdater_defaults",
48
49 defaults: [
50 "recovery_defaults",
51 "libupdater_static_libs",
52 ],
Pete Bentley189d4242019-09-12 19:53:46 +010053
54 shared_libs: [
55 "libcrypto",
56 ],
Tianjie Xuc1a5e262019-05-22 14:34:12 -070057}
58
59cc_defaults {
60 name: "libupdater_device_defaults",
61
62 static_libs: [
63 "libfs_mgr",
Tao Bao673bb6f2018-08-03 20:56:25 -070064 "libtune2fs",
65
66 "libext2_com_err",
67 "libext2_blkid",
68 "libext2_quota",
69 "libext2_uuid",
70 "libext2_e2p",
71 "libext2fs",
Dan Willemsen5a678412020-01-15 09:38:09 -080072 ],
Tao Bao673bb6f2018-08-03 20:56:25 -070073}
Tao Baoef5e38f2018-07-24 15:34:39 -070074
75cc_library_static {
Tianjie Xuc1a5e262019-05-22 14:34:12 -070076 name: "libupdater_core",
77
78 host_supported: true,
Tao Baoef5e38f2018-07-24 15:34:39 -070079
80 defaults: [
81 "recovery_defaults",
82 "libupdater_defaults",
83 ],
84
85 srcs: [
86 "blockimg.cpp",
87 "commands.cpp",
88 "install.cpp",
Tao Baod628cfc2019-10-01 12:08:33 -070089 "mounts.cpp",
Tianjie Xu58d59122019-05-03 01:05:04 -070090 "updater.cpp",
Tianjie Xuc1a5e262019-05-22 14:34:12 -070091 ],
92
Tianjie Xu76e165d2019-05-30 10:24:47 -070093 target: {
94 darwin: {
95 enabled: false,
96 },
97 },
98
Tianjie Xuc1a5e262019-05-22 14:34:12 -070099 export_include_dirs: [
100 "include",
101 ],
102}
103
104cc_library_static {
105 name: "libupdater_device",
106
107 defaults: [
108 "recovery_defaults",
109 "libupdater_defaults",
110 "libupdater_device_defaults",
111 ],
112
113 srcs: [
114 "dynamic_partitions.cpp",
Tianjie Xu1536db82019-05-14 10:54:43 -0700115 "updater_runtime.cpp",
Tianjie Xud1188332019-05-24 16:08:45 -0700116 "updater_runtime_dynamic_partitions.cpp",
Tao Baoef5e38f2018-07-24 15:34:39 -0700117 ],
118
Tianjie Xuc1a5e262019-05-22 14:34:12 -0700119 static_libs: [
120 "libupdater_core",
121 ],
122
Tao Baoef5e38f2018-07-24 15:34:39 -0700123 include_dirs: [
124 "external/e2fsprogs/misc",
125 ],
126
127 export_include_dirs: [
128 "include",
129 ],
130}
Tianjie Xuc1a5e262019-05-22 14:34:12 -0700131
132cc_library_host_static {
133 name: "libupdater_host",
134
135 defaults: [
136 "recovery_defaults",
137 "libupdater_defaults",
138 ],
139
140 srcs: [
Tianjie Xu74b0f7c2019-05-22 13:59:57 -0700141 "build_info.cpp",
Tianjie Xud1188332019-05-24 16:08:45 -0700142 "dynamic_partitions.cpp",
Tianjie Xuc1a5e262019-05-22 14:34:12 -0700143 "simulator_runtime.cpp",
144 "target_files.cpp",
145 ],
146
147 static_libs: [
148 "libupdater_core",
149 "libfstab",
Tianjie Xu74b0f7c2019-05-22 13:59:57 -0700150 "libc++fs",
Tianjie Xuc1a5e262019-05-22 14:34:12 -0700151 ],
152
Tianjie Xu76e165d2019-05-30 10:24:47 -0700153 target: {
154 darwin: {
155 enabled: false,
156 },
157 },
158
Tianjie Xuc1a5e262019-05-22 14:34:12 -0700159 export_include_dirs: [
160 "include",
161 ],
162}
Dan Willemsen5a678412020-01-15 09:38:09 -0800163
164cc_binary_host {
165 name: "update_host_simulator",
166 defaults: ["libupdater_static_libs"],
167
168 srcs: ["update_simulator_main.cpp"],
169
170 cflags: [
171 "-Wall",
172 "-Werror",
173 ],
174
175 static_libs: [
176 "libupdater_host",
177 "libupdater_core",
178 "libcrypto_static",
179 "libfstab",
180 "libc++fs",
181 ],
182
183 target: {
184 darwin: {
185 enabled: false,
186 },
187 },
188}