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