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