1/* 2 * Copyright (C) 2020 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17package { 18 default_applicable_licenses: ["Android-Apache-2.0"], 19} 20 21genrule { 22 name: "DumpstateServerProtoStub_h", 23 tools: [ 24 "aprotoc", 25 "protoc-gen-grpc-cpp-plugin", 26 ], 27 cmd: "$(location aprotoc) -Idevice/google/trout/hal/dumpstate/1.1/proto -Iexternal/protobuf/src --plugin=protoc-gen-grpc=$(location protoc-gen-grpc-cpp-plugin) $(location proto/DumpstateServer.proto) --grpc_out=$(genDir) --cpp_out=$(genDir)", 28 srcs: [ 29 "proto/DumpstateServer.proto", 30 ":libprotobuf-internal-protos", 31 ], 32 out: [ 33 "DumpstateServer.pb.h", 34 "DumpstateServer.grpc.pb.h", 35 ], 36} 37 38genrule { 39 name: "DumpstateServerProtoStub_cc", 40 tools: [ 41 "aprotoc", 42 "protoc-gen-grpc-cpp-plugin", 43 ], 44 cmd: "$(location aprotoc) -Idevice/google/trout/hal/dumpstate/1.1/proto -Iexternal/protobuf/src --plugin=protoc-gen-grpc=$(location protoc-gen-grpc-cpp-plugin) $(location proto/DumpstateServer.proto) --grpc_out=$(genDir) --cpp_out=$(genDir)", 45 srcs: [ 46 "proto/DumpstateServer.proto", 47 ":libprotobuf-internal-protos", 48 ], 49 out: [ 50 "DumpstateServer.pb.cc", 51 "DumpstateServer.grpc.pb.cc", 52 ], 53} 54 55cc_binary { 56 name: "android.hardware.dumpstate@1.1-service.trout", 57 srcs: [ 58 "DumpstateDevice.cpp", 59 "service.cpp", 60 "WatchdogClient.cpp", 61 ], 62 generated_headers: [ 63 "dumpstate_hal_configuration_V1_0", 64 "DumpstateServerProtoStub_h", 65 ], 66 generated_sources: [ 67 "dumpstate_hal_configuration_V1_0", 68 "DumpstateServerProtoStub_cc", 69 ], 70 static_libs: [ 71 "android.hardware.automotive.utils.vsockinfo", 72 "libxml2", 73 ], 74 shared_libs: [ 75 "android.hardware.automotive.utils.watchdog", 76 "android.hardware.dumpstate@1.0", 77 "android.hardware.dumpstate@1.1", 78 "android.automotive.watchdog-V2-ndk", 79 "libbase", 80 "libbinder_ndk", 81 "libcutils", 82 "libdumpstateutil", 83 "libgrpc++", 84 "libhidlbase", 85 "liblog", 86 "libprotobuf-cpp-full", 87 "libutils", 88 ], 89 cflags: [ 90 "-Wno-unused-parameter", 91 ], 92 relative_install_path: "hw", 93 init_rc: [ 94 "android.hardware.dumpstate@1.1-service.trout.rc", 95 ], 96 defaults: ["cuttlefish_guest_only"], 97 vintf_fragments: ["manifest_android.hardware.dumpstate@1.1-service.trout.xml"], 98} 99