blob: 852f322b5af09a86c04a58676f309421df485f83 [file] [log] [blame]
// Copyright 2017 The Android Open Source Project
cc_defaults {
name: "f2fs-tools-defaults",
cflags: [
"-DF2FS_MAJOR_VERSION=1",
"-DF2FS_MINOR_VERSION=10",
"-DF2FS_TOOLS_VERSION=\"1.10.0\"",
"-DF2FS_TOOLS_DATE=\"2018-01-30\"",
"-DWITH_ANDROID",
"-Wall",
"-Werror",
"-Wno-format",
"-Wno-macro-redefined",
"-Wno-missing-field-initializers",
"-Wno-pointer-arith",
"-Wno-sign-compare",
"-Wno-unused-function",
],
local_include_dirs: [
"include",
"mkfs",
"fsck",
],
include_dirs: [
"external/e2fsprogs/lib/",
"system/core/libsparse/include",
],
target: {
windows: {
enabled: false,
},
},
}
cc_defaults {
name: "libf2fs_src_files",
srcs: [
"lib/libf2fs.c",
"mkfs/f2fs_format.c",
"mkfs/f2fs_format_utils.c",
],
}
cc_defaults {
name: "make_f2fs_src_files",
srcs: [
"lib/libf2fs_io.c",
"mkfs/f2fs_format_main.c",
],
}
cc_defaults {
name: "fsck_main_src_files",
srcs: [
"fsck/dir.c",
"fsck/dict.c",
"fsck/mkquota.c",
"fsck/quotaio.c",
"fsck/quotaio_tree.c",
"fsck/quotaio_v2.c",
"fsck/node.c",
"fsck/segment.c",
"fsck/xattr.c",
"fsck/main.c",
"fsck/mount.c",
"lib/libf2fs.c",
"lib/libf2fs_io.c",
],
}
cc_library_static {
name: "libf2fs_fmt",
defaults: [
"f2fs-tools-defaults",
"libf2fs_src_files"
],
}
cc_library_host_static {
name: "libf2fs_fmt_host",
defaults: [
"f2fs-tools-defaults",
"libf2fs_src_files"
],
target: {
windows: {
include_dirs: [ "external/e2fsprogs/include/mingw" ],
cflags: ["-DANDROID_WINDOWS_HOST"],
enabled: true
},
},
}
cc_binary {
name: "make_f2fs",
defaults: [
"f2fs-tools-defaults",
"make_f2fs_src_files",
],
host_supported: true,
target: {
android: {
static_libs: [
"libf2fs_fmt",
],
shared_libs: [
"libext2_uuid",
"libsparse",
"libbase",
],
},
host: {
static_libs: [
"libf2fs_fmt_host",
"libext2_uuid",
"libsparse",
"libbase",
"libz",
],
},
windows: {
include_dirs: [ "external/e2fsprogs/include/mingw" ],
cflags: ["-DANDROID_WINDOWS_HOST"],
ldflags: ["-static"],
host_ldlibs: ["-lws2_32"],
enabled: true
},
},
}
cc_binary {
name: "fsck.f2fs",
defaults: [
"f2fs-tools-defaults",
"fsck_main_src_files",
],
host_supported: true,
srcs: ["fsck/fsck.c"],
shared_libs: [
"libext2_uuid",
"libsparse",
"libbase",
],
}
cc_binary {
name: "sload_f2fs",
defaults: [
"f2fs-tools-defaults",
"fsck_main_src_files",
],
host_supported: true,
cflags: ["-DWITH_SLOAD"],
srcs: ["fsck/fsck.c", "fsck/sload.c"],
target: {
android: {
shared_libs: [
"libext2_uuid",
"libsparse",
"libbase",
"libcrypto",
"libselinux",
"libcutils",
"liblog",
],
},
host: {
static_libs: [
"libext2_uuid",
"libsparse",
"libbase",
"libcrypto",
"libselinux",
"libcutils",
"liblog",
"libz",
],
},
},
stl: "libc++_static",
}