| 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 := \ |
| Alex Deymo | f417a8d | 2017-01-11 14:37:14 -0800 | [diff] [blame] | 11 | libsparse \ |
| JP Abgrall | a27df87 | 2014-06-11 23:46:42 -0700 | [diff] [blame] | 12 | libz |
| 13 | LOCAL_C_INCLUDES := external/f2fs-tools/include external/f2fs-tools/mkfs |
| Dan Albert | 8797850 | 2016-02-02 15:35:33 -0800 | [diff] [blame] | 14 | LOCAL_CFLAGS := -Wno-unused-parameter |
| JP Abgrall | a27df87 | 2014-06-11 23:46:42 -0700 | [diff] [blame] | 15 | include $(BUILD_HOST_STATIC_LIBRARY) |
| 16 | |
| JP Abgrall | 5e2dc24 | 2014-06-18 11:55:28 -0700 | [diff] [blame] | 17 | include $(CLEAR_VARS) |
| 18 | LOCAL_SRC_FILES := f2fs_ioutils.c |
| 19 | LOCAL_C_INCLUDES := external/f2fs-tools/include external/f2fs-tools/mkfs |
| Dan Albert | 8797850 | 2016-02-02 15:35:33 -0800 | [diff] [blame] | 20 | LOCAL_CFLAGS := -Wno-unused-parameter |
| JP Abgrall | 5e2dc24 | 2014-06-18 11:55:28 -0700 | [diff] [blame] | 21 | LOCAL_STATIC_LIBRARIES := \ |
| Colin Cross | 2c9aef1 | 2016-01-08 15:44:46 -0800 | [diff] [blame] | 22 | libselinux \ |
| Alex Deymo | f417a8d | 2017-01-11 14:37:14 -0800 | [diff] [blame] | 23 | libsparse \ |
| Alex Deymo | c5250db | 2015-12-09 17:55:36 -0800 | [diff] [blame] | 24 | libext2_uuid-host \ |
| JP Abgrall | 5e2dc24 | 2014-06-18 11:55:28 -0700 | [diff] [blame] | 25 | libz |
| 26 | LOCAL_MODULE := libf2fs_ioutils_host |
| 27 | include $(BUILD_HOST_STATIC_LIBRARY) |
| JP Abgrall | a27df87 | 2014-06-11 23:46:42 -0700 | [diff] [blame] | 28 | |
| JP Abgrall | 5e2dc24 | 2014-06-18 11:55:28 -0700 | [diff] [blame] | 29 | include $(CLEAR_VARS) |
| 30 | LOCAL_SRC_FILES := f2fs_dlutils.c |
| 31 | LOCAL_C_INCLUDES := external/f2fs-tools/include external/f2fs-tools/mkfs |
| 32 | # Will attempt to dlopen("libf2fs_fmt_host_dyn") |
| 33 | LOCAL_LDLIBS := -ldl |
| 34 | LOCAL_MODULE := libf2fs_dlutils_host |
| 35 | include $(BUILD_HOST_STATIC_LIBRARY) |
| JP Abgrall | a27df87 | 2014-06-11 23:46:42 -0700 | [diff] [blame] | 36 | |
| 37 | include $(CLEAR_VARS) |
| JP Abgrall | 136c149 | 2014-06-16 11:08:45 -0700 | [diff] [blame] | 38 | LOCAL_SRC_FILES := make_f2fs_main.c |
| 39 | LOCAL_MODULE := make_f2fs |
| JP Abgrall | 136c149 | 2014-06-16 11:08:45 -0700 | [diff] [blame] | 40 | # libf2fs_dlutils_host will dlopen("libf2fs_fmt_host_dyn") |
| JP Abgrall | 5e2dc24 | 2014-06-18 11:55:28 -0700 | [diff] [blame] | 41 | LOCAL_LDFLAGS := -ldl -rdynamic |
| 42 | # The following libf2fs_* are from system/extras/f2fs_utils, |
| 43 | # and do not use code in external/f2fs-tools. |
| 44 | LOCAL_STATIC_LIBRARIES := libf2fs_utils_host libf2fs_ioutils_host libf2fs_dlutils_host |
| 45 | LOCAL_REQUIRED_MODULES := libf2fs_fmt_host_dyn |
| 46 | LOCAL_STATIC_LIBRARIES += \ |
| Alex Deymo | f417a8d | 2017-01-11 14:37:14 -0800 | [diff] [blame] | 47 | libsparse \ |
| JP Abgrall | 5e2dc24 | 2014-06-18 11:55:28 -0700 | [diff] [blame] | 48 | libz |
| JP Abgrall | 136c149 | 2014-06-16 11:08:45 -0700 | [diff] [blame] | 49 | include $(BUILD_HOST_EXECUTABLE) |
| 50 | |
| 51 | include $(CLEAR_VARS) |
| JP Abgrall | a27df87 | 2014-06-11 23:46:42 -0700 | [diff] [blame] | 52 | LOCAL_MODULE := libf2fs_dlutils |
| 53 | LOCAL_SRC_FILES := f2fs_dlutils.c |
| 54 | LOCAL_C_INCLUDES := external/f2fs-tools/include external/f2fs-tools/mkfs |
| 55 | LOCAL_SHARED_LIBRARIES := libdl |
| 56 | include $(BUILD_SHARED_LIBRARY) |
| 57 | |
| 58 | include $(CLEAR_VARS) |
| 59 | LOCAL_MODULE := libf2fs_dlutils_static |
| 60 | LOCAL_SRC_FILES := f2fs_dlutils.c |
| 61 | LOCAL_C_INCLUDES := external/f2fs-tools/include external/f2fs-tools/mkfs |
| 62 | LOCAL_SHARED_LIBRARIES := libdl |
| 63 | include $(BUILD_STATIC_LIBRARY) |
| 64 | |
| 65 | include $(CLEAR_VARS) |
| 66 | LOCAL_MODULE := libf2fs_utils_static |
| 67 | LOCAL_SRC_FILES := f2fs_utils.c |
| 68 | LOCAL_C_INCLUDES := external/f2fs-tools/include external/f2fs-tools/mkfs |
| Dan Albert | 8797850 | 2016-02-02 15:35:33 -0800 | [diff] [blame] | 69 | LOCAL_CFLAGS := -Wno-unused-parameter |
| JP Abgrall | a27df87 | 2014-06-11 23:46:42 -0700 | [diff] [blame] | 70 | LOCAL_STATIC_LIBRARIES := \ |
| Alex Deymo | f417a8d | 2017-01-11 14:37:14 -0800 | [diff] [blame] | 71 | libsparse |
| JP Abgrall | a27df87 | 2014-06-11 23:46:42 -0700 | [diff] [blame] | 72 | include $(BUILD_STATIC_LIBRARY) |
| 73 | |
| JP Abgrall | 48604ad | 2014-06-25 07:56:32 -0700 | [diff] [blame] | 74 | endif |
| 75 | |
| JP Abgrall | 136c149 | 2014-06-16 11:08:45 -0700 | [diff] [blame] | 76 | include $(CLEAR_VARS) |
| Daniel Rosenberg | b1c010d | 2014-08-15 13:13:41 -0700 | [diff] [blame] | 77 | LOCAL_MODULE := libf2fs_sparseblock |
| 78 | LOCAL_SRC_FILES := f2fs_sparseblock.c |
| Dimitry Ivanov | 01252c9 | 2016-02-12 16:28:49 -0800 | [diff] [blame] | 79 | LOCAL_SHARED_LIBRARIES := liblog libcutils |
| Daniel Rosenberg | b1c010d | 2014-08-15 13:13:41 -0700 | [diff] [blame] | 80 | LOCAL_C_INCLUDES := external/f2fs-tools/include \ |
| 81 | system/core/include/log |
| 82 | include $(BUILD_SHARED_LIBRARY) |
| 83 | |
| 84 | include $(CLEAR_VARS) |
| 85 | LOCAL_MODULE := f2fs_sparseblock |
| 86 | LOCAL_SRC_FILES := f2fs_sparseblock.c |
| Dimitry Ivanov | 01252c9 | 2016-02-12 16:28:49 -0800 | [diff] [blame] | 87 | LOCAL_SHARED_LIBRARIES := liblog libcutils |
| Daniel Rosenberg | b1c010d | 2014-08-15 13:13:41 -0700 | [diff] [blame] | 88 | LOCAL_C_INCLUDES := external/f2fs-tools/include \ |
| 89 | system/core/include/log |
| 90 | include $(BUILD_EXECUTABLE) |
| 91 | |
| 92 | include $(CLEAR_VARS) |
| JP Abgrall | 136c149 | 2014-06-16 11:08:45 -0700 | [diff] [blame] | 93 | LOCAL_MODULE := mkf2fsuserimg.sh |
| 94 | LOCAL_SRC_FILES := mkf2fsuserimg.sh |
| 95 | LOCAL_MODULE_CLASS := EXECUTABLES |
| 96 | # We don't need any additional suffix. |
| 97 | LOCAL_MODULE_SUFFIX := |
| 98 | LOCAL_BUILT_MODULE_STEM := $(notdir $(LOCAL_SRC_FILES)) |
| 99 | LOCAL_IS_HOST_MODULE := true |
| 100 | include $(BUILD_PREBUILT) |
| 101 | |
| JP Abgrall | a27df87 | 2014-06-11 23:46:42 -0700 | [diff] [blame] | 102 | |