xref: /aosp_15_r20/external/f2fs-tools/Android.bp (revision 59bfda1f02d633cd6b8b69f31eee485d40f6eef6)
1*59bfda1fSAndroid Build Coastguard Worker// Copyright 2017 The Android Open Source Project
2*59bfda1fSAndroid Build Coastguard Worker
3*59bfda1fSAndroid Build Coastguard Workerpackage {
4*59bfda1fSAndroid Build Coastguard Worker    default_applicable_licenses: ["external_f2fs-tools_license"],
5*59bfda1fSAndroid Build Coastguard Worker}
6*59bfda1fSAndroid Build Coastguard Worker
7*59bfda1fSAndroid Build Coastguard Worker// Added automatically by a large-scale-change that took the approach of
8*59bfda1fSAndroid Build Coastguard Worker// 'apply every license found to every target'. While this makes sure we respect
9*59bfda1fSAndroid Build Coastguard Worker// every license restriction, it may not be entirely correct.
10*59bfda1fSAndroid Build Coastguard Worker//
11*59bfda1fSAndroid Build Coastguard Worker// e.g. GPL in an MIT project might only apply to the contrib/ directory.
12*59bfda1fSAndroid Build Coastguard Worker//
13*59bfda1fSAndroid Build Coastguard Worker// Please consider splitting the single license below into multiple licenses,
14*59bfda1fSAndroid Build Coastguard Worker// taking care not to lose any license_kind information, and overriding the
15*59bfda1fSAndroid Build Coastguard Worker// default license using the 'licenses: [...]' property on targets as needed.
16*59bfda1fSAndroid Build Coastguard Worker//
17*59bfda1fSAndroid Build Coastguard Worker// For unused files, consider creating a 'fileGroup' with "//visibility:private"
18*59bfda1fSAndroid Build Coastguard Worker// to attach the license to, and including a comment whether the files may be
19*59bfda1fSAndroid Build Coastguard Worker// used in the current project.
20*59bfda1fSAndroid Build Coastguard Worker//
21*59bfda1fSAndroid Build Coastguard Worker// large-scale-change included anything that looked like it might be a license
22*59bfda1fSAndroid Build Coastguard Worker// text as a license_text. e.g. LICENSE, NOTICE, COPYING etc.
23*59bfda1fSAndroid Build Coastguard Worker//
24*59bfda1fSAndroid Build Coastguard Worker// Please consider removing redundant or irrelevant files from 'license_text:'.
25*59bfda1fSAndroid Build Coastguard Worker// See: http://go/android-license-faq
26*59bfda1fSAndroid Build Coastguard Workerlicense {
27*59bfda1fSAndroid Build Coastguard Worker    name: "external_f2fs-tools_license",
28*59bfda1fSAndroid Build Coastguard Worker    visibility: [":__subpackages__"],
29*59bfda1fSAndroid Build Coastguard Worker    license_kinds: [
30*59bfda1fSAndroid Build Coastguard Worker        "SPDX-license-identifier-BSD",
31*59bfda1fSAndroid Build Coastguard Worker        "SPDX-license-identifier-GPL",
32*59bfda1fSAndroid Build Coastguard Worker        "SPDX-license-identifier-GPL-2.0",
33*59bfda1fSAndroid Build Coastguard Worker        "SPDX-license-identifier-LGPL",
34*59bfda1fSAndroid Build Coastguard Worker        "SPDX-license-identifier-LGPL-2.1",
35*59bfda1fSAndroid Build Coastguard Worker    ],
36*59bfda1fSAndroid Build Coastguard Worker    license_text: [
37*59bfda1fSAndroid Build Coastguard Worker        "COPYING",
38*59bfda1fSAndroid Build Coastguard Worker        "NOTICE",
39*59bfda1fSAndroid Build Coastguard Worker    ],
40*59bfda1fSAndroid Build Coastguard Worker}
41*59bfda1fSAndroid Build Coastguard Worker
42*59bfda1fSAndroid Build Coastguard Workercc_defaults {
43*59bfda1fSAndroid Build Coastguard Worker    name: "f2fs-tools-defaults",
44*59bfda1fSAndroid Build Coastguard Worker    cflags: [
45*59bfda1fSAndroid Build Coastguard Worker        "-DF2FS_MAJOR_VERSION=1",
46*59bfda1fSAndroid Build Coastguard Worker        "-DF2FS_MINOR_VERSION=16",
47*59bfda1fSAndroid Build Coastguard Worker        "-DF2FS_TOOLS_VERSION=\"1.16.0\"",
48*59bfda1fSAndroid Build Coastguard Worker        "-DF2FS_TOOLS_DATE=\"2023-04-11\"",
49*59bfda1fSAndroid Build Coastguard Worker        "-DWITH_ANDROID",
50*59bfda1fSAndroid Build Coastguard Worker        "-D_FILE_OFFSET_BITS=64",
51*59bfda1fSAndroid Build Coastguard Worker        "-Wall",
52*59bfda1fSAndroid Build Coastguard Worker        "-Werror",
53*59bfda1fSAndroid Build Coastguard Worker        "-Wno-macro-redefined",
54*59bfda1fSAndroid Build Coastguard Worker        "-Wno-missing-field-initializers",
55*59bfda1fSAndroid Build Coastguard Worker        "-Wno-pointer-arith",
56*59bfda1fSAndroid Build Coastguard Worker        "-Wno-sign-compare",
57*59bfda1fSAndroid Build Coastguard Worker    ],
58*59bfda1fSAndroid Build Coastguard Worker    local_include_dirs: [
59*59bfda1fSAndroid Build Coastguard Worker        "include",
60*59bfda1fSAndroid Build Coastguard Worker        "mkfs",
61*59bfda1fSAndroid Build Coastguard Worker        "fsck",
62*59bfda1fSAndroid Build Coastguard Worker    ],
63*59bfda1fSAndroid Build Coastguard Worker    target: {
64*59bfda1fSAndroid Build Coastguard Worker        windows: {
65*59bfda1fSAndroid Build Coastguard Worker            enabled: false,
66*59bfda1fSAndroid Build Coastguard Worker        },
67*59bfda1fSAndroid Build Coastguard Worker    },
68*59bfda1fSAndroid Build Coastguard Worker}
69*59bfda1fSAndroid Build Coastguard Worker
70*59bfda1fSAndroid Build Coastguard Workercc_defaults {
71*59bfda1fSAndroid Build Coastguard Worker    name: "libf2fs_src_files",
72*59bfda1fSAndroid Build Coastguard Worker    cflags: ["-DWITH_BLKDISCARD"],
73*59bfda1fSAndroid Build Coastguard Worker    srcs: [
74*59bfda1fSAndroid Build Coastguard Worker        "lib/libf2fs.c",
75*59bfda1fSAndroid Build Coastguard Worker        "mkfs/f2fs_format.c",
76*59bfda1fSAndroid Build Coastguard Worker        "mkfs/f2fs_format_utils.c",
77*59bfda1fSAndroid Build Coastguard Worker        "lib/libf2fs_zoned.c",
78*59bfda1fSAndroid Build Coastguard Worker        "lib/nls_utf8.c",
79*59bfda1fSAndroid Build Coastguard Worker    ],
80*59bfda1fSAndroid Build Coastguard Worker    static_libs: [
81*59bfda1fSAndroid Build Coastguard Worker        "libext2_uuid",
82*59bfda1fSAndroid Build Coastguard Worker    ],
83*59bfda1fSAndroid Build Coastguard Worker}
84*59bfda1fSAndroid Build Coastguard Worker
85*59bfda1fSAndroid Build Coastguard Workercc_defaults {
86*59bfda1fSAndroid Build Coastguard Worker    name: "make_f2fs_src_files",
87*59bfda1fSAndroid Build Coastguard Worker    srcs: [
88*59bfda1fSAndroid Build Coastguard Worker        "lib/libf2fs_io.c",
89*59bfda1fSAndroid Build Coastguard Worker        "mkfs/f2fs_format_main.c",
90*59bfda1fSAndroid Build Coastguard Worker    ],
91*59bfda1fSAndroid Build Coastguard Worker}
92*59bfda1fSAndroid Build Coastguard Worker
93*59bfda1fSAndroid Build Coastguard Workercc_defaults {
94*59bfda1fSAndroid Build Coastguard Worker    name: "fsck_main_src_files",
95*59bfda1fSAndroid Build Coastguard Worker    srcs: [
96*59bfda1fSAndroid Build Coastguard Worker        "fsck/dir.c",
97*59bfda1fSAndroid Build Coastguard Worker        "fsck/dict.c",
98*59bfda1fSAndroid Build Coastguard Worker        "fsck/mkquota.c",
99*59bfda1fSAndroid Build Coastguard Worker        "fsck/quotaio.c",
100*59bfda1fSAndroid Build Coastguard Worker        "fsck/quotaio_tree.c",
101*59bfda1fSAndroid Build Coastguard Worker        "fsck/quotaio_v2.c",
102*59bfda1fSAndroid Build Coastguard Worker        "fsck/node.c",
103*59bfda1fSAndroid Build Coastguard Worker        "fsck/segment.c",
104*59bfda1fSAndroid Build Coastguard Worker        "fsck/xattr.c",
105*59bfda1fSAndroid Build Coastguard Worker        "fsck/main.c",
106*59bfda1fSAndroid Build Coastguard Worker        "fsck/mount.c",
107*59bfda1fSAndroid Build Coastguard Worker        "lib/libf2fs.c",
108*59bfda1fSAndroid Build Coastguard Worker        "lib/libf2fs_io.c",
109*59bfda1fSAndroid Build Coastguard Worker        "lib/libf2fs_zoned.c",
110*59bfda1fSAndroid Build Coastguard Worker        "lib/nls_utf8.c",
111*59bfda1fSAndroid Build Coastguard Worker        "fsck/dump.c",
112*59bfda1fSAndroid Build Coastguard Worker    ],
113*59bfda1fSAndroid Build Coastguard Worker}
114*59bfda1fSAndroid Build Coastguard Worker
115*59bfda1fSAndroid Build Coastguard Workercc_library_static {
116*59bfda1fSAndroid Build Coastguard Worker    name: "libf2fs_fmt",
117*59bfda1fSAndroid Build Coastguard Worker    recovery_available: true,
118*59bfda1fSAndroid Build Coastguard Worker    defaults: [
119*59bfda1fSAndroid Build Coastguard Worker        "f2fs-tools-defaults",
120*59bfda1fSAndroid Build Coastguard Worker        "libf2fs_src_files"
121*59bfda1fSAndroid Build Coastguard Worker    ],
122*59bfda1fSAndroid Build Coastguard Worker}
123*59bfda1fSAndroid Build Coastguard Worker
124*59bfda1fSAndroid Build Coastguard Workercc_library_host_static {
125*59bfda1fSAndroid Build Coastguard Worker    name: "libf2fs_fmt_host",
126*59bfda1fSAndroid Build Coastguard Worker    defaults: [
127*59bfda1fSAndroid Build Coastguard Worker        "f2fs-tools-defaults",
128*59bfda1fSAndroid Build Coastguard Worker        "libf2fs_src_files"
129*59bfda1fSAndroid Build Coastguard Worker    ],
130*59bfda1fSAndroid Build Coastguard Worker    target: {
131*59bfda1fSAndroid Build Coastguard Worker        windows: {
132*59bfda1fSAndroid Build Coastguard Worker            include_dirs: [ "external/e2fsprogs/include/mingw" ],
133*59bfda1fSAndroid Build Coastguard Worker            cflags: [
134*59bfda1fSAndroid Build Coastguard Worker                "-DANDROID_WINDOWS_HOST",
135*59bfda1fSAndroid Build Coastguard Worker                "-Wno-typedef-redefinition",
136*59bfda1fSAndroid Build Coastguard Worker                "-Wno-unused-parameter",
137*59bfda1fSAndroid Build Coastguard Worker            ],
138*59bfda1fSAndroid Build Coastguard Worker            enabled: true
139*59bfda1fSAndroid Build Coastguard Worker        },
140*59bfda1fSAndroid Build Coastguard Worker    },
141*59bfda1fSAndroid Build Coastguard Worker}
142*59bfda1fSAndroid Build Coastguard Worker
143*59bfda1fSAndroid Build Coastguard Workercc_defaults {
144*59bfda1fSAndroid Build Coastguard Worker    name: "make_f2fs_defaults",
145*59bfda1fSAndroid Build Coastguard Worker    defaults: [
146*59bfda1fSAndroid Build Coastguard Worker        "f2fs-tools-defaults",
147*59bfda1fSAndroid Build Coastguard Worker        "make_f2fs_src_files",
148*59bfda1fSAndroid Build Coastguard Worker    ],
149*59bfda1fSAndroid Build Coastguard Worker    target: {
150*59bfda1fSAndroid Build Coastguard Worker        android: {
151*59bfda1fSAndroid Build Coastguard Worker            static_libs: [
152*59bfda1fSAndroid Build Coastguard Worker                "libf2fs_fmt",
153*59bfda1fSAndroid Build Coastguard Worker            ],
154*59bfda1fSAndroid Build Coastguard Worker            shared_libs: [
155*59bfda1fSAndroid Build Coastguard Worker                "libext2_uuid",
156*59bfda1fSAndroid Build Coastguard Worker                "libsparse",
157*59bfda1fSAndroid Build Coastguard Worker                "libbase",
158*59bfda1fSAndroid Build Coastguard Worker            ],
159*59bfda1fSAndroid Build Coastguard Worker        },
160*59bfda1fSAndroid Build Coastguard Worker    },
161*59bfda1fSAndroid Build Coastguard Worker}
162*59bfda1fSAndroid Build Coastguard Worker
163*59bfda1fSAndroid Build Coastguard Workercc_defaults {
164*59bfda1fSAndroid Build Coastguard Worker    name: "make_f2fs_host_defaults",
165*59bfda1fSAndroid Build Coastguard Worker    defaults: [
166*59bfda1fSAndroid Build Coastguard Worker        "make_f2fs_defaults",
167*59bfda1fSAndroid Build Coastguard Worker    ],
168*59bfda1fSAndroid Build Coastguard Worker    host_supported: true,
169*59bfda1fSAndroid Build Coastguard Worker    target: {
170*59bfda1fSAndroid Build Coastguard Worker        host: {
171*59bfda1fSAndroid Build Coastguard Worker            static_libs: [
172*59bfda1fSAndroid Build Coastguard Worker                "libf2fs_fmt_host",
173*59bfda1fSAndroid Build Coastguard Worker                "libext2_uuid",
174*59bfda1fSAndroid Build Coastguard Worker                "libsparse",
175*59bfda1fSAndroid Build Coastguard Worker                "libbase",
176*59bfda1fSAndroid Build Coastguard Worker                "libz",
177*59bfda1fSAndroid Build Coastguard Worker            ],
178*59bfda1fSAndroid Build Coastguard Worker        },
179*59bfda1fSAndroid Build Coastguard Worker        windows: {
180*59bfda1fSAndroid Build Coastguard Worker            include_dirs: [ "external/e2fsprogs/include/mingw" ],
181*59bfda1fSAndroid Build Coastguard Worker            cflags: ["-DANDROID_WINDOWS_HOST"],
182*59bfda1fSAndroid Build Coastguard Worker            ldflags: ["-static"],
183*59bfda1fSAndroid Build Coastguard Worker            host_ldlibs: ["-lws2_32"],
184*59bfda1fSAndroid Build Coastguard Worker            enabled: true
185*59bfda1fSAndroid Build Coastguard Worker        },
186*59bfda1fSAndroid Build Coastguard Worker    },
187*59bfda1fSAndroid Build Coastguard Worker}
188*59bfda1fSAndroid Build Coastguard Worker
189*59bfda1fSAndroid Build Coastguard Workercc_binary {
190*59bfda1fSAndroid Build Coastguard Worker    name: "make_f2fs",
191*59bfda1fSAndroid Build Coastguard Worker    defaults: [
192*59bfda1fSAndroid Build Coastguard Worker        "make_f2fs_host_defaults",
193*59bfda1fSAndroid Build Coastguard Worker    ],
194*59bfda1fSAndroid Build Coastguard Worker}
195*59bfda1fSAndroid Build Coastguard Worker
196*59bfda1fSAndroid Build Coastguard Workercc_binary {
197*59bfda1fSAndroid Build Coastguard Worker    name: "make_f2fs.recovery",
198*59bfda1fSAndroid Build Coastguard Worker    defaults: [
199*59bfda1fSAndroid Build Coastguard Worker        "make_f2fs_defaults",
200*59bfda1fSAndroid Build Coastguard Worker    ],
201*59bfda1fSAndroid Build Coastguard Worker    recovery: true,
202*59bfda1fSAndroid Build Coastguard Worker    stem: "make_f2fs",
203*59bfda1fSAndroid Build Coastguard Worker}
204*59bfda1fSAndroid Build Coastguard Worker
205*59bfda1fSAndroid Build Coastguard Workercc_binary_host {
206*59bfda1fSAndroid Build Coastguard Worker    name: "make_f2fs_casefold",
207*59bfda1fSAndroid Build Coastguard Worker    defaults: [
208*59bfda1fSAndroid Build Coastguard Worker        "make_f2fs_host_defaults",
209*59bfda1fSAndroid Build Coastguard Worker    ],
210*59bfda1fSAndroid Build Coastguard Worker    recovery_available: true,
211*59bfda1fSAndroid Build Coastguard Worker    target: {
212*59bfda1fSAndroid Build Coastguard Worker        host: {
213*59bfda1fSAndroid Build Coastguard Worker            cflags: ["-DCONF_CASEFOLD", "-DCONF_PROJID"],
214*59bfda1fSAndroid Build Coastguard Worker        },
215*59bfda1fSAndroid Build Coastguard Worker        windows: {
216*59bfda1fSAndroid Build Coastguard Worker            cflags: ["-DCONF_CASEFOLD", "-DCONF_PROJID"],
217*59bfda1fSAndroid Build Coastguard Worker        },
218*59bfda1fSAndroid Build Coastguard Worker    },
219*59bfda1fSAndroid Build Coastguard Worker}
220*59bfda1fSAndroid Build Coastguard Worker
221*59bfda1fSAndroid Build Coastguard Workercc_binary_host {
222*59bfda1fSAndroid Build Coastguard Worker    name: "make_f2fs.static",
223*59bfda1fSAndroid Build Coastguard Worker    defaults: [
224*59bfda1fSAndroid Build Coastguard Worker        "make_f2fs_host_defaults",
225*59bfda1fSAndroid Build Coastguard Worker    ],
226*59bfda1fSAndroid Build Coastguard Worker    recovery_available: true,
227*59bfda1fSAndroid Build Coastguard Worker    static_executable: true,
228*59bfda1fSAndroid Build Coastguard Worker    stl: "libc++_static",
229*59bfda1fSAndroid Build Coastguard Worker}
230*59bfda1fSAndroid Build Coastguard Worker
231*59bfda1fSAndroid Build Coastguard Workercc_defaults {
232*59bfda1fSAndroid Build Coastguard Worker    name: "fsck.f2fs_defaults",
233*59bfda1fSAndroid Build Coastguard Worker    defaults: [
234*59bfda1fSAndroid Build Coastguard Worker        "f2fs-tools-defaults",
235*59bfda1fSAndroid Build Coastguard Worker        "fsck_main_src_files",
236*59bfda1fSAndroid Build Coastguard Worker    ],
237*59bfda1fSAndroid Build Coastguard Worker    cflags: ["-DWITH_RESIZE", "-DWITH_DEFRAG", "-DWITH_DUMP"],
238*59bfda1fSAndroid Build Coastguard Worker    srcs: ["fsck/fsck.c", "fsck/resize.c", "fsck/defrag.c"],
239*59bfda1fSAndroid Build Coastguard Worker}
240*59bfda1fSAndroid Build Coastguard Worker
241*59bfda1fSAndroid Build Coastguard Workercc_defaults {
242*59bfda1fSAndroid Build Coastguard Worker    name: "fsck.f2fs_partition_common_defaults",
243*59bfda1fSAndroid Build Coastguard Worker    defaults: [
244*59bfda1fSAndroid Build Coastguard Worker        "f2fs-tools-defaults",
245*59bfda1fSAndroid Build Coastguard Worker        "fsck_main_src_files",
246*59bfda1fSAndroid Build Coastguard Worker        "fsck.f2fs_defaults",
247*59bfda1fSAndroid Build Coastguard Worker    ],
248*59bfda1fSAndroid Build Coastguard Worker    symlinks: ["resize.f2fs", "defrag.f2fs", "dump.f2fs"],
249*59bfda1fSAndroid Build Coastguard Worker    shared_libs: [
250*59bfda1fSAndroid Build Coastguard Worker        "libext2_uuid",
251*59bfda1fSAndroid Build Coastguard Worker        "libsparse",
252*59bfda1fSAndroid Build Coastguard Worker        "libbase",
253*59bfda1fSAndroid Build Coastguard Worker    ],
254*59bfda1fSAndroid Build Coastguard Worker    bootstrap: true,
255*59bfda1fSAndroid Build Coastguard Worker}
256*59bfda1fSAndroid Build Coastguard Worker
257*59bfda1fSAndroid Build Coastguard Workercc_binary {
258*59bfda1fSAndroid Build Coastguard Worker    name: "fsck.f2fs",
259*59bfda1fSAndroid Build Coastguard Worker    defaults: [
260*59bfda1fSAndroid Build Coastguard Worker        "fsck.f2fs_partition_common_defaults",
261*59bfda1fSAndroid Build Coastguard Worker    ],
262*59bfda1fSAndroid Build Coastguard Worker    host_supported: true,
263*59bfda1fSAndroid Build Coastguard Worker    vendor_available: true,
264*59bfda1fSAndroid Build Coastguard Worker    vendor_ramdisk_available: true,
265*59bfda1fSAndroid Build Coastguard Worker    bootstrap: true,
266*59bfda1fSAndroid Build Coastguard Worker}
267*59bfda1fSAndroid Build Coastguard Worker
268*59bfda1fSAndroid Build Coastguard Workercc_binary {
269*59bfda1fSAndroid Build Coastguard Worker    name: "fsck.f2fs.recovery",
270*59bfda1fSAndroid Build Coastguard Worker    defaults: [
271*59bfda1fSAndroid Build Coastguard Worker        "fsck.f2fs_partition_common_defaults",
272*59bfda1fSAndroid Build Coastguard Worker    ],
273*59bfda1fSAndroid Build Coastguard Worker    recovery: true,
274*59bfda1fSAndroid Build Coastguard Worker    bootstrap: true,
275*59bfda1fSAndroid Build Coastguard Worker    stem: "fsck.f2fs",
276*59bfda1fSAndroid Build Coastguard Worker}
277*59bfda1fSAndroid Build Coastguard Worker
278*59bfda1fSAndroid Build Coastguard Workercc_binary {
279*59bfda1fSAndroid Build Coastguard Worker    name: "fsck.f2fs_ramdisk",
280*59bfda1fSAndroid Build Coastguard Worker    stem: "fsck.f2fs",
281*59bfda1fSAndroid Build Coastguard Worker    defaults: [
282*59bfda1fSAndroid Build Coastguard Worker        "f2fs-tools-defaults",
283*59bfda1fSAndroid Build Coastguard Worker        "fsck_main_src_files",
284*59bfda1fSAndroid Build Coastguard Worker        "fsck.f2fs_defaults",
285*59bfda1fSAndroid Build Coastguard Worker    ],
286*59bfda1fSAndroid Build Coastguard Worker    static_executable: true,
287*59bfda1fSAndroid Build Coastguard Worker    ramdisk: true,
288*59bfda1fSAndroid Build Coastguard Worker    static_libs: [
289*59bfda1fSAndroid Build Coastguard Worker        "libbase",
290*59bfda1fSAndroid Build Coastguard Worker        "libext2_uuid",
291*59bfda1fSAndroid Build Coastguard Worker        "libsparse",
292*59bfda1fSAndroid Build Coastguard Worker        "libz",
293*59bfda1fSAndroid Build Coastguard Worker    ],
294*59bfda1fSAndroid Build Coastguard Worker}
295*59bfda1fSAndroid Build Coastguard Worker
296*59bfda1fSAndroid Build Coastguard Workercc_defaults {
297*59bfda1fSAndroid Build Coastguard Worker    name: "sload_f2fs_defaults",
298*59bfda1fSAndroid Build Coastguard Worker    defaults: [
299*59bfda1fSAndroid Build Coastguard Worker        "f2fs-tools-defaults",
300*59bfda1fSAndroid Build Coastguard Worker        "fsck_main_src_files",
301*59bfda1fSAndroid Build Coastguard Worker    ],
302*59bfda1fSAndroid Build Coastguard Worker    cflags: ["-DWITH_SLOAD"],
303*59bfda1fSAndroid Build Coastguard Worker    srcs: [
304*59bfda1fSAndroid Build Coastguard Worker        "fsck/fsck.c",
305*59bfda1fSAndroid Build Coastguard Worker        "fsck/sload.c",
306*59bfda1fSAndroid Build Coastguard Worker        "fsck/compress.c",
307*59bfda1fSAndroid Build Coastguard Worker        ],
308*59bfda1fSAndroid Build Coastguard Worker    target: {
309*59bfda1fSAndroid Build Coastguard Worker        android: {
310*59bfda1fSAndroid Build Coastguard Worker            shared_libs: [
311*59bfda1fSAndroid Build Coastguard Worker                "libext2_uuid",
312*59bfda1fSAndroid Build Coastguard Worker                "libsparse",
313*59bfda1fSAndroid Build Coastguard Worker                "libbase",
314*59bfda1fSAndroid Build Coastguard Worker                "libcrypto",
315*59bfda1fSAndroid Build Coastguard Worker                "libselinux",
316*59bfda1fSAndroid Build Coastguard Worker                "libcutils",
317*59bfda1fSAndroid Build Coastguard Worker                "liblog",
318*59bfda1fSAndroid Build Coastguard Worker                "liblz4",
319*59bfda1fSAndroid Build Coastguard Worker            ],
320*59bfda1fSAndroid Build Coastguard Worker        },
321*59bfda1fSAndroid Build Coastguard Worker    },
322*59bfda1fSAndroid Build Coastguard Worker}
323*59bfda1fSAndroid Build Coastguard Worker
324*59bfda1fSAndroid Build Coastguard Workercc_binary {
325*59bfda1fSAndroid Build Coastguard Worker    name: "sload_f2fs",
326*59bfda1fSAndroid Build Coastguard Worker    defaults: [
327*59bfda1fSAndroid Build Coastguard Worker        "sload_f2fs_defaults",
328*59bfda1fSAndroid Build Coastguard Worker    ],
329*59bfda1fSAndroid Build Coastguard Worker    host_supported: true,
330*59bfda1fSAndroid Build Coastguard Worker    target: {
331*59bfda1fSAndroid Build Coastguard Worker        host: {
332*59bfda1fSAndroid Build Coastguard Worker            static_libs: [
333*59bfda1fSAndroid Build Coastguard Worker                "libext2_uuid",
334*59bfda1fSAndroid Build Coastguard Worker                "libsparse",
335*59bfda1fSAndroid Build Coastguard Worker                "libbase",
336*59bfda1fSAndroid Build Coastguard Worker                "libcrypto",
337*59bfda1fSAndroid Build Coastguard Worker                "libselinux",
338*59bfda1fSAndroid Build Coastguard Worker                "libcutils",
339*59bfda1fSAndroid Build Coastguard Worker                "liblog",
340*59bfda1fSAndroid Build Coastguard Worker                "libz",
341*59bfda1fSAndroid Build Coastguard Worker                "liblz4",
342*59bfda1fSAndroid Build Coastguard Worker            ],
343*59bfda1fSAndroid Build Coastguard Worker        },
344*59bfda1fSAndroid Build Coastguard Worker    },
345*59bfda1fSAndroid Build Coastguard Worker}
346*59bfda1fSAndroid Build Coastguard Worker
347*59bfda1fSAndroid Build Coastguard Workercc_binary {
348*59bfda1fSAndroid Build Coastguard Worker    name: "sload_f2fs.recovery",
349*59bfda1fSAndroid Build Coastguard Worker    defaults: [
350*59bfda1fSAndroid Build Coastguard Worker        "sload_f2fs_defaults",
351*59bfda1fSAndroid Build Coastguard Worker    ],
352*59bfda1fSAndroid Build Coastguard Worker    recovery: true,
353*59bfda1fSAndroid Build Coastguard Worker    stem: "sload_f2fs",
354*59bfda1fSAndroid Build Coastguard Worker}
355*59bfda1fSAndroid Build Coastguard Worker
356*59bfda1fSAndroid Build Coastguard Workercc_binary {
357*59bfda1fSAndroid Build Coastguard Worker    name: "check_f2fs",
358*59bfda1fSAndroid Build Coastguard Worker    host_supported: false,
359*59bfda1fSAndroid Build Coastguard Worker    cflags: [
360*59bfda1fSAndroid Build Coastguard Worker        "--static",
361*59bfda1fSAndroid Build Coastguard Worker        "-U_FORTIFY_SOURCE",
362*59bfda1fSAndroid Build Coastguard Worker	"-Wall",
363*59bfda1fSAndroid Build Coastguard Worker	"-Werror",
364*59bfda1fSAndroid Build Coastguard Worker    ],
365*59bfda1fSAndroid Build Coastguard Worker    srcs: ["tools/check_f2fs.c"],
366*59bfda1fSAndroid Build Coastguard Worker    product_specific: true,
367*59bfda1fSAndroid Build Coastguard Worker}
368*59bfda1fSAndroid Build Coastguard Worker
369*59bfda1fSAndroid Build Coastguard Workercc_defaults {
370*59bfda1fSAndroid Build Coastguard Worker    name: "tools-defaults",
371*59bfda1fSAndroid Build Coastguard Worker    cflags: [
372*59bfda1fSAndroid Build Coastguard Worker	"-Wall",
373*59bfda1fSAndroid Build Coastguard Worker	"-Werror",
374*59bfda1fSAndroid Build Coastguard Worker    ],
375*59bfda1fSAndroid Build Coastguard Worker    local_include_dirs: [
376*59bfda1fSAndroid Build Coastguard Worker        "include",
377*59bfda1fSAndroid Build Coastguard Worker    ],
378*59bfda1fSAndroid Build Coastguard Worker    target: {
379*59bfda1fSAndroid Build Coastguard Worker        windows: {
380*59bfda1fSAndroid Build Coastguard Worker            enabled: false,
381*59bfda1fSAndroid Build Coastguard Worker        },
382*59bfda1fSAndroid Build Coastguard Worker        darwin: {
383*59bfda1fSAndroid Build Coastguard Worker            enabled: false,
384*59bfda1fSAndroid Build Coastguard Worker        },
385*59bfda1fSAndroid Build Coastguard Worker    },
386*59bfda1fSAndroid Build Coastguard Worker    product_specific: true,
387*59bfda1fSAndroid Build Coastguard Worker}
388*59bfda1fSAndroid Build Coastguard Worker
389*59bfda1fSAndroid Build Coastguard Workercc_binary {
390*59bfda1fSAndroid Build Coastguard Worker    name: "f2fscrypt",
391*59bfda1fSAndroid Build Coastguard Worker    defaults: [
392*59bfda1fSAndroid Build Coastguard Worker        "tools-defaults",
393*59bfda1fSAndroid Build Coastguard Worker    ],
394*59bfda1fSAndroid Build Coastguard Worker    shared_libs: [
395*59bfda1fSAndroid Build Coastguard Worker        "libext2_uuid",
396*59bfda1fSAndroid Build Coastguard Worker    ],
397*59bfda1fSAndroid Build Coastguard Worker    srcs: [
398*59bfda1fSAndroid Build Coastguard Worker        "tools/f2fscrypt.c",
399*59bfda1fSAndroid Build Coastguard Worker        "tools/sha512.c",
400*59bfda1fSAndroid Build Coastguard Worker    ],
401*59bfda1fSAndroid Build Coastguard Worker}
402*59bfda1fSAndroid Build Coastguard Worker
403*59bfda1fSAndroid Build Coastguard Workercc_binary {
404*59bfda1fSAndroid Build Coastguard Worker    name: "f2fs.fibmap",
405*59bfda1fSAndroid Build Coastguard Worker    defaults: [
406*59bfda1fSAndroid Build Coastguard Worker        "tools-defaults",
407*59bfda1fSAndroid Build Coastguard Worker    ],
408*59bfda1fSAndroid Build Coastguard Worker    srcs: [
409*59bfda1fSAndroid Build Coastguard Worker        "tools/fibmap.c",
410*59bfda1fSAndroid Build Coastguard Worker    ],
411*59bfda1fSAndroid Build Coastguard Worker}
412