summaryrefslogtreecommitdiff
path: root/f2fs_utils
diff options
context:
space:
mode:
authorJayant Chowdhary <jchowdhary@google.com>2017-05-09 19:12:01 -0700
committerJayant Chowdhary <jchowdhary@google.com>2017-05-09 19:31:38 -0700
commitb2e7992b16baee81d8ab9e10425e352abb8e5de5 (patch)
tree76dc14ff000d7541bdb4b7f14441318c547eb895 /f2fs_utils
parentadbce4d3b7eb6f4c7c78084feefc208fc8a768fe (diff)
downloadextras-b2e7992b16baee81d8ab9e10425e352abb8e5de5.tar.gz
libf2fs_sparseblock: Android.mk->Android.bp
Test: mm -j64 Bug: 37567578 Change-Id: I9a92406bfc150d9effae89a93b1ee07f7ad6d001
Diffstat (limited to 'f2fs_utils')
-rw-r--r--f2fs_utils/Android.bp204
-rw-r--r--f2fs_utils/Android.mk102
2 files changed, 204 insertions, 102 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,
+}
diff --git a/f2fs_utils/Android.mk b/f2fs_utils/Android.mk
deleted file mode 100644
index 32ed0ed1..00000000
--- a/f2fs_utils/Android.mk
+++ /dev/null
@@ -1,102 +0,0 @@
-# Copyright 2014 The Android Open Source Project
-
-LOCAL_PATH:= $(call my-dir)
-
-ifeq ($(HOST_OS),linux)
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := libf2fs_utils_host
-LOCAL_SRC_FILES := f2fs_utils.c
-LOCAL_STATIC_LIBRARIES := \
- libsparse \
- libz
-LOCAL_C_INCLUDES := external/f2fs-tools/include external/f2fs-tools/mkfs
-LOCAL_CFLAGS := -Wno-unused-parameter
-include $(BUILD_HOST_STATIC_LIBRARY)
-
-include $(CLEAR_VARS)
-LOCAL_SRC_FILES := f2fs_ioutils.c
-LOCAL_C_INCLUDES := external/f2fs-tools/include external/f2fs-tools/mkfs
-LOCAL_CFLAGS := -Wno-unused-parameter
-LOCAL_STATIC_LIBRARIES := \
- libselinux \
- libsparse \
- libext2_uuid \
- libz
-LOCAL_MODULE := libf2fs_ioutils_host
-include $(BUILD_HOST_STATIC_LIBRARY)
-
-include $(CLEAR_VARS)
-LOCAL_SRC_FILES := f2fs_dlutils.c
-LOCAL_C_INCLUDES := external/f2fs-tools/include external/f2fs-tools/mkfs
-# Will attempt to dlopen("libf2fs_fmt_host_dyn")
-LOCAL_LDLIBS := -ldl
-LOCAL_MODULE := libf2fs_dlutils_host
-include $(BUILD_HOST_STATIC_LIBRARY)
-
-include $(CLEAR_VARS)
-LOCAL_SRC_FILES := make_f2fs_main.c
-LOCAL_MODULE := make_f2fs
-# libf2fs_dlutils_host will dlopen("libf2fs_fmt_host_dyn")
-LOCAL_LDFLAGS := -ldl -rdynamic
-# The following libf2fs_* are from system/extras/f2fs_utils,
-# and do not use code in external/f2fs-tools.
-LOCAL_STATIC_LIBRARIES := libf2fs_utils_host libf2fs_ioutils_host libf2fs_dlutils_host
-LOCAL_REQUIRED_MODULES := libf2fs_fmt_host_dyn
-LOCAL_STATIC_LIBRARIES += \
- libsparse \
- libz
-include $(BUILD_HOST_EXECUTABLE)
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := libf2fs_dlutils
-LOCAL_SRC_FILES := f2fs_dlutils.c
-LOCAL_C_INCLUDES := external/f2fs-tools/include external/f2fs-tools/mkfs
-LOCAL_SHARED_LIBRARIES := libdl
-include $(BUILD_SHARED_LIBRARY)
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := libf2fs_dlutils_static
-LOCAL_SRC_FILES := f2fs_dlutils.c
-LOCAL_C_INCLUDES := external/f2fs-tools/include external/f2fs-tools/mkfs
-LOCAL_SHARED_LIBRARIES := libdl
-include $(BUILD_STATIC_LIBRARY)
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := libf2fs_utils_static
-LOCAL_SRC_FILES := f2fs_utils.c
-LOCAL_C_INCLUDES := external/f2fs-tools/include external/f2fs-tools/mkfs
-LOCAL_CFLAGS := -Wno-unused-parameter
-LOCAL_STATIC_LIBRARIES := \
- libsparse
-include $(BUILD_STATIC_LIBRARY)
-
-endif
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := libf2fs_sparseblock
-LOCAL_SRC_FILES := f2fs_sparseblock.c
-LOCAL_SHARED_LIBRARIES := liblog libcutils
-LOCAL_C_INCLUDES := external/f2fs-tools/include \
- system/core/include/log
-include $(BUILD_SHARED_LIBRARY)
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := f2fs_sparseblock
-LOCAL_SRC_FILES := f2fs_sparseblock.c
-LOCAL_SHARED_LIBRARIES := liblog libcutils
-LOCAL_C_INCLUDES := external/f2fs-tools/include \
- system/core/include/log
-include $(BUILD_EXECUTABLE)
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := mkf2fsuserimg.sh
-LOCAL_SRC_FILES := mkf2fsuserimg.sh
-LOCAL_MODULE_CLASS := EXECUTABLES
-# We don't need any additional suffix.
-LOCAL_MODULE_SUFFIX :=
-LOCAL_BUILT_MODULE_STEM := $(notdir $(LOCAL_SRC_FILES))
-LOCAL_IS_HOST_MODULE := true
-include $(BUILD_PREBUILT)
-
-