blob: 0377beb1eb4115e77f930fefb32642318343387b [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",
53 "libkeystore_binder",
54 "libkeyutils",
55 "liblog",
56 "liblogwrap",
57 "libselinux",
58 "libsysutils",
59 "libutils",
60 ],
61}
62
63cc_library_static {
64 name: "libvold_binder",
65 defaults: ["vold_default_flags"],
66
67 srcs: [
68 "binder/android/os/IVold.aidl",
69 "binder/android/os/IVoldListener.aidl",
70 "binder/android/os/IVoldTaskListener.aidl",
71 ],
72 shared_libs: [
73 "libbinder",
74 "libutils",
75 ],
76 aidl: {
77 local_include_dirs: ["binder"],
78 include_dirs: ["frameworks/native/aidl/binder"],
79 export_aidl_headers: true,
80 },
81}
82
Risanaedae612017-11-27 18:01:35 +090083cc_library_headers {
84 name: "libvold_headers",
85 export_include_dirs: ["."],
86}
87
Jeff Sharkeyd16dc502017-10-23 14:38:55 -060088// Static library factored out to support testing
89cc_library_static {
90 name: "libvold",
91 defaults: [
92 "vold_default_flags",
93 "vold_default_libs",
94 ],
95
96 srcs: [
97 "Benchmark.cpp",
Jeff Sharkey2048a282017-06-15 09:59:43 -060098 "CheckEncryption.cpp",
Jeff Sharkeyd16dc502017-10-23 14:38:55 -060099 "Devmapper.cpp",
100 "EncryptInplace.cpp",
101 "Ext4Crypt.cpp",
Jeff Sharkey2048a282017-06-15 09:59:43 -0600102 "FileDeviceUtils.cpp",
Jeff Sharkeyd16dc502017-10-23 14:38:55 -0600103 "IdleMaint.cpp",
104 "KeyBuffer.cpp",
105 "KeyStorage.cpp",
106 "KeyUtil.cpp",
107 "Keymaster.cpp",
108 "Loop.cpp",
109 "MetadataCrypt.cpp",
110 "MoveStorage.cpp",
111 "NetlinkHandler.cpp",
112 "NetlinkManager.cpp",
113 "Process.cpp",
114 "ScryptParameters.cpp",
115 "Utils.cpp",
116 "VoldNativeService.cpp",
117 "VoldUtil.cpp",
118 "VolumeManager.cpp",
119 "cryptfs.cpp",
120 "fs/Ext4.cpp",
121 "fs/F2fs.cpp",
122 "fs/Vfat.cpp",
123 "model/Disk.cpp",
124 "model/EmulatedVolume.cpp",
125 "model/ObbVolume.cpp",
126 "model/PrivateVolume.cpp",
127 "model/PublicVolume.cpp",
128 "model/VolumeBase.cpp",
129 "secontext.cpp",
130 ],
Risanaedae612017-11-27 18:01:35 +0900131 product_variables: {
132 arc: {
133 exclude_srcs: [
134 "model/ObbVolume.cpp",
135 ],
136 static_libs: [
137 "libarcobbvolume",
138 ],
139 },
140 },
Jeff Sharkeyd16dc502017-10-23 14:38:55 -0600141}
142
143cc_binary {
144 name: "vold",
145 defaults: [
146 "vold_default_flags",
147 "vold_default_libs",
148 ],
149
150 srcs: ["main.cpp"],
151 static_libs: ["libvold"],
Risanaedae612017-11-27 18:01:35 +0900152 product_variables: {
153 arc: {
154 static_libs: [
155 "libarcobbvolume",
156 ]
157 },
158 },
Jeff Sharkeyd16dc502017-10-23 14:38:55 -0600159 init_rc: ["vold.rc"],
160
161 required: [
162 "mke2fs",
163 "vold_prepare_subdirs",
164 ],
165}
166
167cc_binary {
168 name: "vdc",
169 defaults: ["vold_default_flags"],
170
171 srcs: ["vdc.cpp"],
172 shared_libs: [
173 "libbase",
174 "libbinder",
175 "libcutils",
176 "libutils",
177 ],
178 static_libs: [
179 "libvold_binder",
180 ],
181 init_rc: ["vdc.rc"],
182}
183
184cc_binary {
185 name: "secdiscard",
186 defaults: ["vold_default_flags"],
187
188 srcs: [
189 "FileDeviceUtils.cpp",
190 "secdiscard.cpp",
191 ],
192 shared_libs: ["libbase"],
193}
194
195cc_binary {
Jeff Sharkeyd16dc502017-10-23 14:38:55 -0600196 name: "vold_prepare_subdirs",
197 defaults: ["vold_default_flags"],
198
Paul Crowley82b41ff2017-10-20 08:17:54 -0700199 srcs: ["vold_prepare_subdirs.cpp", "Utils.cpp"],
200 shared_libs: [
201 "libbase",
202 "libcutils",
203 "liblogwrap",
204 "libselinux",
205 "libutils",
206 ],
207 static_libs: [
208 "libvold_binder",
209 ],
Jeff Sharkeyd16dc502017-10-23 14:38:55 -0600210}
211
212subdirs = ["tests"]