diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2017-05-16 20:19:03 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2017-05-16 20:19:05 +0000 |
commit | bc3f1c9f57f749cc616f9aa5b390bc2f70b15507 (patch) | |
tree | ccc22759c1dd09847e87921cc0dba0675a7efb39 | |
parent | 7b615cfb005d1cbb483704494982636ded1439e2 (diff) | |
parent | b2e7992b16baee81d8ab9e10425e352abb8e5de5 (diff) | |
download | extras-n-iot-preview-4.tar.gz |
Merge "libf2fs_sparseblock: Android.mk->Android.bp"android-n-iot-preview-4n-iot-preview-4
-rw-r--r-- | f2fs_utils/Android.bp | 204 | ||||
-rw-r--r-- | f2fs_utils/Android.mk | 102 |
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) - - |