Whamcloud - gitweb
AOSP: Require mke2fs.conf when building mke2fs
[tools/e2fsprogs.git] / misc / Android.bp
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     ],
12     cflags: ["-W", "-Wall", "-Wno-macro-redefined"],
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",
33     ],
34     required: [
35         "mke2fs.conf",
36     ],
37     cflags: ["-W", "-Wall", "-Wno-macro-redefined"],
38     shared_libs: [
39         "libext2fs",
40         "libext2_blkid",
41         "libext2_misc",
42         "libext2_uuid",
43         "libext2_quota",
44         "libext2_com_err",
45         "libext2_e2p",
46     ],
47     system_shared_libs: ["libc"],
48     include_dirs: ["external/e2fsprogs/e2fsck"],
49 }
50
51 //##########################################################################
52 // Build tune2fs
53
54 cc_defaults {
55     name: "tune2fs-defaults",
56     srcs: [
57         "tune2fs.c",
58         "util.c",
59     ],
60     cflags: [
61         "-W",
62         "-Wall",
63         "-DNO_RECOVERY",
64         "-Wno-macro-redefined",
65     ],
66     include_dirs: ["external/e2fsprogs/e2fsck"],
67 }
68
69 tune2fs_libs = [
70     "libext2_com_err",
71     "libext2_blkid",
72     "libext2_quota",
73     "libext2_uuid",
74     "libext2_e2p",
75     "libext2fs",
76 ]
77
78 cc_binary {
79     name: "tune2fs",
80     host_supported: true,
81     defaults: ["tune2fs-defaults"],
82
83     shared_libs: tune2fs_libs,
84     system_shared_libs: ["libc"],
85 }
86
87 cc_binary {
88     name: "tune2fs_static",
89     static_executable: true,
90     defaults: ["tune2fs-defaults"],
91
92     static_libs: tune2fs_libs + ["libc"],
93 }
94
95 cc_library_static {
96     name: "libtune2fs",
97     defaults: ["tune2fs-defaults"],
98
99     cflags: ["-DBUILD_AS_LIB"],
100     static_libs: tune2fs_libs,
101 }
102
103 //########################################################################
104 // Build badblocks
105
106 cc_binary {
107     name: "badblocks",
108     host_supported: true,
109
110     srcs: ["badblocks.c"],
111     cflags: ["-W", "-Wall", "-Wno-macro-redefined"],
112     shared_libs: [
113         "libext2fs",
114         "libext2_com_err",
115         "libext2_uuid",
116         "libext2_blkid",
117         "libext2_e2p",
118     ],
119     system_shared_libs: ["libc"],
120 }
121
122 //########################################################################
123 // Build chattr
124
125 cc_binary {
126     name: "chattr",
127     host_supported: true,
128
129     srcs: ["chattr.c"],
130     cflags: ["-W", "-Wall", "-Wno-macro-redefined"],
131     shared_libs: [
132         "libext2_com_err",
133         "libext2_e2p",
134     ],
135     system_shared_libs: ["libc"],
136 }
137
138 //########################################################################
139 // Build lsattr
140
141 cc_defaults {
142     name: "lsattr-defaults",
143     srcs: ["lsattr.c"],
144     cflags: ["-W", "-Wall", "-Wno-macro-redefined"],
145 }
146
147 lsattr_libs = [
148     "libext2_com_err",
149     "libext2_e2p",
150 ]
151
152 cc_binary {
153     name: "lsattr",
154     host_supported: true,
155     defaults: ["lsattr-defaults"],
156
157     shared_libs: lsattr_libs,
158     system_shared_libs: ["libc"],
159 }
160
161 cc_binary {
162     name: "lsattr_static",
163     static_executable: true,
164     defaults: ["lsattr-defaults"],
165
166     static_libs: lsattr_libs + ["libc"],
167 }
168
169 //########################################################################
170 // Build blkid
171
172 cc_binary {
173     name: "blkid",
174
175     srcs: ["blkid.c"],
176     cflags: ["-W", "-Wall", "-Wno-macro-redefined"],
177     shared_libs: [
178         "libext2fs",
179         "libext2_blkid",
180         "libext2_com_err",
181         "libext2_e2p",
182     ],
183     system_shared_libs: ["libc"],
184 }
185
186 //########################################################################
187 // Build e4crypt
188
189 cc_binary {
190     name: "e4crypt",
191     host_supported: true,
192
193     srcs: ["e4crypt.c"],
194     cflags: ["-W", "-Wall", "-Wno-macro-redefined"],
195     shared_libs: [
196         "libext2fs",
197         "libext2_uuid",
198     ],
199     system_shared_libs: ["libc"],
200
201     target: {
202         darwin: {
203             enabled: false,
204         },
205     },
206 }
207
208 //##########################################################################
209 // Build e2image
210
211 cc_binary {
212     name: "e2image",
213     host_supported: true,
214
215     srcs: ["e2image.c"],
216     cflags: ["-W", "-Wall", "-Wno-macro-redefined"],
217     shared_libs: [
218         "libext2fs",
219         "libext2_blkid",
220         "libext2_com_err",
221         "libext2_quota",
222     ],
223     system_shared_libs: ["libc"],
224 }