blob: f6567137ed6f4538a921396e33e844f2c2ea8539 [file] [log] [blame]
Tao Baoafb9fc22018-04-19 14:49:32 -07001// Copyright (C) 2018 The Android Open Source Project
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15cc_defaults {
16 name: "update_verifier_defaults",
17
Tianjie Xu446b64b2018-09-19 15:45:28 -070018 defaults: [
19 "recovery_defaults",
Tao Baoafb9fc22018-04-19 14:49:32 -070020 ],
21
22 local_include_dirs: [
23 "include",
24 ],
25}
26
27cc_library_static {
28 name: "libupdate_verifier",
29
30 defaults: [
31 "update_verifier_defaults",
32 ],
33
34 srcs: [
Tianjie Xu4d9e62d2018-05-11 10:41:44 -070035 "care_map.proto",
Tao Baoafb9fc22018-04-19 14:49:32 -070036 "update_verifier.cpp",
37 ],
38
39 export_include_dirs: [
40 "include",
41 ],
42
43 static_libs: [
44 "libotautil",
Daniel Rosenberg15f22bd2019-01-22 19:57:28 -080045 "libvold_binder",
Tao Baoafb9fc22018-04-19 14:49:32 -070046 ],
47
48 shared_libs: [
49 "android.hardware.boot@1.0",
50 "libbase",
51 "libcutils",
Daniel Rosenberg15f22bd2019-01-22 19:57:28 -080052 "libbinder",
53 "libutils",
Tao Baoafb9fc22018-04-19 14:49:32 -070054 ],
Tianjie Xu4d9e62d2018-05-11 10:41:44 -070055
56 proto: {
57 type: "lite",
58 export_proto_headers: true,
Tianjie Xu7e520d22018-08-13 16:41:30 -070059 },
Tao Baoafb9fc22018-04-19 14:49:32 -070060}
61
62cc_binary {
63 name: "update_verifier",
64
65 defaults: [
66 "update_verifier_defaults",
67 ],
68
69 srcs: [
70 "update_verifier_main.cpp",
71 ],
72
73 static_libs: [
74 "libupdate_verifier",
75 "libotautil",
Daniel Rosenberg15f22bd2019-01-22 19:57:28 -080076 "libvold_binder",
Tao Baoafb9fc22018-04-19 14:49:32 -070077 ],
78
79 shared_libs: [
80 "android.hardware.boot@1.0",
81 "libbase",
82 "libcutils",
83 "libhardware",
84 "libhidlbase",
85 "liblog",
Tianjie Xu4d9e62d2018-05-11 10:41:44 -070086 "libprotobuf-cpp-lite",
Daniel Rosenberg15f22bd2019-01-22 19:57:28 -080087 "libbinder",
Tao Baoafb9fc22018-04-19 14:49:32 -070088 "libutils",
89 ],
90
91 init_rc: [
92 "update_verifier.rc",
93 ],
94}
Tianjie Xu7e520d22018-08-13 16:41:30 -070095
96python_binary_host {
97 name: "care_map_generator",
98
99 srcs: [
100 "care_map_generator.py",
101 "care_map.proto",
102 ],
103 libs: [
104 "python-symbol",
105 // Soong won't add "libprotobuf-python" to the dependencies if
106 // filegroup contains .proto files. So add it here explicitly.
107 "libprotobuf-python",
108 ],
109 proto: {
110 canonical_path_from_root: false,
111 },
112
113 version: {
114 py2: {
115 enabled: true,
116 embedded_launcher: true,
117 },
118 py3: {
119 enabled: false,
120 embedded_launcher: false,
121 },
122 },
123}