blob: db761e42ae6bc2ffa9f76d5116b91b28bbe7de83 [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: [
Colin Crossa8388632017-11-25 08:47:19 -080068 ":vold_aidl",
Jeff Sharkeyd16dc502017-10-23 14:38:55 -060069 ],
70 shared_libs: [
71 "libbinder",
72 "libutils",
73 ],
74 aidl: {
75 local_include_dirs: ["binder"],
76 include_dirs: ["frameworks/native/aidl/binder"],
77 export_aidl_headers: true,
78 },
79}
80
81// Static library factored out to support testing
82cc_library_static {
83 name: "libvold",
84 defaults: [
85 "vold_default_flags",
86 "vold_default_libs",
87 ],
88
89 srcs: [
90 "Benchmark.cpp",
Jeff Sharkey2048a282017-06-15 09:59:43 -060091 "CheckEncryption.cpp",
Jeff Sharkeyd16dc502017-10-23 14:38:55 -060092 "Devmapper.cpp",
93 "EncryptInplace.cpp",
94 "Ext4Crypt.cpp",
Jeff Sharkey2048a282017-06-15 09:59:43 -060095 "FileDeviceUtils.cpp",
Jeff Sharkeyd16dc502017-10-23 14:38:55 -060096 "IdleMaint.cpp",
97 "KeyBuffer.cpp",
98 "KeyStorage.cpp",
99 "KeyUtil.cpp",
100 "Keymaster.cpp",
101 "Loop.cpp",
102 "MetadataCrypt.cpp",
103 "MoveStorage.cpp",
104 "NetlinkHandler.cpp",
105 "NetlinkManager.cpp",
106 "Process.cpp",
107 "ScryptParameters.cpp",
108 "Utils.cpp",
109 "VoldNativeService.cpp",
110 "VoldUtil.cpp",
111 "VolumeManager.cpp",
112 "cryptfs.cpp",
113 "fs/Ext4.cpp",
114 "fs/F2fs.cpp",
115 "fs/Vfat.cpp",
116 "model/Disk.cpp",
117 "model/EmulatedVolume.cpp",
118 "model/ObbVolume.cpp",
119 "model/PrivateVolume.cpp",
120 "model/PublicVolume.cpp",
121 "model/VolumeBase.cpp",
122 "secontext.cpp",
123 ],
124}
125
126cc_binary {
127 name: "vold",
128 defaults: [
129 "vold_default_flags",
130 "vold_default_libs",
131 ],
132
133 srcs: ["main.cpp"],
134 static_libs: ["libvold"],
135 init_rc: ["vold.rc"],
136
137 required: [
138 "mke2fs",
139 "vold_prepare_subdirs",
140 ],
141}
142
143cc_binary {
144 name: "vdc",
145 defaults: ["vold_default_flags"],
146
147 srcs: ["vdc.cpp"],
148 shared_libs: [
149 "libbase",
150 "libbinder",
151 "libcutils",
152 "libutils",
153 ],
154 static_libs: [
155 "libvold_binder",
156 ],
157 init_rc: ["vdc.rc"],
158}
159
160cc_binary {
161 name: "secdiscard",
162 defaults: ["vold_default_flags"],
163
164 srcs: [
165 "FileDeviceUtils.cpp",
166 "secdiscard.cpp",
167 ],
168 shared_libs: ["libbase"],
169}
170
171cc_binary {
Jeff Sharkeyd16dc502017-10-23 14:38:55 -0600172 name: "vold_prepare_subdirs",
173 defaults: ["vold_default_flags"],
174
Paul Crowley82b41ff2017-10-20 08:17:54 -0700175 srcs: ["vold_prepare_subdirs.cpp", "Utils.cpp"],
176 shared_libs: [
177 "libbase",
178 "libcutils",
179 "liblogwrap",
180 "libselinux",
181 "libutils",
182 ],
183 static_libs: [
184 "libvold_binder",
185 ],
Jeff Sharkeyd16dc502017-10-23 14:38:55 -0600186}
187
Colin Crossa8388632017-11-25 08:47:19 -0800188filegroup {
189 name: "vold_aidl",
190 srcs: [
191 "binder/android/os/IVold.aidl",
192 "binder/android/os/IVoldListener.aidl",
193 "binder/android/os/IVoldTaskListener.aidl",
194 ],
195}
196
Jeff Sharkeyd16dc502017-10-23 14:38:55 -0600197subdirs = ["tests"]