Whamcloud - gitweb
LU-6722 jbd: double minimum journal size for RHEL7
[tools/e2fsprogs.git] / misc / Android.bp
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.
5 package {
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
17 cc_library {
18     name: "libext2_misc",
19     host_supported: true,
20     recovery_available: true,
21     defaults: ["e2fsprogs-defaults"],
22
23     target: {
24         windows: {
25             enabled: true,
26         },
27     },
28
29     srcs: [
30         "create_inode.c",
31     ],
32     shared_libs: [
33         "libext2fs",
34         "libext2_com_err",
35         "libext2_quota",
36     ],
37     export_include_dirs: ["."],
38 }
39
40 //########################################################################
41 // Build mke2fs
42
43 cc_defaults {
44     name: "mke2fs_defaults",
45     recovery_available: true,
46     defaults: ["e2fsprogs-defaults"],
47
48     srcs: [
49         "mke2fs.c",
50         "util.c",
51         "mk_hugefiles.c",
52         "default_profile.c",
53     ],
54     stl: "libc++_static",
55     include_dirs: ["external/e2fsprogs/e2fsck"],
56 }
57
58 cc_binary {
59     name: "mke2fs",
60     host_supported: true,
61     defaults: ["mke2fs_defaults"],
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         },
77         not_windows: {
78             required: [
79                 "mke2fs.conf",
80             ],
81         },
82         windows: {
83             ldflags: ["-static"],
84             enabled: true,
85         },
86         android: {
87             required: [
88                 "mke2fs.conf",
89             ],
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             ],
99             symlinks: [
100                 "mkfs.ext2",
101                 "mkfs.ext3",
102                 "mkfs.ext4",
103             ],
104         },
105     },
106 }
107
108 cc_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"],
132 }
133
134 //##########################################################################
135 // Build tune2fs
136
137 cc_defaults {
138     name: "tune2fs-defaults",
139     defaults: ["e2fsprogs-defaults"],
140     srcs: [
141         "tune2fs.c",
142         "util.c",
143     ],
144     cflags: ["-DNO_RECOVERY"],
145     include_dirs: ["external/e2fsprogs/e2fsck"],
146 }
147
148 tune2fs_libs = [
149     "libext2_blkid",
150     "libext2_com_err",
151     "libext2_quota",
152     "libext2_uuid",
153     "libext2_e2p",
154     "libext2fs",
155 ]
156
157 cc_binary {
158     name: "tune2fs",
159     host_supported: true,
160     vendor_ramdisk_available: true,
161     defaults: ["tune2fs-defaults"],
162
163     shared_libs: tune2fs_libs,
164 }
165
166 cc_binary {
167     name: "tune2fs_static",
168     static_executable: true,
169     defaults: ["tune2fs-defaults"],
170
171     static_libs: tune2fs_libs,
172 }
173
174 cc_binary {
175     name: "tune2fs_ramdisk",
176     stem: "tune2fs",
177     static_executable: true,
178     ramdisk: true,
179     defaults: ["tune2fs-defaults"],
180     static_libs: tune2fs_libs,
181 }
182
183 cc_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
194 cc_binary {
195     name: "badblocks",
196     host_supported: true,
197     defaults: ["e2fsprogs-defaults"],
198
199     srcs: ["badblocks.c"],
200     shared_libs: [
201         "libext2fs",
202         "libext2_com_err",
203         "libext2_uuid",
204         "libext2_blkid",
205         "libext2_e2p",
206     ],
207 }
208
209 //########################################################################
210 // Build chattr
211
212 cc_binary {
213     name: "chattr-e2fsprogs",
214     host_supported: true,
215     defaults: ["e2fsprogs-defaults"],
216
217     srcs: ["chattr.c"],
218     shared_libs: [
219         "libext2_com_err",
220         "libext2_e2p",
221     ],
222 }
223
224 //########################################################################
225 // Build lsattr
226
227 cc_defaults {
228     name: "lsattr-defaults",
229     srcs: ["lsattr.c"],
230     defaults: ["e2fsprogs-defaults"],
231 }
232
233 lsattr_libs = [
234     "libext2_com_err",
235     "libext2_e2p",
236 ]
237
238 cc_binary {
239     name: "lsattr-e2fsprogs",
240     host_supported: true,
241     defaults: ["lsattr-defaults"],
242
243     shared_libs: lsattr_libs,
244 }
245
246 cc_binary {
247     name: "lsattr_static",
248     static_executable: true,
249     defaults: ["lsattr-defaults"],
250
251     static_libs: lsattr_libs,
252 }
253
254 //########################################################################
255 // Build blkid
256
257 cc_binary {
258     name: "blkid",
259     host_supported: true,
260     defaults: ["e2fsprogs-defaults"],
261
262     srcs: ["blkid.c"],
263     shared_libs: [
264         "libext2fs",
265         "libext2_blkid",
266         "libext2_com_err",
267         "libext2_e2p",
268     ],
269 }
270
271 cc_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
287 //########################################################################
288 // Build e4crypt
289
290 cc_binary {
291     name: "e4crypt",
292     host_supported: true,
293     defaults: ["e2fsprogs-defaults"],
294
295     srcs: ["e4crypt.c"],
296     shared_libs: [
297         "libext2fs",
298         "libext2_uuid",
299     ],
300
301     target: {
302         darwin: {
303             enabled: false,
304         },
305     },
306 }
307
308 //##########################################################################
309 // Build e2image
310
311 cc_binary {
312     name: "e2image",
313     host_supported: true,
314     defaults: ["e2fsprogs-defaults"],
315
316     srcs: ["e2image.c"],
317     shared_libs: [
318         "libext2fs",
319         "libext2_blkid",
320         "libext2_com_err",
321         "libext2_quota",
322     ],
323 }
324
325 //##########################################################################
326 // Build filefrag
327
328 cc_binary {
329     name: "filefrag",
330     host_supported: true,
331     defaults: ["e2fsprogs-defaults"],
332
333     srcs: ["filefrag.c"],
334     shared_libs: [
335         "libext2fs",
336     ],
337 }
338
339 //##########################################################################
340 // Build e2freefrag
341
342 cc_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     ],
355 }