JP Abgrall | 3b1946f | 2014-05-07 16:59:40 -0700 | [diff] [blame] | 1 | LOCAL_PATH:= $(call my-dir) |
| 2 | |
Torne (Richard Coles) | 140f403 | 2014-05-14 11:38:05 +0100 | [diff] [blame] | 3 | # f2fs-tools depends on Linux kernel headers being in the system include path. |
Jaegeuk Kim | 0fb894e | 2017-11-14 19:46:02 -0800 | [diff] [blame] | 4 | ifneq (,$filter linux darwin,$(HOST_OS)) |
Torne (Richard Coles) | 140f403 | 2014-05-14 11:38:05 +0100 | [diff] [blame] | 5 | |
JP Abgrall | 3b1946f | 2014-05-07 16:59:40 -0700 | [diff] [blame] | 6 | # The versions depend on $(LOCAL_PATH)/VERSION |
Park Ju Hyung | 98a20c3 | 2018-02-06 23:47:33 +0900 | [diff] [blame^] | 7 | version_CFLAGS := -DF2FS_MAJOR_VERSION=1 -DF2FS_MINOR_VERSION=10 -DF2FS_TOOLS_VERSION=\"1.10.0\" -DF2FS_TOOLS_DATE=\"2018-01-30\" |
Chih-Hung Hsieh | e88258a | 2017-10-10 13:39:20 -0700 | [diff] [blame] | 8 | common_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 Abgrall | 3b1946f | 2014-05-07 16:59:40 -0700 | [diff] [blame] | 17 | # external/e2fsprogs/lib is needed for uuid/uuid.h |
Jaegeuk Kim | 595231e | 2017-11-28 21:44:34 -0800 | [diff] [blame] | 18 | common_C_INCLUDES := $(LOCAL_PATH)/include \ |
| 19 | external/e2fsprogs/lib/ \ |
| 20 | system/core/libsparse/include \ |
JP Abgrall | 3b1946f | 2014-05-07 16:59:40 -0700 | [diff] [blame] | 21 | |
JP Abgrall | 4541c65 | 2014-06-13 18:07:42 -0700 | [diff] [blame] | 22 | #---------------------------------------------------------- |
JP Abgrall | 3b1946f | 2014-05-07 16:59:40 -0700 | [diff] [blame] | 23 | include $(CLEAR_VARS) |
JP Abgrall | 3b1946f | 2014-05-07 16:59:40 -0700 | [diff] [blame] | 24 | # The LOCAL_MODULE name is referenced by the code. Don't change it. |
| 25 | LOCAL_MODULE := mkfs.f2fs |
JP Abgrall | 4541c65 | 2014-06-13 18:07:42 -0700 | [diff] [blame] | 26 | |
| 27 | # mkfs.f2fs is used in recovery: must be static. |
| 28 | LOCAL_FORCE_STATIC_EXECUTABLE := true |
| 29 | |
Ying Wang | 2a1bc92 | 2015-03-10 12:00:06 -0700 | [diff] [blame] | 30 | LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin |
JP Abgrall | 4541c65 | 2014-06-13 18:07:42 -0700 | [diff] [blame] | 31 | |
| 32 | LOCAL_SRC_FILES := \ |
Jaegeuk Kim | 595231e | 2017-11-28 21:44:34 -0800 | [diff] [blame] | 33 | lib/libf2fs_io.c \ |
| 34 | mkfs/f2fs_format_main.c |
Yang Jin | 42c4b98 | 2017-06-09 14:19:35 -0700 | [diff] [blame] | 35 | LOCAL_C_INCLUDES := $(common_C_INCLUDES) |
| 36 | LOCAL_CFLAGS := $(common_CFLAGS) |
Jaegeuk Kim | 2f25c50 | 2017-11-28 14:39:38 -0800 | [diff] [blame] | 37 | LOCAL_STATIC_LIBRARIES := \ |
Jaegeuk Kim | 595231e | 2017-11-28 21:44:34 -0800 | [diff] [blame] | 38 | libf2fs_fmt \ |
| 39 | libext2_uuid \ |
| 40 | libsparse \ |
| 41 | libz |
| 42 | LOCAL_WHOLE_STATIC_LIBRARIES := libbase |
JP Abgrall | 3b1946f | 2014-05-07 16:59:40 -0700 | [diff] [blame] | 43 | include $(BUILD_EXECUTABLE) |
| 44 | |
Jaegeuk Kim | cbc4784 | 2017-11-30 17:40:24 -0800 | [diff] [blame] | 45 | #---------------------------------------------------------- |
| 46 | include $(CLEAR_VARS) |
| 47 | # The LOCAL_MODULE name is referenced by the code. Don't change it. |
| 48 | LOCAL_MODULE := sload.f2fs |
| 49 | |
| 50 | # mkfs.f2fs is used in recovery: must be static. |
| 51 | LOCAL_FORCE_STATIC_EXECUTABLE := true |
| 52 | |
| 53 | LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin |
| 54 | |
| 55 | LOCAL_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 |
| 71 | LOCAL_C_INCLUDES := $(common_C_INCLUDES) |
| 72 | LOCAL_CFLAGS := $(common_CFLAGS) -DWITH_SLOAD |
| 73 | LOCAL_STATIC_LIBRARIES := \ |
| 74 | libcutils \ |
| 75 | libselinux \ |
| 76 | libcrypto \ |
| 77 | libsparse \ |
| 78 | liblog \ |
| 79 | libz |
| 80 | LOCAL_WHOLE_STATIC_LIBRARIES := libbase |
| 81 | include $(BUILD_EXECUTABLE) |
| 82 | |
Torne (Richard Coles) | 140f403 | 2014-05-14 11:38:05 +0100 | [diff] [blame] | 83 | endif |