blob: f7ec836c31c808c5fdbf9f055b0d183e2575b349 [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",
94 "Devmapper.cpp",
95 "EncryptInplace.cpp",
96 "Ext4Crypt.cpp",
97 "IdleMaint.cpp",
98 "KeyBuffer.cpp",
99 "KeyStorage.cpp",
100 "KeyUtil.cpp",
101 "Keymaster.cpp",
102 "Loop.cpp",
103 "MetadataCrypt.cpp",
104 "MoveStorage.cpp",
105 "NetlinkHandler.cpp",
106 "NetlinkManager.cpp",
107 "Process.cpp",
108 "ScryptParameters.cpp",
109 "Utils.cpp",
110 "VoldNativeService.cpp",
111 "VoldUtil.cpp",
112 "VolumeManager.cpp",
113 "cryptfs.cpp",
114 "fs/Ext4.cpp",
115 "fs/F2fs.cpp",
116 "fs/Vfat.cpp",
117 "model/Disk.cpp",
118 "model/EmulatedVolume.cpp",
119 "model/ObbVolume.cpp",
120 "model/PrivateVolume.cpp",
121 "model/PublicVolume.cpp",
122 "model/VolumeBase.cpp",
123 "secontext.cpp",
124 ],
125}
126
127cc_binary {
128 name: "vold",
129 defaults: [
130 "vold_default_flags",
131 "vold_default_libs",
132 ],
133
134 srcs: ["main.cpp"],
135 static_libs: ["libvold"],
136 init_rc: ["vold.rc"],
137
138 required: [
139 "mke2fs",
140 "vold_prepare_subdirs",
141 ],
142}
143
144cc_binary {
145 name: "vdc",
146 defaults: ["vold_default_flags"],
147
148 srcs: ["vdc.cpp"],
149 shared_libs: [
150 "libbase",
151 "libbinder",
152 "libcutils",
153 "libutils",
154 ],
155 static_libs: [
156 "libvold_binder",
157 ],
158 init_rc: ["vdc.rc"],
159}
160
161cc_binary {
162 name: "secdiscard",
163 defaults: ["vold_default_flags"],
164
165 srcs: [
166 "FileDeviceUtils.cpp",
167 "secdiscard.cpp",
168 ],
169 shared_libs: ["libbase"],
170}
171
172cc_binary {
173 name: "prepare_dir",
174 defaults: ["vold_default_flags"],
175
176 srcs: ["prepare_dir.cpp"],
177 shared_libs: [
178 "libbase",
179 "libcutils",
180 "libselinux",
181 ],
182}
183
184cc_prebuilt_binary {
185 name: "vold_prepare_subdirs",
186 defaults: ["vold_default_flags"],
187
188 srcs: ["vold_prepare_subdirs"],
189
190 required: ["prepare_dir"],
191}
192
193subdirs = ["tests"]