blob: 1b84619af3c4bb5aba9238826ff1c987b46c79f6 [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",
45 ],
46
47 shared_libs: [
48 "android.hardware.boot@1.0",
49 "libbase",
50 "libcutils",
51 ],
Tianjie Xu4d9e62d2018-05-11 10:41:44 -070052
53 proto: {
54 type: "lite",
55 export_proto_headers: true,
Tianjie Xu7e520d22018-08-13 16:41:30 -070056 },
Tao Baoafb9fc22018-04-19 14:49:32 -070057}
58
59cc_binary {
60 name: "update_verifier",
61
62 defaults: [
63 "update_verifier_defaults",
64 ],
65
66 srcs: [
67 "update_verifier_main.cpp",
68 ],
69
70 static_libs: [
71 "libupdate_verifier",
72 "libotautil",
73 ],
74
75 shared_libs: [
76 "android.hardware.boot@1.0",
77 "libbase",
78 "libcutils",
79 "libhardware",
80 "libhidlbase",
81 "liblog",
Tianjie Xu4d9e62d2018-05-11 10:41:44 -070082 "libprotobuf-cpp-lite",
Tao Baoafb9fc22018-04-19 14:49:32 -070083 "libutils",
84 ],
85
86 init_rc: [
87 "update_verifier.rc",
88 ],
89}
Tianjie Xu7e520d22018-08-13 16:41:30 -070090
91python_binary_host {
92 name: "care_map_generator",
93
94 srcs: [
95 "care_map_generator.py",
96 "care_map.proto",
97 ],
98 libs: [
99 "python-symbol",
100 // Soong won't add "libprotobuf-python" to the dependencies if
101 // filegroup contains .proto files. So add it here explicitly.
102 "libprotobuf-python",
103 ],
104 proto: {
105 canonical_path_from_root: false,
106 },
107
108 version: {
109 py2: {
110 enabled: true,
111 embedded_launcher: true,
112 },
113 py3: {
114 enabled: false,
115 embedded_launcher: false,
116 },
117 },
118}