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