]> git.ipfire.org Git - thirdparty/e2fsprogs.git/blame - misc/Android.bp
Update release notes, etc., for the 1.47.3-rc3 release
[thirdparty/e2fsprogs.git] / misc / Android.bp
CommitLineData
a95c632b
AD
1// Copyright 2017 The Android Open Source Project
2
3// Library used to export files from this directory to other programs in this
4// project.
9c897f01
BB
5package {
6 // See: http://go/android-license-faq
7 // A large-scale-change added 'default_applicable_licenses' to import
8 // all of the 'license_kinds' from "external_e2fsprogs_license"
9 // to get the below license kinds:
10 // SPDX-license-identifier-GPL
11 // SPDX-license-identifier-LGPL
12 // SPDX-license-identifier-LGPL-2.1
13 // SPDX-license-identifier-LGPL-3.0
14 default_applicable_licenses: ["external_e2fsprogs_license"],
15}
16
a95c632b
AD
17cc_library {
18 name: "libext2_misc",
19 host_supported: true,
722b9ca4 20 recovery_available: true,
90c534c7 21 vendor_available: true,
c19b18f8 22 defaults: ["e2fsprogs-defaults"],
a95c632b 23
0a3d8041
JQ
24 target: {
25 windows: {
182fa0cd 26 enabled: true,
0a3d8041
JQ
27 },
28 },
29
a95c632b
AD
30 srcs: [
31 "create_inode.c",
32 ],
a95c632b 33 shared_libs: [
a95c632b 34 "libext2fs",
5f6614f3
AG
35 "libext2_com_err",
36 "libext2_quota",
a95c632b 37 ],
a95c632b
AD
38 export_include_dirs: ["."],
39}
40
41//########################################################################
42// Build mke2fs
43
810f73f2
SP
44cc_defaults {
45 name: "mke2fs_defaults",
722b9ca4 46 recovery_available: true,
c19b18f8 47 defaults: ["e2fsprogs-defaults"],
a95c632b
AD
48
49 srcs: [
50 "mke2fs.c",
51 "util.c",
52 "mk_hugefiles.c",
53 "default_profile.c",
a95c632b 54 ],
810f73f2
SP
55 stl: "libc++_static",
56 include_dirs: ["external/e2fsprogs/e2fsck"],
57}
58
59cc_binary {
60 name: "mke2fs",
61 host_supported: true,
90c534c7 62 vendor_available: true,
810f73f2 63 defaults: ["mke2fs_defaults"],
bee92ebe
JQ
64 target: {
65 host: {
66 static_libs: [
67 "libext2_blkid",
68 "libext2_misc",
69 "libext2_uuid",
70 "libext2_quota",
71 "libext2_com_err",
72 "libext2_e2p",
73 "libext2fs",
74 "libsparse",
75 "libbase",
76 "libz",
77 ],
78 },
25a03337
SM
79 not_windows: {
80 required: [
81 "mke2fs.conf",
82 ],
83 },
0a3d8041 84 windows: {
0a3d8041 85 ldflags: ["-static"],
cdc9dbf3 86 enabled: true,
0a3d8041 87 },
bee92ebe 88 android: {
25a03337
SM
89 required: [
90 "mke2fs.conf",
91 ],
bee92ebe
JQ
92 shared_libs: [
93 "libext2fs",
94 "libext2_blkid",
95 "libext2_misc",
96 "libext2_uuid",
97 "libext2_quota",
98 "libext2_com_err",
99 "libext2_e2p",
100 ],
cdc9dbf3
EB
101 symlinks: [
102 "mkfs.ext2",
103 "mkfs.ext3",
104 "mkfs.ext4",
105 ],
bee92ebe
JQ
106 },
107 },
810f73f2
SP
108}
109
110cc_binary {
111 name: "mke2fs.microdroid",
112 defaults: ["mke2fs_defaults"],
113 bootstrap: true,
114 target: {
115 android: {
116 required: [
117 "mke2fs.conf",
118 ],
119 shared_libs: [
120 "libext2fs",
121 "libext2_blkid",
122 "libext2_misc",
123 "libext2_uuid",
124 "libext2_quota",
125 "libext2_com_err",
126 "libext2_e2p",
127 ],
128 symlinks: ["mkfs.ext4.microdroid"],
129 },
130 },
0cdf513e 131 no_full_install: true,
810f73f2
SP
132 stem: "mke2fs",
133 visibility: ["//packages/modules/Virtualization/microdroid"],
a95c632b
AD
134}
135
136//##########################################################################
137// Build tune2fs
138
139cc_defaults {
140 name: "tune2fs-defaults",
c19b18f8 141 defaults: ["e2fsprogs-defaults"],
a95c632b
AD
142 srcs: [
143 "tune2fs.c",
144 "util.c",
145 ],
c19b18f8 146 cflags: ["-DNO_RECOVERY"],
a95c632b
AD
147 include_dirs: ["external/e2fsprogs/e2fsck"],
148}
149
150tune2fs_libs = [
a95c632b 151 "libext2_blkid",
5f6614f3 152 "libext2_com_err",
a95c632b
AD
153 "libext2_quota",
154 "libext2_uuid",
155 "libext2_e2p",
156 "libext2fs",
157]
158
159cc_binary {
160 name: "tune2fs",
161 host_supported: true,
643ee340 162 vendor_ramdisk_available: true,
a95c632b
AD
163 defaults: ["tune2fs-defaults"],
164
165 shared_libs: tune2fs_libs,
a95c632b
AD
166}
167
168cc_binary {
169 name: "tune2fs_static",
170 static_executable: true,
171 defaults: ["tune2fs-defaults"],
172
33b80078 173 static_libs: tune2fs_libs,
a95c632b
AD
174}
175
247973bc
JK
176cc_binary {
177 name: "tune2fs_ramdisk",
178 stem: "tune2fs",
179 static_executable: true,
180 ramdisk: true,
181 defaults: ["tune2fs-defaults"],
247973bc
JK
182 static_libs: tune2fs_libs,
183}
184
a95c632b
AD
185cc_library_static {
186 name: "libtune2fs",
187 defaults: ["tune2fs-defaults"],
188
189 cflags: ["-DBUILD_AS_LIB"],
190 static_libs: tune2fs_libs,
191}
192
193//########################################################################
194// Build badblocks
195
4010ee52 196cc_binary_host {
a95c632b 197 name: "badblocks",
c19b18f8 198 defaults: ["e2fsprogs-defaults"],
a95c632b
AD
199
200 srcs: ["badblocks.c"],
a95c632b
AD
201 shared_libs: [
202 "libext2fs",
203 "libext2_com_err",
204 "libext2_uuid",
205 "libext2_blkid",
206 "libext2_e2p",
207 ],
a95c632b
AD
208}
209
210//########################################################################
211// Build chattr
212
213cc_binary {
470e78ae 214 name: "chattr-e2fsprogs",
a95c632b 215 host_supported: true,
c19b18f8 216 defaults: ["e2fsprogs-defaults"],
a95c632b
AD
217
218 srcs: ["chattr.c"],
a95c632b
AD
219 shared_libs: [
220 "libext2_com_err",
221 "libext2_e2p",
222 ],
a95c632b
AD
223}
224
225//########################################################################
226// Build lsattr
227
228cc_defaults {
229 name: "lsattr-defaults",
230 srcs: ["lsattr.c"],
c19b18f8 231 defaults: ["e2fsprogs-defaults"],
a95c632b
AD
232}
233
234lsattr_libs = [
235 "libext2_com_err",
236 "libext2_e2p",
237]
238
239cc_binary {
470e78ae 240 name: "lsattr-e2fsprogs",
a95c632b
AD
241 host_supported: true,
242 defaults: ["lsattr-defaults"],
243
244 shared_libs: lsattr_libs,
a95c632b
AD
245}
246
247cc_binary {
248 name: "lsattr_static",
249 static_executable: true,
250 defaults: ["lsattr-defaults"],
251
33b80078 252 static_libs: lsattr_libs,
a95c632b
AD
253}
254
255//########################################################################
256// Build blkid
257
258cc_binary {
259 name: "blkid",
218695a0 260 host_supported: true,
c19b18f8 261 defaults: ["e2fsprogs-defaults"],
a95c632b
AD
262
263 srcs: ["blkid.c"],
a95c632b
AD
264 shared_libs: [
265 "libext2fs",
266 "libext2_blkid",
267 "libext2_com_err",
268 "libext2_e2p",
269 ],
a95c632b
AD
270}
271
1f8c7016
DS
272cc_binary {
273 name: "blkid_static",
274 host_supported: true,
275 static_executable: true,
276 defaults: ["e2fsprogs-defaults"],
277
278 srcs: ["blkid.c"],
279 static_libs: [
280 "libext2fs",
281 "libext2_blkid",
282 "libext2_com_err",
283 "libext2_e2p",
284 "libext2_uuid",
285 ],
286}
287
a95c632b
AD
288//########################################################################
289// Build e4crypt
290
291cc_binary {
292 name: "e4crypt",
293 host_supported: true,
c19b18f8 294 defaults: ["e2fsprogs-defaults"],
a95c632b
AD
295
296 srcs: ["e4crypt.c"],
a95c632b
AD
297 shared_libs: [
298 "libext2fs",
299 "libext2_uuid",
300 ],
a95c632b
AD
301
302 target: {
303 darwin: {
304 enabled: false,
305 },
306 },
307}
308
309//##########################################################################
310// Build e2image
311
312cc_binary {
313 name: "e2image",
314 host_supported: true,
c19b18f8 315 defaults: ["e2fsprogs-defaults"],
a95c632b
AD
316
317 srcs: ["e2image.c"],
a95c632b
AD
318 shared_libs: [
319 "libext2fs",
320 "libext2_blkid",
321 "libext2_com_err",
322 "libext2_quota",
323 ],
a95c632b 324}
3e953c0a
SP
325
326//##########################################################################
327// Build filefrag
328
329cc_binary {
330 name: "filefrag",
331 host_supported: true,
332 defaults: ["e2fsprogs-defaults"],
333
334 srcs: ["filefrag.c"],
335 shared_libs: [
336 "libext2fs",
337 ],
3e953c0a 338}
d4197585
AB
339
340//##########################################################################
341// Build e2freefrag
342
343cc_binary {
344 name: "e2freefrag",
345 host_supported: true,
346 defaults: ["e2fsprogs-defaults"],
347
348 srcs: [
349 "e2freefrag.c",
350 ],
351 header_libs: ["libext2-headers"],
352 shared_libs: [
353 "libext2fs",
354 "libext2_com_err",
355 ],
d4197585 356}