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 15cc_defaults { 16 name: "update_verifier_defaults", 17 18 defaults: [ 19 "recovery_defaults", 20 ], 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: [ 35 "care_map.proto", 36 "update_verifier.cpp", 37 ], 38 39 export_include_dirs: [ 40 "include", 41 ], 42 43 static_libs: [ 44 "libotautil", 45 "libvold_binder", 46 ], 47 48 shared_libs: [ 49 "android.hardware.boot@1.0", 50 "libbase", 51 "libcutils", 52 "libbinder", 53 "libutils", 54 ], 55 56 proto: { 57 type: "lite", 58 export_proto_headers: true, 59 }, 60} 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", 76 "libvold_binder", 77 ], 78 79 shared_libs: [ 80 "android.hardware.boot@1.0", 81 "libbase", 82 "libcutils", 83 "libhardware", 84 "libhidlbase", 85 "liblog", 86 "libprotobuf-cpp-lite", 87 "libbinder", 88 "libutils", 89 ], 90 91 init_rc: [ 92 "update_verifier.rc", 93 ], 94} 95 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} 124