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