// Copyright 2023 The Android Open Source Project // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package { default_applicable_licenses: ["Android-Apache-2.0"], } cc_library { name: "libcasimir_control_server", shared_libs: [ "libprotobuf-cpp-full", "libgrpc++_unsecure", ], static_libs: [ "libgflags", ], cflags: [ "-Wno-unused-parameter", ], generated_headers: [ "CasimirControlServerProto_h", ], generated_sources: [ "CasimirControlServerProto_cc", ], export_generated_headers: [ "CasimirControlServerProto_h", ], defaults: ["cuttlefish_host"], include_dirs: [ "external/grpc-grpc/include", "external/protobuf/src", ], target: { darwin: { enabled: true, }, }, } cc_binary_host { name: "casimir_control_server", shared_libs: [ "libbase", "libcuttlefish_fs", "libcuttlefish_utils", "libprotobuf-cpp-full", "libgrpc++_unsecure", ], static_libs: [ "libcuttlefish_host_config", "libgflags", "libcasimir_control_server", "libgrpc++_reflection", ], header_libs: ["casimir_rf_packets_cxx"], srcs: [ "casimir_controller.cpp", "main.cpp", ], cflags: [ "-Wno-unused-parameter", ], defaults: ["cuttlefish_host"], target: { darwin: { enabled: true, }, }, } filegroup { name: "CasimirControlServerProto", srcs: [ "casimir_control.proto", ":libprotobuf-internal-protos", ], } genrule { name: "CasimirControlServerProto_h", tools: [ "aprotoc", "protoc-gen-grpc-cpp-plugin", ], cmd: "$(location aprotoc) -Idevice/google/cuttlefish/host/commands/casimir_control_server -Iexternal/protobuf/src --plugin=protoc-gen-grpc=$(location protoc-gen-grpc-cpp-plugin) $(in) --grpc_out=$(genDir) --cpp_out=$(genDir)", srcs: [ ":CasimirControlServerProto", ], out: [ "casimir_control.grpc.pb.h", "casimir_control.pb.h", ], } genrule { name: "CasimirControlServerProto_cc", tools: [ "aprotoc", "protoc-gen-grpc-cpp-plugin", ], cmd: "$(location aprotoc) -Idevice/google/cuttlefish/host/commands/casimir_control_server -Iexternal/protobuf/src --plugin=protoc-gen-grpc=$(location protoc-gen-grpc-cpp-plugin) $(in) --grpc_out=$(genDir) --cpp_out=$(genDir)", srcs: [ ":CasimirControlServerProto", ], out: [ "casimir_control.grpc.pb.cc", "casimir_control.pb.cc", ], }