1 # Copyright 2014 The Android Open Source Project 2 3 LOCAL_PATH:= $(call my-dir) 4 5 ifeq ($(HOST_OS),linux) 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 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) 25 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) 33 34 include $(CLEAR_VARS) 35 LOCAL_SRC_FILES := make_f2fs_main.c 36 LOCAL_MODULE := make_f2fs 37 # libf2fs_dlutils_host will dlopen("libf2fs_fmt_host_dyn") 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 46 include $(BUILD_HOST_EXECUTABLE) 47 48 include $(CLEAR_VARS) 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 70 endif 71 72 include $(CLEAR_VARS) 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) 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 98 99