blob: 67e3e936d6f9bc2c2408e994de9a4f98d825e0c9 [file] [log] [blame]
JP Abgrall3b1946f2014-05-07 16:59:40 -07001LOCAL_PATH:= $(call my-dir)
2
Torne (Richard Coles)140f4032014-05-14 11:38:05 +01003# f2fs-tools depends on Linux kernel headers being in the system include path.
Jaegeuk Kim0fb894e2017-11-14 19:46:02 -08004ifneq (,$filter linux darwin,$(HOST_OS))
Torne (Richard Coles)140f4032014-05-14 11:38:05 +01005
JP Abgrall3b1946f2014-05-07 16:59:40 -07006# The versions depend on $(LOCAL_PATH)/VERSION
Park Ju Hyung98a20c32018-02-06 23:47:33 +09007version_CFLAGS := -DF2FS_MAJOR_VERSION=1 -DF2FS_MINOR_VERSION=10 -DF2FS_TOOLS_VERSION=\"1.10.0\" -DF2FS_TOOLS_DATE=\"2018-01-30\"
Chih-Hung Hsiehe88258a2017-10-10 13:39:20 -07008common_CFLAGS := -DWITH_ANDROID $(version_CFLAGS) \
9 -Wall -Werror \
10 -Wno-format \
11 -Wno-macro-redefined \
12 -Wno-missing-field-initializers \
13 -Wno-pointer-arith \
14 -Wno-sign-compare \
15 -Wno-unused-function \
16
JP Abgrall3b1946f2014-05-07 16:59:40 -070017# external/e2fsprogs/lib is needed for uuid/uuid.h
Jaegeuk Kim595231e2017-11-28 21:44:34 -080018common_C_INCLUDES := $(LOCAL_PATH)/include \
19 external/e2fsprogs/lib/ \
20 system/core/libsparse/include \
JP Abgrall3b1946f2014-05-07 16:59:40 -070021
JP Abgrall4541c652014-06-13 18:07:42 -070022#----------------------------------------------------------
JP Abgrall3b1946f2014-05-07 16:59:40 -070023include $(CLEAR_VARS)
JP Abgrall3b1946f2014-05-07 16:59:40 -070024# The LOCAL_MODULE name is referenced by the code. Don't change it.
25LOCAL_MODULE := mkfs.f2fs
JP Abgrall4541c652014-06-13 18:07:42 -070026
27# mkfs.f2fs is used in recovery: must be static.
28LOCAL_FORCE_STATIC_EXECUTABLE := true
29
Ying Wang2a1bc922015-03-10 12:00:06 -070030LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
JP Abgrall4541c652014-06-13 18:07:42 -070031
32LOCAL_SRC_FILES := \
Jaegeuk Kim595231e2017-11-28 21:44:34 -080033 lib/libf2fs_io.c \
34 mkfs/f2fs_format_main.c
Yang Jin42c4b982017-06-09 14:19:35 -070035LOCAL_C_INCLUDES := $(common_C_INCLUDES)
36LOCAL_CFLAGS := $(common_CFLAGS)
Jaegeuk Kim2f25c502017-11-28 14:39:38 -080037LOCAL_STATIC_LIBRARIES := \
Jaegeuk Kim595231e2017-11-28 21:44:34 -080038 libf2fs_fmt \
39 libext2_uuid \
40 libsparse \
41 libz
42LOCAL_WHOLE_STATIC_LIBRARIES := libbase
JP Abgrall3b1946f2014-05-07 16:59:40 -070043include $(BUILD_EXECUTABLE)
44
Jaegeuk Kimcbc47842017-11-30 17:40:24 -080045#----------------------------------------------------------
46include $(CLEAR_VARS)
47# The LOCAL_MODULE name is referenced by the code. Don't change it.
48LOCAL_MODULE := sload.f2fs
49
50# mkfs.f2fs is used in recovery: must be static.
51LOCAL_FORCE_STATIC_EXECUTABLE := true
52
53LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
54
55LOCAL_SRC_FILES := \
56 fsck/fsck.c \
57 fsck/sload.c \
58 fsck/dir.c \
59 fsck/dict.c \
60 fsck/mkquota.c \
61 fsck/quotaio.c \
62 fsck/quotaio_tree.c \
63 fsck/quotaio_v2.c \
64 fsck/node.c \
65 fsck/segment.c \
66 fsck/xattr.c \
67 fsck/main.c \
68 fsck/mount.c \
69 lib/libf2fs.c \
70 lib/libf2fs_io.c
71LOCAL_C_INCLUDES := $(common_C_INCLUDES)
72LOCAL_CFLAGS := $(common_CFLAGS) -DWITH_SLOAD
73LOCAL_STATIC_LIBRARIES := \
74 libcutils \
75 libselinux \
76 libcrypto \
77 libsparse \
78 liblog \
79 libz
80LOCAL_WHOLE_STATIC_LIBRARIES := libbase
81include $(BUILD_EXECUTABLE)
82
Torne (Richard Coles)140f4032014-05-14 11:38:05 +010083endif