1// Copyright 2023 The Pigweed Authors 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); you may not 4// use this file except in compliance with the License. You may obtain a copy of 5// the License at 6// 7// https://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, WITHOUT 11// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 12// License for the specific language governing permissions and limitations under 13// the License. 14 15package { 16 default_applicable_licenses: ["external_pigweed_license"], 17} 18 19cc_library_static { 20 name: "pw_rpc_transport.rpc_transport", 21 cpp_std: "c++20", 22 export_include_dirs: ["public"], 23 static_libs: [ 24 "pw_bytes", 25 "pw_function", 26 "pw_status", 27 ], 28 export_static_lib_headers: [ 29 "pw_bytes", 30 "pw_function", 31 "pw_status", 32 ], 33 host_supported: true, 34 vendor_available: true, 35} 36 37cc_library_static { 38 name: "pw_rpc_transport.local_rpc_egress", 39 cpp_std: "c++20", 40 vendor_available: true, 41 host_supported: true, 42 defaults: [ 43 "pw_android_common_backends", 44 ], 45 header_libs: [ 46 "pw_log", 47 ], 48 export_header_lib_headers: [ 49 "pw_log", 50 ], 51 static_libs: [ 52 "pw_containers", 53 "pw_polyfill", 54 "pw_preprocessor", 55 "pw_result", 56 "pw_rpc_transport.rpc_transport", 57 ], 58 export_static_lib_headers: [ 59 "pw_containers", 60 "pw_result", 61 "pw_rpc_transport.rpc_transport", 62 ], 63 srcs: [ 64 "local_rpc_egress.cc", 65 ], 66} 67 68cc_library_static { 69 name: "pw_rpc_transport.simple_framing", 70 cpp_std: "c++20", 71 vendor_available: true, 72 host_supported: true, 73 defaults: [ 74 "pw_android_common_backends", 75 ], 76 header_libs: [ 77 "pw_assert", 78 "pw_log", 79 ], 80 export_header_lib_headers: [ 81 "pw_assert", 82 "pw_log", 83 ], 84 static_libs: [ 85 "pw_polyfill", 86 "pw_preprocessor", 87 "pw_result", 88 "pw_rpc_transport.rpc_transport", 89 "pw_span", 90 ], 91 export_static_lib_headers: [ 92 "pw_result", 93 "pw_rpc_transport.rpc_transport", 94 "pw_span", 95 ], 96 srcs: [ 97 "simple_framing.cc", 98 ], 99} 100 101filegroup { 102 name: "pw_rpc_transport.egress_ingress_src_files", 103 srcs: [ 104 "egress_ingress.cc", 105 ], 106} 107 108// This rule must be instantiated, e.g. 109// 110// cc_library_static { 111// name: "<instance_name>", 112// cflags: [ 113// "-DPW_RPC_USE_GLOBAL_MUTEX=0", 114// "-DPW_RPC_COMPLETION_REQUEST_CALLBACK", 115// "-DPW_RPC_DYNAMIC_ALLOCATION", 116// ], 117// defaults: [ 118// "pw_rpc_transport.egress_ingress_defaults", 119// ], 120// } 121cc_defaults { 122 name: "pw_rpc_transport.egress_ingress_defaults", 123 cpp_std: "c++20", 124 defaults: [ 125 "pw_android_common_backends", 126 "pw_rpc_defaults", 127 ], 128 header_libs: [ 129 "pw_assert", 130 "pw_chrono", 131 "pw_log", 132 "pw_sync", 133 ], 134 export_header_lib_headers: [ 135 "pw_assert", 136 "pw_log", 137 "pw_sync", 138 ], 139 static_libs: [ 140 "pw_hdlc", 141 "pw_metric", 142 "pw_rpc_transport.rpc_transport", 143 "pw_sync.binary_semaphore_thread_notification", 144 ], 145 export_static_lib_headers: [ 146 "pw_hdlc", 147 "pw_metric", 148 "pw_rpc_transport.rpc_transport", 149 ], 150 srcs: [ 151 ":pw_rpc_transport.egress_ingress_src_files", 152 ], 153} 154