1// 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 15package { 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 24cc_defaults { 25 name: "update_verifier_defaults", 26 27 defaults: [ 28 "recovery_defaults", 29 ], 30 31 local_include_dirs: [ 32 "include", 33 ], 34} 35 36python_library_host { 37 name: "care_map_proto_py", 38 srcs: [ 39 "care_map.proto", 40 ], 41 proto: { 42 type: "lite", 43 canonical_path_from_root: false, 44 }, 45 visibility: [ 46 "//build/make/tools/releasetools:__subpackages__", 47 ], 48} 49 50cc_library_static { 51 name: "libupdate_verifier", 52 53 defaults: [ 54 "update_verifier_defaults", 55 ], 56 57 srcs: [ 58 "care_map.proto", 59 "update_verifier.cpp", 60 ], 61 62 export_include_dirs: [ 63 "include", 64 ], 65 66 static_libs: [ 67 "libotautil", 68 "libvold_binder", 69 ], 70 71 whole_static_libs: [ 72 "libsnapuserd_client", 73 ], 74 75 shared_libs: [ 76 "android.hardware.boot@1.0", 77 "libboot_control_client", 78 "libbase", 79 "libcutils", 80 "libbinder", 81 "libutils", 82 ], 83 84 proto: { 85 type: "lite", 86 export_proto_headers: true, 87 }, 88} 89 90cc_binary { 91 name: "update_verifier", 92 93 defaults: [ 94 "update_verifier_defaults", 95 ], 96 97 srcs: [ 98 "update_verifier_main.cpp", 99 ], 100 101 static_libs: [ 102 "libupdate_verifier", 103 "libotautil", 104 "libvold_binder", 105 ], 106 107 shared_libs: [ 108 "android.hardware.boot@1.0", 109 "libbase", 110 "libcutils", 111 "libhardware", 112 "libhidlbase", 113 "liblog", 114 "libprotobuf-cpp-lite", 115 "libbinder", 116 "libutils", 117 "libboot_control_client", 118 ], 119 120 init_rc: [ 121 "update_verifier.rc", 122 ], 123} 124 125python_binary_host { 126 name: "care_map_generator", 127 128 srcs: [ 129 "care_map_generator.py", 130 "care_map.proto", 131 ], 132 libs: [ 133 "python-symbol", 134 // Soong won't add "libprotobuf-python" to the dependencies if 135 // filegroup contains .proto files. So add it here explicitly. 136 "libprotobuf-python", 137 ], 138 proto: { 139 canonical_path_from_root: false, 140 }, 141 142} 143