blob: ff2eff903c0cb44c6115411e6dd45ba7eb87423d [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
Bob Badour29be3f62021-02-12 18:00:57 -080015package {
16 // See: http://go/android-license-faq
17 // A large-scale-change added 'default_applicable_licenses' to import
18 // all of the 'license_kinds' from "bootable_recovery_license"
19 // to get the below license kinds:
20 // SPDX-license-identifier-Apache-2.0
21 default_applicable_licenses: ["bootable_recovery_license"],
22}
23
Tao Baoafb9fc22018-04-19 14:49:32 -070024cc_defaults {
25 name: "update_verifier_defaults",
26
Tianjie Xu446b64b2018-09-19 15:45:28 -070027 defaults: [
28 "recovery_defaults",
Tao Baoafb9fc22018-04-19 14:49:32 -070029 ],
30
31 local_include_dirs: [
32 "include",
33 ],
34}
35
36cc_library_static {
37 name: "libupdate_verifier",
38
39 defaults: [
40 "update_verifier_defaults",
41 ],
42
43 srcs: [
Tianjie Xu4d9e62d2018-05-11 10:41:44 -070044 "care_map.proto",
Tao Baoafb9fc22018-04-19 14:49:32 -070045 "update_verifier.cpp",
46 ],
47
48 export_include_dirs: [
49 "include",
50 ],
51
52 static_libs: [
53 "libotautil",
Daniel Rosenberg15f22bd2019-01-22 19:57:28 -080054 "libvold_binder",
Tao Baoafb9fc22018-04-19 14:49:32 -070055 ],
56
57 shared_libs: [
58 "android.hardware.boot@1.0",
59 "libbase",
60 "libcutils",
Daniel Rosenberg15f22bd2019-01-22 19:57:28 -080061 "libbinder",
62 "libutils",
Tao Baoafb9fc22018-04-19 14:49:32 -070063 ],
Tianjie Xu4d9e62d2018-05-11 10:41:44 -070064
65 proto: {
66 type: "lite",
67 export_proto_headers: true,
Tianjie Xu7e520d22018-08-13 16:41:30 -070068 },
Tao Baoafb9fc22018-04-19 14:49:32 -070069}
70
71cc_binary {
72 name: "update_verifier",
73
74 defaults: [
75 "update_verifier_defaults",
76 ],
77
78 srcs: [
79 "update_verifier_main.cpp",
80 ],
81
82 static_libs: [
83 "libupdate_verifier",
84 "libotautil",
Daniel Rosenberg15f22bd2019-01-22 19:57:28 -080085 "libvold_binder",
Tao Baoafb9fc22018-04-19 14:49:32 -070086 ],
87
88 shared_libs: [
89 "android.hardware.boot@1.0",
90 "libbase",
91 "libcutils",
92 "libhardware",
93 "libhidlbase",
94 "liblog",
Tianjie Xu4d9e62d2018-05-11 10:41:44 -070095 "libprotobuf-cpp-lite",
Daniel Rosenberg15f22bd2019-01-22 19:57:28 -080096 "libbinder",
Tao Baoafb9fc22018-04-19 14:49:32 -070097 "libutils",
98 ],
99
100 init_rc: [
101 "update_verifier.rc",
102 ],
103}
Tianjie Xu7e520d22018-08-13 16:41:30 -0700104
105python_binary_host {
106 name: "care_map_generator",
107
108 srcs: [
109 "care_map_generator.py",
110 "care_map.proto",
111 ],
112 libs: [
113 "python-symbol",
114 // Soong won't add "libprotobuf-python" to the dependencies if
115 // filegroup contains .proto files. So add it here explicitly.
116 "libprotobuf-python",
117 ],
118 proto: {
119 canonical_path_from_root: false,
120 },
121
122 version: {
123 py2: {
Tianjie Xu7e520d22018-08-13 16:41:30 -0700124 enabled: false,
125 embedded_launcher: false,
126 },
Krzysztof KosiƄski9c857f82021-02-24 16:02:25 -0800127 py3: {
128 enabled: true,
129 embedded_launcher: true,
130 },
Tianjie Xu7e520d22018-08-13 16:41:30 -0700131 },
132}