]>
Commit | Line | Data |
---|---|---|
a95c632b AD |
1 | // Copyright 2017 The Android Open Source Project |
2 | ||
3 | // Library used to export files from this directory to other programs in this | |
4 | // project. | |
5 | cc_library { | |
6 | name: "libext2_misc", | |
7 | host_supported: true, | |
8 | ||
0a3d8041 JQ |
9 | target: { |
10 | windows: { | |
11 | include_dirs: [ "external/e2fsprogs/include/mingw" ], | |
182fa0cd DW |
12 | enabled: true, |
13 | cflags: ["-Wno-unused-variable"], | |
0a3d8041 JQ |
14 | }, |
15 | }, | |
16 | ||
a95c632b AD |
17 | srcs: [ |
18 | "create_inode.c", | |
19 | ], | |
0a3d8041 | 20 | cflags: ["-W", "-Wall"], |
a95c632b AD |
21 | shared_libs: [ |
22 | "libext2_quota", | |
23 | "libext2fs", | |
24 | ], | |
88ca49f9 | 25 | system_shared_libs: ["libc", "libdl"], |
a95c632b AD |
26 | export_include_dirs: ["."], |
27 | } | |
28 | ||
29 | //######################################################################## | |
30 | // Build mke2fs | |
31 | ||
32 | cc_binary { | |
33 | name: "mke2fs", | |
34 | host_supported: true, | |
35 | ||
36 | srcs: [ | |
37 | "mke2fs.c", | |
38 | "util.c", | |
39 | "mk_hugefiles.c", | |
40 | "default_profile.c", | |
a95c632b | 41 | ], |
25a03337 SM |
42 | cflags: [ |
43 | "-Wno-error=format", | |
44 | "-Wno-error=type-limits", | |
45 | "-Wno-format-extra-args", | |
38aaf9d5 | 46 | ], |
bee92ebe JQ |
47 | target: { |
48 | host: { | |
49 | static_libs: [ | |
50 | "libext2_blkid", | |
51 | "libext2_misc", | |
52 | "libext2_uuid", | |
53 | "libext2_quota", | |
54 | "libext2_com_err", | |
55 | "libext2_e2p", | |
56 | "libext2fs", | |
57 | "libsparse", | |
58 | "libbase", | |
59 | "libz", | |
60 | ], | |
61 | }, | |
25a03337 SM |
62 | not_windows: { |
63 | required: [ | |
64 | "mke2fs.conf", | |
65 | ], | |
66 | }, | |
0a3d8041 JQ |
67 | windows: { |
68 | include_dirs: [ "external/e2fsprogs/include/mingw" ], | |
69 | cflags: ["-D_POSIX", "-D__USE_MINGW_ALARM"], | |
70 | ldflags: ["-static"], | |
71 | host_ldlibs: ["-lws2_32"], | |
72 | enabled: true | |
73 | }, | |
bee92ebe | 74 | android: { |
25a03337 SM |
75 | required: [ |
76 | "mke2fs.conf", | |
77 | ], | |
bee92ebe JQ |
78 | shared_libs: [ |
79 | "libext2fs", | |
80 | "libext2_blkid", | |
81 | "libext2_misc", | |
82 | "libext2_uuid", | |
83 | "libext2_quota", | |
84 | "libext2_com_err", | |
85 | "libext2_e2p", | |
86 | ], | |
25a03337 | 87 | symlinks: ["mkfs.ext2", "mkfs.ext3", "mkfs.ext4"], |
bee92ebe JQ |
88 | }, |
89 | }, | |
90 | stl: "libc++_static", | |
a95c632b AD |
91 | include_dirs: ["external/e2fsprogs/e2fsck"], |
92 | } | |
93 | ||
94 | //########################################################################## | |
95 | // Build tune2fs | |
96 | ||
97 | cc_defaults { | |
98 | name: "tune2fs-defaults", | |
99 | srcs: [ | |
100 | "tune2fs.c", | |
101 | "util.c", | |
102 | ], | |
103 | cflags: [ | |
104 | "-W", | |
105 | "-Wall", | |
106 | "-DNO_RECOVERY", | |
1333f2b3 | 107 | "-Wno-macro-redefined", |
a95c632b AD |
108 | ], |
109 | include_dirs: ["external/e2fsprogs/e2fsck"], | |
110 | } | |
111 | ||
112 | tune2fs_libs = [ | |
113 | "libext2_com_err", | |
114 | "libext2_blkid", | |
115 | "libext2_quota", | |
116 | "libext2_uuid", | |
117 | "libext2_e2p", | |
118 | "libext2fs", | |
119 | ] | |
120 | ||
121 | cc_binary { | |
122 | name: "tune2fs", | |
123 | host_supported: true, | |
124 | defaults: ["tune2fs-defaults"], | |
125 | ||
126 | shared_libs: tune2fs_libs, | |
88ca49f9 | 127 | system_shared_libs: ["libc", "libdl"], |
a95c632b AD |
128 | } |
129 | ||
130 | cc_binary { | |
131 | name: "tune2fs_static", | |
132 | static_executable: true, | |
133 | defaults: ["tune2fs-defaults"], | |
134 | ||
33b80078 | 135 | static_libs: tune2fs_libs, |
a95c632b AD |
136 | } |
137 | ||
138 | cc_library_static { | |
139 | name: "libtune2fs", | |
140 | defaults: ["tune2fs-defaults"], | |
141 | ||
142 | cflags: ["-DBUILD_AS_LIB"], | |
143 | static_libs: tune2fs_libs, | |
144 | } | |
145 | ||
146 | //######################################################################## | |
147 | // Build badblocks | |
148 | ||
149 | cc_binary { | |
150 | name: "badblocks", | |
151 | host_supported: true, | |
152 | ||
153 | srcs: ["badblocks.c"], | |
1333f2b3 | 154 | cflags: ["-W", "-Wall", "-Wno-macro-redefined"], |
a95c632b AD |
155 | shared_libs: [ |
156 | "libext2fs", | |
157 | "libext2_com_err", | |
158 | "libext2_uuid", | |
159 | "libext2_blkid", | |
160 | "libext2_e2p", | |
161 | ], | |
88ca49f9 | 162 | system_shared_libs: ["libc", "libdl"], |
a95c632b AD |
163 | } |
164 | ||
165 | //######################################################################## | |
166 | // Build chattr | |
167 | ||
168 | cc_binary { | |
169 | name: "chattr", | |
170 | host_supported: true, | |
171 | ||
172 | srcs: ["chattr.c"], | |
1333f2b3 | 173 | cflags: ["-W", "-Wall", "-Wno-macro-redefined"], |
a95c632b AD |
174 | shared_libs: [ |
175 | "libext2_com_err", | |
176 | "libext2_e2p", | |
177 | ], | |
88ca49f9 | 178 | system_shared_libs: ["libc", "libdl"], |
a95c632b AD |
179 | } |
180 | ||
181 | //######################################################################## | |
182 | // Build lsattr | |
183 | ||
184 | cc_defaults { | |
185 | name: "lsattr-defaults", | |
186 | srcs: ["lsattr.c"], | |
1333f2b3 | 187 | cflags: ["-W", "-Wall", "-Wno-macro-redefined"], |
a95c632b AD |
188 | } |
189 | ||
190 | lsattr_libs = [ | |
191 | "libext2_com_err", | |
192 | "libext2_e2p", | |
193 | ] | |
194 | ||
195 | cc_binary { | |
196 | name: "lsattr", | |
197 | host_supported: true, | |
198 | defaults: ["lsattr-defaults"], | |
199 | ||
200 | shared_libs: lsattr_libs, | |
88ca49f9 | 201 | system_shared_libs: ["libc", "libdl"], |
a95c632b AD |
202 | } |
203 | ||
204 | cc_binary { | |
205 | name: "lsattr_static", | |
206 | static_executable: true, | |
207 | defaults: ["lsattr-defaults"], | |
208 | ||
33b80078 | 209 | static_libs: lsattr_libs, |
a95c632b AD |
210 | } |
211 | ||
212 | //######################################################################## | |
213 | // Build blkid | |
214 | ||
215 | cc_binary { | |
216 | name: "blkid", | |
217 | ||
218 | srcs: ["blkid.c"], | |
1333f2b3 | 219 | cflags: ["-W", "-Wall", "-Wno-macro-redefined"], |
a95c632b AD |
220 | shared_libs: [ |
221 | "libext2fs", | |
222 | "libext2_blkid", | |
223 | "libext2_com_err", | |
224 | "libext2_e2p", | |
225 | ], | |
88ca49f9 | 226 | system_shared_libs: ["libc", "libdl"], |
a95c632b AD |
227 | } |
228 | ||
229 | //######################################################################## | |
230 | // Build e4crypt | |
231 | ||
232 | cc_binary { | |
233 | name: "e4crypt", | |
234 | host_supported: true, | |
235 | ||
236 | srcs: ["e4crypt.c"], | |
1333f2b3 | 237 | cflags: ["-W", "-Wall", "-Wno-macro-redefined"], |
a95c632b AD |
238 | shared_libs: [ |
239 | "libext2fs", | |
240 | "libext2_uuid", | |
241 | ], | |
88ca49f9 | 242 | system_shared_libs: ["libc", "libdl"], |
a95c632b AD |
243 | |
244 | target: { | |
245 | darwin: { | |
246 | enabled: false, | |
247 | }, | |
248 | }, | |
249 | } | |
250 | ||
251 | //########################################################################## | |
252 | // Build e2image | |
253 | ||
254 | cc_binary { | |
255 | name: "e2image", | |
256 | host_supported: true, | |
257 | ||
258 | srcs: ["e2image.c"], | |
1333f2b3 | 259 | cflags: ["-W", "-Wall", "-Wno-macro-redefined"], |
a95c632b AD |
260 | shared_libs: [ |
261 | "libext2fs", | |
262 | "libext2_blkid", | |
263 | "libext2_com_err", | |
264 | "libext2_quota", | |
265 | ], | |
88ca49f9 | 266 | system_shared_libs: ["libc", "libdl"], |
a95c632b | 267 | } |