1 # Copyright 2014 The Android Open Source Project
3 LOCAL_PATH:= $(call my-dir)
5 ifneq (,$(filter linux darwin,$(HOST_OS)))
8 LOCAL_MODULE := libf2fs_utils_host
9 LOCAL_SRC_FILES := f2fs_utils.c
10 LOCAL_STATIC_LIBRARIES := \
13 LOCAL_C_INCLUDES := external/f2fs-tools/include external/f2fs-tools/mkfs
14 include $(BUILD_HOST_STATIC_LIBRARY)
17 LOCAL_SRC_FILES := f2fs_ioutils.c
18 LOCAL_C_INCLUDES := external/f2fs-tools/include external/f2fs-tools/mkfs
19 LOCAL_STATIC_LIBRARIES := \
23 LOCAL_MODULE := libf2fs_ioutils_host
24 include $(BUILD_HOST_STATIC_LIBRARY)
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")
31 LOCAL_MODULE := libf2fs_dlutils_host
32 include $(BUILD_HOST_STATIC_LIBRARY)
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_dlutils_host
42 LOCAL_REQUIRED_MODULES := libf2fs_fmt_host_dyn
43 LOCAL_STATIC_LIBRARIES += \
46 include $(BUILD_HOST_EXECUTABLE)
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)
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)
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 := \
68 include $(BUILD_STATIC_LIBRARY)
73 LOCAL_MODULE := libf2fs_sparseblock
74 LOCAL_SRC_FILES := f2fs_sparseblock.c
75 LOCAL_CFLAGS += -DSTATIC_LIB
76 LOCAL_STATIC_LIBRARIES := libcutils
77 LOCAL_C_INCLUDES := external/f2fs-tools/include \
78 system/core/include/log
79 include $(BUILD_STATIC_LIBRARY)
82 LOCAL_MODULE := libf2fs_sparseblock
83 LOCAL_SRC_FILES := f2fs_sparseblock.c
84 LOCAL_SHARED_LIBRARIES := libcutils
85 LOCAL_C_INCLUDES := external/f2fs-tools/include \
86 system/core/include/log
87 include $(BUILD_SHARED_LIBRARY)
90 LOCAL_MODULE := f2fs_sparseblock
91 LOCAL_SRC_FILES := f2fs_sparseblock.c
92 LOCAL_SHARED_LIBRARIES := libcutils
93 LOCAL_C_INCLUDES := external/f2fs-tools/include \
94 system/core/include/log
95 include $(BUILD_EXECUTABLE)
98 LOCAL_MODULE := mkf2fsuserimg.sh
99 LOCAL_SRC_FILES := mkf2fsuserimg.sh
100 LOCAL_MODULE_CLASS := EXECUTABLES
101 # We don't need any additional suffix.
102 LOCAL_MODULE_SUFFIX :=
103 LOCAL_BUILT_MODULE_STEM := $(notdir $(LOCAL_SRC_FILES))
104 LOCAL_IS_HOST_MODULE := true
105 include $(BUILD_PREBUILT)