blob: 44321533b8c7e4f9fa63566d793d1cdf19c33655 [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*",
20 "-cert-err58-cpp",
21 ],
22 tidy_flags: [
23 "-warnings-as-errors=clang-analyzer-security*,cert-*",
24 ],
25}
26
27cc_defaults {
28 name: "vold_default_libs",
29
30 static_libs: [
31 "libavb",
32 "libbootloader_message",
33 "libfec",
34 "libfec_rs",
35 "libfs_mgr",
36 "libscrypt_static",
37 "libsquashfs_utils",
38 "libvold_binder",
39 ],
40 shared_libs: [
41 "android.hardware.keymaster@3.0",
42 "libbase",
43 "libbinder",
44 "libcrypto",
45 "libcrypto_utils",
46 "libcutils",
47 "libdiskconfig",
48 "libext4_utils",
49 "libf2fs_sparseblock",
50 "libhardware",
51 "libhardware_legacy",
52 "libhidlbase",
53 "libhwbinder",
54 "libkeystore_binder",
55 "libkeyutils",
56 "liblog",
57 "liblogwrap",
58 "libselinux",
59 "libsysutils",
60 "libutils",
61 ],
62}
63
64cc_library_static {
65 name: "libvold_binder",
66 defaults: ["vold_default_flags"],
67
68 srcs: [
69 "binder/android/os/IVold.aidl",
70 "binder/android/os/IVoldListener.aidl",
71 "binder/android/os/IVoldTaskListener.aidl",
72 ],
73 shared_libs: [
74 "libbinder",
75 "libutils",
76 ],
77 aidl: {
78 local_include_dirs: ["binder"],
79 include_dirs: ["frameworks/native/aidl/binder"],
80 export_aidl_headers: true,
81 },
82}
83
84// Static library factored out to support testing
85cc_library_static {
86 name: "libvold",
87 defaults: [
88 "vold_default_flags",
89 "vold_default_libs",
90 ],
91
92 srcs: [
93 "Benchmark.cpp",
Jeff Sharkey2048a282017-06-15 09:59:43 -060094 "CheckEncryption.cpp",
Jeff Sharkeyd16dc502017-10-23 14:38:55 -060095 "Devmapper.cpp",
96 "EncryptInplace.cpp",
97 "Ext4Crypt.cpp",
Jeff Sharkey2048a282017-06-15 09:59:43 -060098 "FileDeviceUtils.cpp",
Jeff Sharkeyd16dc502017-10-23 14:38:55 -060099 "IdleMaint.cpp",
100 "KeyBuffer.cpp",
101 "KeyStorage.cpp",
102 "KeyUtil.cpp",
103 "Keymaster.cpp",
104 "Loop.cpp",
105 "MetadataCrypt.cpp",
106 "MoveStorage.cpp",
107 "NetlinkHandler.cpp",
108 "NetlinkManager.cpp",
109 "Process.cpp",
110 "ScryptParameters.cpp",
111 "Utils.cpp",
112 "VoldNativeService.cpp",
113 "VoldUtil.cpp",
114 "VolumeManager.cpp",
115 "cryptfs.cpp",
116 "fs/Ext4.cpp",
117 "fs/F2fs.cpp",
118 "fs/Vfat.cpp",
119 "model/Disk.cpp",
120 "model/EmulatedVolume.cpp",
121 "model/ObbVolume.cpp",
122 "model/PrivateVolume.cpp",
123 "model/PublicVolume.cpp",
124 "model/VolumeBase.cpp",
125 "secontext.cpp",
126 ],
127}
128
129cc_binary {
130 name: "vold",
131 defaults: [
132 "vold_default_flags",
133 "vold_default_libs",
134 ],
135
136 srcs: ["main.cpp"],
137 static_libs: ["libvold"],
138 init_rc: ["vold.rc"],
139
140 required: [
141 "mke2fs",
142 "vold_prepare_subdirs",
143 ],
144}
145
146cc_binary {
147 name: "vdc",
148 defaults: ["vold_default_flags"],
149
150 srcs: ["vdc.cpp"],
151 shared_libs: [
152 "libbase",
153 "libbinder",
154 "libcutils",
155 "libutils",
156 ],
157 static_libs: [
158 "libvold_binder",
159 ],
160 init_rc: ["vdc.rc"],
161}
162
163cc_binary {
164 name: "secdiscard",
165 defaults: ["vold_default_flags"],
166
167 srcs: [
168 "FileDeviceUtils.cpp",
169 "secdiscard.cpp",
170 ],
171 shared_libs: ["libbase"],
172}
173
174cc_binary {
Jeff Sharkeyd16dc502017-10-23 14:38:55 -0600175 name: "vold_prepare_subdirs",
176 defaults: ["vold_default_flags"],
177
Paul Crowley82b41ff2017-10-20 08:17:54 -0700178 srcs: ["vold_prepare_subdirs.cpp", "Utils.cpp"],
179 shared_libs: [
180 "libbase",
181 "libcutils",
182 "liblogwrap",
183 "libselinux",
184 "libutils",
185 ],
186 static_libs: [
187 "libvold_binder",
188 ],
Jeff Sharkeyd16dc502017-10-23 14:38:55 -0600189}
190
191subdirs = ["tests"]