blob: 376028560bab78fd800375166b29353f8acfbba3 [file] [log] [blame]
Jeff Sharkeyd16dc502017-10-23 14:38:55 -06001cc_defaults {
2 name: "vold_default_flags",
3
4 cflags: [
5 "-Wall",
6 "-Werror",
7 "-Wextra",
8 "-Wno-missing-field-initializers",
9 "-Wno-unused-parameter",
10 "-Wno-unused-variable",
11 ],
12
13 clang: true,
14
15 tidy: true,
16 tidy_checks: [
17 "-*",
18 "cert-*",
19 "clang-analyzer-security*",
Jeff Sharkeyd16dc502017-10-23 14:38:55 -060020 ],
21 tidy_flags: [
22 "-warnings-as-errors=clang-analyzer-security*,cert-*",
23 ],
24}
25
26cc_defaults {
27 name: "vold_default_libs",
28
29 static_libs: [
30 "libavb",
31 "libbootloader_message",
32 "libfec",
33 "libfec_rs",
34 "libfs_mgr",
35 "libscrypt_static",
36 "libsquashfs_utils",
37 "libvold_binder",
38 ],
39 shared_libs: [
40 "android.hardware.keymaster@3.0",
41 "libbase",
42 "libbinder",
43 "libcrypto",
44 "libcrypto_utils",
45 "libcutils",
46 "libdiskconfig",
47 "libext4_utils",
48 "libf2fs_sparseblock",
49 "libhardware",
50 "libhardware_legacy",
51 "libhidlbase",
52 "libhwbinder",
Jeff Sharkeyd16dc502017-10-23 14:38:55 -060053 "libkeyutils",
54 "liblog",
55 "liblogwrap",
56 "libselinux",
57 "libsysutils",
58 "libutils",
59 ],
60}
61
62cc_library_static {
63 name: "libvold_binder",
64 defaults: ["vold_default_flags"],
65
66 srcs: [
Colin Crossa8388632017-11-25 08:47:19 -080067 ":vold_aidl",
Jeff Sharkeyd16dc502017-10-23 14:38:55 -060068 ],
69 shared_libs: [
70 "libbinder",
71 "libutils",
72 ],
73 aidl: {
74 local_include_dirs: ["binder"],
75 include_dirs: ["frameworks/native/aidl/binder"],
76 export_aidl_headers: true,
77 },
78}
79
Risanaedae612017-11-27 18:01:35 +090080cc_library_headers {
81 name: "libvold_headers",
82 export_include_dirs: ["."],
83}
84
Jeff Sharkeyd16dc502017-10-23 14:38:55 -060085// Static library factored out to support testing
86cc_library_static {
87 name: "libvold",
88 defaults: [
89 "vold_default_flags",
90 "vold_default_libs",
91 ],
92
93 srcs: [
94 "Benchmark.cpp",
Jeff Sharkey2048a282017-06-15 09:59:43 -060095 "CheckEncryption.cpp",
Jeff Sharkeyd16dc502017-10-23 14:38:55 -060096 "Devmapper.cpp",
97 "EncryptInplace.cpp",
98 "Ext4Crypt.cpp",
Jeff Sharkey2048a282017-06-15 09:59:43 -060099 "FileDeviceUtils.cpp",
Jeff Sharkeyd16dc502017-10-23 14:38:55 -0600100 "IdleMaint.cpp",
101 "KeyBuffer.cpp",
102 "KeyStorage.cpp",
103 "KeyUtil.cpp",
104 "Keymaster.cpp",
105 "Loop.cpp",
106 "MetadataCrypt.cpp",
107 "MoveStorage.cpp",
108 "NetlinkHandler.cpp",
109 "NetlinkManager.cpp",
110 "Process.cpp",
111 "ScryptParameters.cpp",
112 "Utils.cpp",
113 "VoldNativeService.cpp",
114 "VoldUtil.cpp",
115 "VolumeManager.cpp",
Shawn Willdenf4527742017-11-09 15:59:39 -0700116 "authorization_set.cpp",
Jeff Sharkeyd16dc502017-10-23 14:38:55 -0600117 "cryptfs.cpp",
Jeff Sharkey37ba1252018-01-19 10:55:18 +0900118 "fs/Exfat.cpp",
Jeff Sharkeyd16dc502017-10-23 14:38:55 -0600119 "fs/Ext4.cpp",
120 "fs/F2fs.cpp",
121 "fs/Vfat.cpp",
122 "model/Disk.cpp",
123 "model/EmulatedVolume.cpp",
124 "model/ObbVolume.cpp",
125 "model/PrivateVolume.cpp",
126 "model/PublicVolume.cpp",
127 "model/VolumeBase.cpp",
128 "secontext.cpp",
129 ],
Risanaedae612017-11-27 18:01:35 +0900130 product_variables: {
131 arc: {
132 exclude_srcs: [
133 "model/ObbVolume.cpp",
134 ],
135 static_libs: [
136 "libarcobbvolume",
137 ],
Risan9929e7d2018-01-22 11:04:25 +0900138 shared_libs: [
139 "libarcmounter",
140 ],
Risanaedae612017-11-27 18:01:35 +0900141 },
142 },
Jeff Sharkeyd16dc502017-10-23 14:38:55 -0600143}
144
145cc_binary {
146 name: "vold",
147 defaults: [
148 "vold_default_flags",
149 "vold_default_libs",
150 ],
151
152 srcs: ["main.cpp"],
153 static_libs: ["libvold"],
Risanaedae612017-11-27 18:01:35 +0900154 product_variables: {
155 arc: {
156 static_libs: [
157 "libarcobbvolume",
Risan9929e7d2018-01-22 11:04:25 +0900158 ],
159 shared_libs: [
160 "libarcmounter",
161 ],
162
Risanaedae612017-11-27 18:01:35 +0900163 },
164 },
Jeff Sharkeyd16dc502017-10-23 14:38:55 -0600165 init_rc: ["vold.rc"],
166
167 required: [
168 "mke2fs",
169 "vold_prepare_subdirs",
170 ],
171}
172
173cc_binary {
174 name: "vdc",
175 defaults: ["vold_default_flags"],
176
177 srcs: ["vdc.cpp"],
178 shared_libs: [
179 "libbase",
180 "libbinder",
181 "libcutils",
182 "libutils",
183 ],
184 static_libs: [
185 "libvold_binder",
186 ],
187 init_rc: ["vdc.rc"],
188}
189
190cc_binary {
191 name: "secdiscard",
192 defaults: ["vold_default_flags"],
193
194 srcs: [
195 "FileDeviceUtils.cpp",
196 "secdiscard.cpp",
197 ],
198 shared_libs: ["libbase"],
199}
200
201cc_binary {
Jeff Sharkeyd16dc502017-10-23 14:38:55 -0600202 name: "vold_prepare_subdirs",
203 defaults: ["vold_default_flags"],
204
Paul Crowley82b41ff2017-10-20 08:17:54 -0700205 srcs: ["vold_prepare_subdirs.cpp", "Utils.cpp"],
206 shared_libs: [
207 "libbase",
208 "libcutils",
209 "liblogwrap",
210 "libselinux",
211 "libutils",
212 ],
213 static_libs: [
214 "libvold_binder",
215 ],
Jeff Sharkeyd16dc502017-10-23 14:38:55 -0600216}
217
Colin Crossa8388632017-11-25 08:47:19 -0800218filegroup {
219 name: "vold_aidl",
220 srcs: [
221 "binder/android/os/IVold.aidl",
222 "binder/android/os/IVoldListener.aidl",
223 "binder/android/os/IVoldTaskListener.aidl",
224 ],
225}
226
Jeff Sharkeyd16dc502017-10-23 14:38:55 -0600227subdirs = ["tests"]