xref: /aosp_15_r20/external/pigweed/pw_rpc/raw/Android.bp (revision 61c4878ac05f98d0ceed94b57d316916de578985)
1// Copyright 2022 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
19filegroup {
20    name: "pw_rpc_raw_src_files",
21    srcs: [
22        "method.cc",
23    ],
24}
25
26cc_library_headers {
27    name: "pw_rpc_raw_include_dirs",
28    cpp_std: "c++20",
29    export_include_dirs: [
30        "public",
31    ],
32    vendor_available: true,
33    host_supported: true,
34}
35
36// This rule must be instantiated, i.e.
37//
38//   cc_library_static {
39//       name: "pw_rpc_raw_<instance_name>",
40//       defaults: [
41//           "pw_rpc_cflags_<instance_name>",
42//           "pw_rpc_raw_defaults",
43//       ],
44//       static_libs: [
45//           "pw_rpc_<instance_name>",
46//       ],
47//   }
48//
49// where pw_rpc_cflags_<instance_name> defines your flags, i.e.
50//
51//   cc_defaults {
52//       name: "pw_rpc_cflags_<instance_name>",
53//       cflags: [
54//           "-DPW_RPC_USE_GLOBAL_MUTEX=0",
55//           "-DPW_RPC_COMPLETION_REQUEST_CALLBACK",
56//           "-DPW_RPC_DYNAMIC_ALLOCATION",
57//       ],
58//   }
59//
60// see pw_rpc_defaults, pw_rpc_defaults
61cc_defaults {
62    name: "pw_rpc_raw_defaults",
63    cpp_std: "c++20",
64    header_libs: [
65        "pw_rpc_raw_include_dirs",
66    ],
67    export_header_lib_headers: [
68        "pw_rpc_raw_include_dirs",
69    ],
70    srcs: [
71        ":pw_rpc_raw_src_files",
72    ],
73}
74