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