OSDN Git Service

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