diff options
author | Jayant Chowdhary <jchowdhary@google.com> | 2017-05-09 19:12:01 -0700 |
---|---|---|
committer | Jayant Chowdhary <jchowdhary@google.com> | 2017-05-09 19:31:38 -0700 |
commit | b2e7992b16baee81d8ab9e10425e352abb8e5de5 (patch) | |
tree | 76dc14ff000d7541bdb4b7f14441318c547eb895 /f2fs_utils/Android.bp | |
parent | adbce4d3b7eb6f4c7c78084feefc208fc8a768fe (diff) | |
download | extras-b2e7992b16baee81d8ab9e10425e352abb8e5de5.tar.gz |
libf2fs_sparseblock: Android.mk->Android.bp
Test: mm -j64
Bug: 37567578
Change-Id: I9a92406bfc150d9effae89a93b1ee07f7ad6d001
Diffstat (limited to 'f2fs_utils/Android.bp')
-rw-r--r-- | f2fs_utils/Android.bp | 204 |
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, +} |