1 LOCAL_PATH := $(call my-dir) 2 3 ######################################################################### 4 # Build mke2fs 5 mke2fs_src_files := \ 6 mke2fs.c \ 7 util.c \ 8 default_profile.c 9 10 mke2fs_c_includes := \ 11 external/e2fsprogs/lib \ 12 external/e2fsprogs/e2fsck 13 14 mke2fs_cflags := -O2 -g -W -Wall \ 15 -DHAVE_UNISTD_H \ 16 -DHAVE_ERRNO_H \ 17 -DHAVE_NETINET_IN_H \ 18 -DHAVE_SYS_IOCTL_H \ 19 -DHAVE_SYS_MMAN_H \ 20 -DHAVE_SYS_MOUNT_H \ 21 -DHAVE_SYS_RESOURCE_H \ 22 -DHAVE_SYS_SELECT_H \ 23 -DHAVE_SYS_STAT_H \ 24 -DHAVE_SYS_TYPES_H \ 25 -DHAVE_STDLIB_H \ 26 -DHAVE_STRCASECMP \ 27 -DHAVE_STRDUP \ 28 -DHAVE_MMAP \ 29 -DHAVE_UTIME_H \ 30 -DHAVE_GETPAGESIZE \ 31 -DHAVE_EXT2_IOCTLS \ 32 -DHAVE_TYPE_SSIZE_T \ 33 -DHAVE_GETOPT_H \ 34 -DHAVE_SYS_TIME_H \ 35 -DHAVE_SYSCONF 36 37 mke2fs_cflags_linux := \ 38 -DHAVE_LINUX_FD_H \ 39 -DHAVE_SYS_PRCTL_H \ 40 -DHAVE_LSEEK64 \ 41 -DHAVE_LSEEK64_PROTOTYPE 42 43 mke2fs_cflags += -DNO_CHECK_BB 44 45 mke2fs_shared_libraries := \ 46 libext2fs \ 47 libext2_blkid \ 48 libext2_uuid \ 49 libext2_profile \ 50 libext2_com_err \ 51 libext2_e2p 52 53 mke2fs_system_shared_libraries := libc 54 55 include $(CLEAR_VARS) 56 57 LOCAL_SRC_FILES := $(mke2fs_src_files) 58 LOCAL_C_INCLUDES := $(mke2fs_c_includes) 59 LOCAL_CFLAGS := $(mke2fs_cflags) $(mke2fs_cflags_linux) 60 LOCAL_SYSTEM_SHARED_LIBRARIES := $(mke2fs_system_shared_libraries) 61 LOCAL_SHARED_LIBRARIES := $(mke2fs_shared_libraries) 62 LOCAL_MODULE := mke2fs 63 LOCAL_MODULE_TAGS := optional 64 include $(BUILD_EXECUTABLE) 65 66 include $(CLEAR_VARS) 67 68 LOCAL_SRC_FILES := $(mke2fs_src_files) 69 LOCAL_C_INCLUDES := $(mke2fs_c_includes) 70 ifeq ($(HOST_OS),linux) 71 LOCAL_CFLAGS := $(mke2fs_cflags) $(mke2fs_cflags_linux) 72 else 73 LOCAL_CFLAGS := $(mke2fs_cflags) 74 endif 75 LOCAL_SHARED_LIBRARIES := $(mke2fs_shared_libraries) 76 LOCAL_MODULE := mke2fs_host 77 LOCAL_MODULE_STEM := mke2fs 78 LOCAL_MODULE_TAGS := optional 79 80 include $(BUILD_HOST_EXECUTABLE) 81 82 ########################################################################### 83 # Build tune2fs 84 # 85 tune2fs_src_files := \ 86 tune2fs.c \ 87 util.c 88 89 tune2fs_c_includes := \ 90 external/e2fsprogs/lib \ 91 external/e2fsprogs/e2fsck 92 93 tune2fs_cflags := -O2 -g -W -Wall \ 94 -DHAVE_UNISTD_H \ 95 -DHAVE_ERRNO_H \ 96 -DHAVE_NETINET_IN_H \ 97 -DHAVE_SYS_IOCTL_H \ 98 -DHAVE_SYS_MMAN_H \ 99 -DHAVE_SYS_MOUNT_H \ 100 -DHAVE_SYS_PRCTL_H \ 101 -DHAVE_SYS_RESOURCE_H \ 102 -DHAVE_SYS_SELECT_H \ 103 -DHAVE_SYS_STAT_H \ 104 -DHAVE_SYS_TYPES_H \ 105 -DHAVE_STDLIB_H \ 106 -DHAVE_STRCASECMP \ 107 -DHAVE_STRDUP \ 108 -DHAVE_MMAP \ 109 -DHAVE_UTIME_H \ 110 -DHAVE_GETPAGESIZE \ 111 -DHAVE_LSEEK64 \ 112 -DHAVE_LSEEK64_PROTOTYPE \ 113 -DHAVE_EXT2_IOCTLS \ 114 -DHAVE_LINUX_FD_H \ 115 -DHAVE_TYPE_SSIZE_T \ 116 -DHAVE_GETOPT_H \ 117 -DHAVE_SYS_TIME_H \ 118 -DHAVE_SYSCONF 119 120 tune2fs_cflags += -DNO_CHECK_BB 121 122 tune2fs_shared_libraries := \ 123 libext2fs \ 124 libext2_com_err \ 125 libext2_blkid \ 126 libext2_uuid \ 127 libext2_e2p 128 129 tune2fs_system_shared_libraries := libc 130 131 include $(CLEAR_VARS) 132 133 LOCAL_SRC_FILES := $(tune2fs_src_files) 134 LOCAL_C_INCLUDES := $(tune2fs_c_includes) 135 LOCAL_CFLAGS := $(tune2fs_cflags) 136 LOCAL_SHARED_LIBRARIES := $(tune2fs_shared_libraries) 137 LOCAL_SYSTEM_SHARED_LIBRARIES := $(tune2fs_system_shared_libraries) 138 LOCAL_MODULE := tune2fs 139 LOCAL_MODULE_TAGS := optional 140 141 include $(BUILD_EXECUTABLE) 142 143 include $(CLEAR_VARS) 144 145 LOCAL_SRC_FILES := $(tune2fs_src_files) 146 LOCAL_C_INCLUDES := $(tune2fs_c_includes) 147 LOCAL_CFLAGS := $(tune2fs_cflags) 148 LOCAL_SHARED_LIBRARIES := $(tune2fs_shared_libraries) 149 LOCAL_MODULE := tune2fs_host 150 LOCAL_MODULE_STEM := tune2fs 151 LOCAL_MODULE_TAGS := optional 152 153 include $(BUILD_HOST_EXECUTABLE) 154 155 ######################################################################### 156 # Build badblocks 157 # 158 include $(CLEAR_VARS) 159 160 badblocks_src_files := \ 161 badblocks.c 162 163 badblocks_c_includes := \ 164 external/e2fsprogs/lib 165 166 badblocks_cflags := -O2 -g -W -Wall \ 167 -DHAVE_UNISTD_H \ 168 -DHAVE_ERRNO_H \ 169 -DHAVE_NETINET_IN_H \ 170 -DHAVE_SYS_IOCTL_H \ 171 -DHAVE_SYS_MMAN_H \ 172 -DHAVE_SYS_MOUNT_H \ 173 -DHAVE_SYS_PRCTL_H \ 174 -DHAVE_SYS_RESOURCE_H \ 175 -DHAVE_SYS_SELECT_H \ 176 -DHAVE_SYS_STAT_H \ 177 -DHAVE_SYS_TYPES_H \ 178 -DHAVE_STDLIB_H \ 179 -DHAVE_STRCASECMP \ 180 -DHAVE_STRDUP \ 181 -DHAVE_MMAP \ 182 -DHAVE_UTIME_H \ 183 -DHAVE_GETPAGESIZE \ 184 -DHAVE_LSEEK64 \ 185 -DHAVE_LSEEK64_PROTOTYPE \ 186 -DHAVE_EXT2_IOCTLS \ 187 -DHAVE_LINUX_FD_H \ 188 -DHAVE_TYPE_SSIZE_T \ 189 -DHAVE_GETOPT_H \ 190 -DHAVE_SYS_TIME_H \ 191 -DHAVE_SYSCONF 192 193 badblocks_shared_libraries := \ 194 libext2fs \ 195 libext2_com_err \ 196 libext2_uuid \ 197 libext2_blkid \ 198 libext2_e2p 199 200 badblocks_system_shared_libraries := libc 201 202 include $(CLEAR_VARS) 203 204 LOCAL_SRC_FILES := $(badblocks_src_files) 205 LOCAL_C_INCLUDES := $(badblocks_c_includes) 206 LOCAL_CFLAGS := $(badblocks_cflags) 207 LOCAL_SHARED_LIBRARIES := $(badblocks_shared_libraries) 208 LOCAL_SYSTEM_SHARED_LIBRARIES := $(badblocks_system_shared_libraries) 209 LOCAL_MODULE := badblocks 210 LOCAL_MODULE_TAGS := optional 211 212 include $(BUILD_EXECUTABLE) 213 214 include $(CLEAR_VARS) 215 216 LOCAL_SRC_FILES := $(badblocks_src_files) 217 LOCAL_C_INCLUDES := $(badblocks_c_includes) 218 LOCAL_CFLAGS := $(badblocks_cflags) 219 LOCAL_SHARED_LIBRARIES := $(badblocks_shared_libraries) 220 LOCAL_MODULE := badblocks_host 221 LOCAL_MODULE_STEM := badblocks 222 LOCAL_MODULE_TAGS := optional 223 224 include $(BUILD_HOST_EXECUTABLE) 225