blob: cc015bf300581831037ea2a21aa2be1314db4442 [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: [
67 "binder/android/os/IVold.aidl",
68 "binder/android/os/IVoldListener.aidl",
69 "binder/android/os/IVoldTaskListener.aidl",
70 ],
71 shared_libs: [
72 "libbinder",
73 "libutils",
74 ],
75 aidl: {
76 local_include_dirs: ["binder"],
77 include_dirs: ["frameworks/native/aidl/binder"],
78 export_aidl_headers: true,
79 },
80}
81
82// Static library factored out to support testing
83cc_library_static {
84 name: "libvold",
85 defaults: [
86 "vold_default_flags",
87 "vold_default_libs",
88 ],
89
90 srcs: [
91 "Benchmark.cpp",
Jeff Sharkey2048a282017-06-15 09:59:43 -060092 "CheckEncryption.cpp",
Jeff Sharkeyd16dc502017-10-23 14:38:55 -060093 "Devmapper.cpp",
94 "EncryptInplace.cpp",
95 "Ext4Crypt.cpp",
Jeff Sharkey2048a282017-06-15 09:59:43 -060096 "FileDeviceUtils.cpp",
Jeff Sharkeyd16dc502017-10-23 14:38:55 -060097 "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",
Shawn Willdenf4527742017-11-09 15:59:39 -0700113 "authorization_set.cpp",
Jeff Sharkeyd16dc502017-10-23 14:38:55 -0600114 "cryptfs.cpp",
115 "fs/Ext4.cpp",
116 "fs/F2fs.cpp",
117 "fs/Vfat.cpp",
118 "model/Disk.cpp",
119 "model/EmulatedVolume.cpp",
120 "model/ObbVolume.cpp",
121 "model/PrivateVolume.cpp",
122 "model/PublicVolume.cpp",
123 "model/VolumeBase.cpp",
124 "secontext.cpp",
125 ],
126}
127
128cc_binary {
129 name: "vold",
130 defaults: [
131 "vold_default_flags",
132 "vold_default_libs",
133 ],
134
135 srcs: ["main.cpp"],
136 static_libs: ["libvold"],
137 init_rc: ["vold.rc"],
138
139 required: [
140 "mke2fs",
141 "vold_prepare_subdirs",
142 ],
143}
144
145cc_binary {
146 name: "vdc",
147 defaults: ["vold_default_flags"],
148
149 srcs: ["vdc.cpp"],
150 shared_libs: [
151 "libbase",
152 "libbinder",
153 "libcutils",
154 "libutils",
155 ],
156 static_libs: [
157 "libvold_binder",
158 ],
159 init_rc: ["vdc.rc"],
160}
161
162cc_binary {
163 name: "secdiscard",
164 defaults: ["vold_default_flags"],
165
166 srcs: [
167 "FileDeviceUtils.cpp",
168 "secdiscard.cpp",
169 ],
170 shared_libs: ["libbase"],
171}
172
173cc_binary {
Jeff Sharkeyd16dc502017-10-23 14:38:55 -0600174 name: "vold_prepare_subdirs",
175 defaults: ["vold_default_flags"],
176
Paul Crowley82b41ff2017-10-20 08:17:54 -0700177 srcs: ["vold_prepare_subdirs.cpp", "Utils.cpp"],
178 shared_libs: [
179 "libbase",
180 "libcutils",
181 "liblogwrap",
182 "libselinux",
183 "libutils",
184 ],
185 static_libs: [
186 "libvold_binder",
187 ],
Jeff Sharkeyd16dc502017-10-23 14:38:55 -0600188}
189
190subdirs = ["tests"]