blob: 7a860a14951a4586e3cd2df0a4425157c8e925e1 [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
18 cflags: [
19 "-Wall",
20 "-Werror",
21 ],
22
23 local_include_dirs: [
24 "include",
25 ],
26}
27
28cc_library_static {
29 name: "libupdate_verifier",
30
31 defaults: [
32 "update_verifier_defaults",
33 ],
34
35 srcs: [
Tianjie Xu4d9e62d2018-05-11 10:41:44 -070036 "care_map.proto",
Tao Baoafb9fc22018-04-19 14:49:32 -070037 "update_verifier.cpp",
38 ],
39
40 export_include_dirs: [
41 "include",
42 ],
43
44 static_libs: [
45 "libotautil",
46 ],
47
48 shared_libs: [
49 "android.hardware.boot@1.0",
50 "libbase",
51 "libcutils",
52 ],
Tianjie Xu4d9e62d2018-05-11 10:41:44 -070053
54 proto: {
55 type: "lite",
56 export_proto_headers: true,
Tianjie Xu7e520d22018-08-13 16:41:30 -070057 },
Tao Baoafb9fc22018-04-19 14:49:32 -070058}
59
60cc_binary {
61 name: "update_verifier",
62
63 defaults: [
64 "update_verifier_defaults",
65 ],
66
67 srcs: [
68 "update_verifier_main.cpp",
69 ],
70
71 static_libs: [
72 "libupdate_verifier",
73 "libotautil",
74 ],
75
76 shared_libs: [
77 "android.hardware.boot@1.0",
78 "libbase",
79 "libcutils",
80 "libhardware",
81 "libhidlbase",
82 "liblog",
Tianjie Xu4d9e62d2018-05-11 10:41:44 -070083 "libprotobuf-cpp-lite",
Tao Baoafb9fc22018-04-19 14:49:32 -070084 "libutils",
85 ],
86
87 init_rc: [
88 "update_verifier.rc",
89 ],
90}
Tianjie Xu7e520d22018-08-13 16:41:30 -070091
92python_binary_host {
93 name: "care_map_generator",
94
95 srcs: [
96 "care_map_generator.py",
97 "care_map.proto",
98 ],
99 libs: [
100 "python-symbol",
101 // Soong won't add "libprotobuf-python" to the dependencies if
102 // filegroup contains .proto files. So add it here explicitly.
103 "libprotobuf-python",
104 ],
105 proto: {
106 canonical_path_from_root: false,
107 },
108
109 version: {
110 py2: {
111 enabled: true,
112 embedded_launcher: true,
113 },
114 py3: {
115 enabled: false,
116 embedded_launcher: false,
117 },
118 },
119}