summaryrefslogtreecommitdiff
path: root/f2fs_utils/Android.bp
diff options
context:
space:
mode:
Diffstat (limited to 'f2fs_utils/Android.bp')
-rw-r--r--f2fs_utils/Android.bp204
1 files changed, 204 insertions, 0 deletions
diff --git a/f2fs_utils/Android.bp b/f2fs_utils/Android.bp
new file mode 100644
index 00000000..afa5627c
--- /dev/null
+++ b/f2fs_utils/Android.bp
@@ -0,0 +1,204 @@
+// Copyright 2017 The Android Open Source Project
+
+cc_library_host_static {
+ name: "libf2fs_utils_host",
+
+ srcs: ["f2fs_utils.c"],
+
+ static_libs: [
+ "libsparse",
+ "libz",
+ ],
+
+ include_dirs: [
+ "external/f2fs-tools/include",
+ "external/f2fs-tools/mkfs",
+ ],
+
+ cflags: ["-Wno-unused-parameter"],
+
+ target: {
+ darwin: {
+ enabled: false,
+ },
+ },
+}
+
+cc_library_host_static {
+ name: "libf2fs_ioutils_host",
+
+ srcs: ["f2fs_ioutils.c"],
+
+ include_dirs: [
+ "external/f2fs-tools/include",
+ "external/f2fs-tools/mkfs",
+ ],
+
+ cflags: ["-Wno-unused-parameter"],
+
+ static_libs: [
+ "libselinux",
+ "libsparse",
+ "libext2_uuid",
+ "libz",
+ ],
+
+ target: {
+ darwin: {
+ enabled: false,
+ },
+ },
+}
+
+cc_library_host_static {
+ name: "libf2fs_dlutils_host",
+
+ srcs: ["f2fs_dlutils.c"],
+
+ include_dirs: [
+ "external/f2fs-tools/include",
+ "external/f2fs-tools/mkfs",
+ ],
+ // Will attempt to dlopen("libf2fs_fmt_host_dyn")
+ host_ldlibs: ["-ldl"],
+
+ target: {
+ darwin: {
+ enabled: false,
+ },
+ },
+}
+
+cc_binary_host {
+ name: "make_f2fs",
+
+ srcs: ["make_f2fs_main.c"],
+
+ // libf2fs_dlutils_host will dlopen("libf2fs_fmt_host_dyn")
+ host_ldlibs: [
+ "-ldl",
+ ],
+
+ ldflags: [
+ "-rdynamic"
+ ],
+
+ // The following libf2fs_* are from system/extras/f2fs_utils,
+ // and do not use code in external/f2fs-tools.
+ static_libs: [
+ "libf2fs_utils_host",
+ "libf2fs_ioutils_host",
+ "libf2fs_dlutils_host",
+ "libsparse",
+ "libz",
+ ],
+
+ required: ["libf2fs_fmt_host_dyn"],
+
+ target: {
+ darwin: {
+ enabled: false,
+ },
+ },
+}
+
+cc_library_shared {
+ name: "libf2fs_dlutils",
+
+ srcs: ["f2fs_dlutils.c"],
+
+ include_dirs: [
+ "external/f2fs-tools/include",
+ "external/f2fs-tools/mkfs",
+ ],
+
+ shared_libs: ["libdl"],
+
+ target: {
+ darwin: {
+ enabled: false,
+ },
+ },
+}
+
+cc_library_static {
+ name: "libf2fs_dlutils_static",
+
+ srcs: ["f2fs_dlutils.c"],
+
+ include_dirs: [
+ "external/f2fs-tools/include",
+ "external/f2fs-tools/mkfs",
+ ],
+
+ shared_libs: ["libdl"],
+
+ target: {
+ darwin: {
+ enabled: false,
+ },
+ },
+}
+
+cc_library_static {
+ name: "libf2fs_utils_static",
+
+ srcs: ["f2fs_utils.c"],
+
+ include_dirs: [
+ "external/f2fs-tools/include",
+ "external/f2fs-tools/mkfs",
+ ],
+
+ cflags: ["-Wno-unused-parameter"],
+
+ static_libs: ["libsparse"],
+
+ target: {
+ darwin: {
+ enabled: false,
+ },
+ },
+}
+
+cc_library_shared {
+ name: "libf2fs_sparseblock",
+
+ srcs: ["f2fs_sparseblock.c"],
+
+ shared_libs: [
+ "liblog",
+ "libcutils",
+ ],
+
+ include_dirs: [
+ "external/f2fs-tools/include",
+ "system/core/include/log",
+ ],
+
+ export_include_dirs: ["."]
+}
+
+cc_binary {
+ name: "f2fs_sparseblock",
+
+ srcs: ["f2fs_sparseblock.c"],
+
+ shared_libs: [
+ "liblog",
+ "libcutils",
+ ],
+
+ include_dirs: [
+ "external/f2fs-tools/include",
+ "system/core/include/log",
+ ],
+}
+
+cc_prebuilt_binary {
+ name: "mkf2fsuserimg.sh",
+
+ srcs: ["mkf2fsuserimg.sh"],
+
+ host_supported: true,
+}