JP Abgrall | a27df87 | 2014-06-11 23:46:42 -0700 | [diff] [blame] | 1 | # Copyright 2014 The Android Open Source Project |
| 2 | |
| 3 | LOCAL_PATH:= $(call my-dir) |
| 4 | |
JP Abgrall | 5e2dc24 | 2014-06-18 11:55:28 -0700 | [diff] [blame] | 5 | ifeq ($(HOST_OS),linux) |
JP Abgrall | a27df87 | 2014-06-11 23:46:42 -0700 | [diff] [blame] | 6 | |
| 7 | include $(CLEAR_VARS) |
| 8 | LOCAL_MODULE := libf2fs_utils_host |
| 9 | LOCAL_SRC_FILES := f2fs_utils.c |
| 10 | LOCAL_STATIC_LIBRARIES := \ |
| 11 | libsparse_host \ |
| 12 | libz |
| 13 | LOCAL_C_INCLUDES := external/f2fs-tools/include external/f2fs-tools/mkfs |
| 14 | include $(BUILD_HOST_STATIC_LIBRARY) |
| 15 | |
JP Abgrall | 5e2dc24 | 2014-06-18 11:55:28 -0700 | [diff] [blame] | 16 | include $(CLEAR_VARS) |
| 17 | LOCAL_SRC_FILES := f2fs_ioutils.c |
| 18 | LOCAL_C_INCLUDES := external/f2fs-tools/include external/f2fs-tools/mkfs |
| 19 | LOCAL_STATIC_LIBRARIES := \ |
| 20 | libsparse_host \ |
| 21 | libext2_uuid_host \ |
| 22 | libz |
| 23 | LOCAL_MODULE := libf2fs_ioutils_host |
| 24 | include $(BUILD_HOST_STATIC_LIBRARY) |
JP Abgrall | a27df87 | 2014-06-11 23:46:42 -0700 | [diff] [blame] | 25 | |
JP Abgrall | 5e2dc24 | 2014-06-18 11:55:28 -0700 | [diff] [blame] | 26 | include $(CLEAR_VARS) |
| 27 | LOCAL_SRC_FILES := f2fs_dlutils.c |
| 28 | LOCAL_C_INCLUDES := external/f2fs-tools/include external/f2fs-tools/mkfs |
| 29 | # Will attempt to dlopen("libf2fs_fmt_host_dyn") |
| 30 | LOCAL_LDLIBS := -ldl |
| 31 | LOCAL_MODULE := libf2fs_dlutils_host |
| 32 | include $(BUILD_HOST_STATIC_LIBRARY) |
JP Abgrall | a27df87 | 2014-06-11 23:46:42 -0700 | [diff] [blame] | 33 | |
| 34 | include $(CLEAR_VARS) |
JP Abgrall | 136c149 | 2014-06-16 11:08:45 -0700 | [diff] [blame] | 35 | LOCAL_SRC_FILES := make_f2fs_main.c |
| 36 | LOCAL_MODULE := make_f2fs |
JP Abgrall | 136c149 | 2014-06-16 11:08:45 -0700 | [diff] [blame] | 37 | # libf2fs_dlutils_host will dlopen("libf2fs_fmt_host_dyn") |
JP Abgrall | 5e2dc24 | 2014-06-18 11:55:28 -0700 | [diff] [blame] | 38 | LOCAL_LDFLAGS := -ldl -rdynamic |
| 39 | # The following libf2fs_* are from system/extras/f2fs_utils, |
| 40 | # and do not use code in external/f2fs-tools. |
| 41 | LOCAL_STATIC_LIBRARIES := libf2fs_utils_host libf2fs_ioutils_host libf2fs_dlutils_host |
| 42 | LOCAL_REQUIRED_MODULES := libf2fs_fmt_host_dyn |
| 43 | LOCAL_STATIC_LIBRARIES += \ |
| 44 | libsparse_host \ |
| 45 | libz |
JP Abgrall | 136c149 | 2014-06-16 11:08:45 -0700 | [diff] [blame] | 46 | include $(BUILD_HOST_EXECUTABLE) |
| 47 | |
| 48 | include $(CLEAR_VARS) |
JP Abgrall | a27df87 | 2014-06-11 23:46:42 -0700 | [diff] [blame] | 49 | LOCAL_MODULE := libf2fs_dlutils |
| 50 | LOCAL_SRC_FILES := f2fs_dlutils.c |
| 51 | LOCAL_C_INCLUDES := external/f2fs-tools/include external/f2fs-tools/mkfs |
| 52 | LOCAL_SHARED_LIBRARIES := libdl |
| 53 | include $(BUILD_SHARED_LIBRARY) |
| 54 | |
| 55 | include $(CLEAR_VARS) |
| 56 | LOCAL_MODULE := libf2fs_dlutils_static |
| 57 | LOCAL_SRC_FILES := f2fs_dlutils.c |
| 58 | LOCAL_C_INCLUDES := external/f2fs-tools/include external/f2fs-tools/mkfs |
| 59 | LOCAL_SHARED_LIBRARIES := libdl |
| 60 | include $(BUILD_STATIC_LIBRARY) |
| 61 | |
| 62 | include $(CLEAR_VARS) |
| 63 | LOCAL_MODULE := libf2fs_utils_static |
| 64 | LOCAL_SRC_FILES := f2fs_utils.c |
| 65 | LOCAL_C_INCLUDES := external/f2fs-tools/include external/f2fs-tools/mkfs |
| 66 | LOCAL_STATIC_LIBRARIES := \ |
| 67 | libsparse_static |
| 68 | include $(BUILD_STATIC_LIBRARY) |
| 69 | |
JP Abgrall | 48604ad | 2014-06-25 07:56:32 -0700 | [diff] [blame] | 70 | endif |
| 71 | |
JP Abgrall | 136c149 | 2014-06-16 11:08:45 -0700 | [diff] [blame] | 72 | include $(CLEAR_VARS) |
Daniel Rosenberg | b1c010d | 2014-08-15 13:13:41 -0700 | [diff] [blame] | 73 | LOCAL_MODULE := libf2fs_sparseblock |
| 74 | LOCAL_SRC_FILES := f2fs_sparseblock.c |
| 75 | LOCAL_SHARED_LIBRARIES := libcutils |
| 76 | LOCAL_C_INCLUDES := external/f2fs-tools/include \ |
| 77 | system/core/include/log |
| 78 | include $(BUILD_SHARED_LIBRARY) |
| 79 | |
| 80 | include $(CLEAR_VARS) |
| 81 | LOCAL_MODULE := f2fs_sparseblock |
| 82 | LOCAL_SRC_FILES := f2fs_sparseblock.c |
| 83 | LOCAL_SHARED_LIBRARIES := libcutils |
| 84 | LOCAL_C_INCLUDES := external/f2fs-tools/include \ |
| 85 | system/core/include/log |
| 86 | include $(BUILD_EXECUTABLE) |
| 87 | |
| 88 | include $(CLEAR_VARS) |
JP Abgrall | 136c149 | 2014-06-16 11:08:45 -0700 | [diff] [blame] | 89 | LOCAL_MODULE := mkf2fsuserimg.sh |
| 90 | LOCAL_SRC_FILES := mkf2fsuserimg.sh |
| 91 | LOCAL_MODULE_CLASS := EXECUTABLES |
| 92 | # We don't need any additional suffix. |
| 93 | LOCAL_MODULE_SUFFIX := |
| 94 | LOCAL_BUILT_MODULE_STEM := $(notdir $(LOCAL_SRC_FILES)) |
| 95 | LOCAL_IS_HOST_MODULE := true |
| 96 | include $(BUILD_PREBUILT) |
| 97 | |
JP Abgrall | a27df87 | 2014-06-11 23:46:42 -0700 | [diff] [blame] | 98 | |