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 17genrule { 18 name: "DumpstateServerProtoStub_h", 19 tools: [ 20 "aprotoc", 21 "protoc-gen-grpc-cpp-plugin", 22 ], 23 cmd: "$(location aprotoc) -I$$(dirname $(in)) -Iexternal/protobuf/src --plugin=protoc-gen-grpc=$(location protoc-gen-grpc-cpp-plugin) $(in) --grpc_out=$(genDir) --cpp_out=$(genDir)", 24 srcs: [ 25 "proto/DumpstateServer.proto", 26 ], 27 out: [ 28 "DumpstateServer.pb.h", 29 "DumpstateServer.grpc.pb.h", 30 ], 31} 32 33genrule { 34 name: "DumpstateServerProtoStub_cc", 35 tools: [ 36 "aprotoc", 37 "protoc-gen-grpc-cpp-plugin", 38 ], 39 cmd: "$(location aprotoc) -I$$(dirname $(in)) -Iexternal/protobuf/src --plugin=protoc-gen-grpc=$(location protoc-gen-grpc-cpp-plugin) $(in) --grpc_out=$(genDir) --cpp_out=$(genDir)", 40 srcs: [ 41 "proto/DumpstateServer.proto", 42 ], 43 out: [ 44 "DumpstateServer.pb.cc", 45 "DumpstateServer.grpc.pb.cc", 46 ], 47} 48 49cc_binary { 50 name: "android.hardware.dumpstate@1.1-service.trout", 51 srcs: [ 52 "DumpstateDevice.cpp", 53 "service.cpp", 54 "WatchdogClient.cpp", 55 ], 56 generated_headers: [ 57 "DumpstateServerProtoStub_h", 58 ], 59 generated_sources: [ 60 "DumpstateServerProtoStub_cc", 61 ], 62 static_libs: [ 63 "android.hardware.automotive@libc++fs", 64 "android.hardware.automotive.utils.vsockinfo", 65 ], 66 shared_libs: [ 67 "android.hardware.automotive.utils.watchdog", 68 "android.hardware.dumpstate@1.0", 69 "android.hardware.dumpstate@1.1", 70 "carwatchdog_aidl_interface-ndk_platform", 71 "libbase", 72 "libbinder_ndk", 73 "libcutils", 74 "libdumpstateutil", 75 "libgrpc++", 76 "libhidlbase", 77 "liblog", 78 "libprotobuf-cpp-full", 79 "libutils", 80 ], 81 cflags: [ 82 "-Wno-unused-parameter", 83 ], 84 relative_install_path: "hw", 85 init_rc: [ 86 "android.hardware.dumpstate@1.1-service.trout.rc", 87 ], 88 defaults: ["cuttlefish_guest_only"], 89 vintf_fragments: ["manifest_android.hardware.dumpstate@1.1-service.trout.xml"], 90} 91