blob: 0a453958821b0b6027910111c5cbf793c8c63cc9 [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 ],
138 },
139 },
Jeff Sharkeyd16dc502017-10-23 14:38:55 -0600140}
141
142cc_binary {
143 name: "vold",
144 defaults: [
145 "vold_default_flags",
146 "vold_default_libs",
147 ],
148
149 srcs: ["main.cpp"],
150 static_libs: ["libvold"],
Risanaedae612017-11-27 18:01:35 +0900151 product_variables: {
152 arc: {
153 static_libs: [
154 "libarcobbvolume",
155 ]
156 },
157 },
Jeff Sharkeyd16dc502017-10-23 14:38:55 -0600158 init_rc: ["vold.rc"],
159
160 required: [
161 "mke2fs",
162 "vold_prepare_subdirs",
163 ],
164}
165
166cc_binary {
167 name: "vdc",
168 defaults: ["vold_default_flags"],
169
170 srcs: ["vdc.cpp"],
171 shared_libs: [
172 "libbase",
173 "libbinder",
174 "libcutils",
175 "libutils",
176 ],
177 static_libs: [
178 "libvold_binder",
179 ],
180 init_rc: ["vdc.rc"],
181}
182
183cc_binary {
184 name: "secdiscard",
185 defaults: ["vold_default_flags"],
186
187 srcs: [
188 "FileDeviceUtils.cpp",
189 "secdiscard.cpp",
190 ],
191 shared_libs: ["libbase"],
192}
193
194cc_binary {
Jeff Sharkeyd16dc502017-10-23 14:38:55 -0600195 name: "vold_prepare_subdirs",
196 defaults: ["vold_default_flags"],
197
Paul Crowley82b41ff2017-10-20 08:17:54 -0700198 srcs: ["vold_prepare_subdirs.cpp", "Utils.cpp"],
199 shared_libs: [
200 "libbase",
201 "libcutils",
202 "liblogwrap",
203 "libselinux",
204 "libutils",
205 ],
206 static_libs: [
207 "libvold_binder",
208 ],
Jeff Sharkeyd16dc502017-10-23 14:38:55 -0600209}
210
Colin Crossa8388632017-11-25 08:47:19 -0800211filegroup {
212 name: "vold_aidl",
213 srcs: [
214 "binder/android/os/IVold.aidl",
215 "binder/android/os/IVoldListener.aidl",
216 "binder/android/os/IVoldTaskListener.aidl",
217 ],
218}
219
Jeff Sharkeyd16dc502017-10-23 14:38:55 -0600220subdirs = ["tests"]