Home | History | Annotate | Download | only in f2fs_utils
      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 \
     12     libz
     13 LOCAL_C_INCLUDES := external/f2fs-tools/include external/f2fs-tools/mkfs
     14 LOCAL_CFLAGS := -Wno-unused-parameter
     15 include $(BUILD_HOST_STATIC_LIBRARY)
     16 
     17 include $(CLEAR_VARS)
     18 LOCAL_SRC_FILES := f2fs_ioutils.c
     19 LOCAL_C_INCLUDES := external/f2fs-tools/include external/f2fs-tools/mkfs
     20 LOCAL_CFLAGS := -Wno-unused-parameter
     21 LOCAL_STATIC_LIBRARIES := \
     22     libselinux \
     23     libsparse \
     24     libext2_uuid \
     25     libz
     26 LOCAL_MODULE := libf2fs_ioutils_host
     27 include $(BUILD_HOST_STATIC_LIBRARY)
     28 
     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)
     36 
     37 include $(CLEAR_VARS)
     38 LOCAL_SRC_FILES := make_f2fs_main.c
     39 LOCAL_MODULE := make_f2fs
     40 # libf2fs_dlutils_host will dlopen("libf2fs_fmt_host_dyn")
     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 += \
     47     libsparse \
     48     libz
     49 include $(BUILD_HOST_EXECUTABLE)
     50 
     51 include $(CLEAR_VARS)
     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
     69 LOCAL_CFLAGS := -Wno-unused-parameter
     70 LOCAL_STATIC_LIBRARIES := \
     71     libsparse
     72 include $(BUILD_STATIC_LIBRARY)
     73 
     74 endif
     75 
     76 include $(CLEAR_VARS)
     77 LOCAL_MODULE := libf2fs_sparseblock
     78 LOCAL_SRC_FILES := f2fs_sparseblock.c
     79 LOCAL_SHARED_LIBRARIES := liblog libcutils
     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
     87 LOCAL_SHARED_LIBRARIES := liblog libcutils
     88 LOCAL_C_INCLUDES := external/f2fs-tools/include \
     89 		system/core/include/log
     90 include $(BUILD_EXECUTABLE)
     91 
     92 include $(CLEAR_VARS)
     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 
    102 
    103