xref: /aosp_15_r20/external/pigweed/pw_rpc/system_server/BUILD.bazel (revision 61c4878ac05f98d0ceed94b57d316916de578985)
1# Copyright 2020 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(default_visibility = ["//visibility:public"])
16
17licenses(["notice"])
18
19cc_library(
20    name = "facade",
21    hdrs = ["public/pw_rpc_system_server/rpc_server.h"],
22    strip_include_prefix = "public",
23    deps = [
24        "//pw_rpc",
25        "//pw_span",
26        "//pw_status",
27    ],
28)
29
30cc_library(
31    name = "system_server",
32    hdrs = [
33        "public/pw_rpc_system_server/rpc_server.h",
34        "public/pw_rpc_system_server/socket.h",
35    ],
36    strip_include_prefix = "public",
37    deps = [
38        ":backend",
39        ":facade",
40        "//pw_rpc",
41        "//pw_span",
42        "//pw_status",
43        "//pw_stream",
44    ],
45)
46
47label_flag(
48    name = "backend",
49    build_setting_default = ":system_server_backend_multiplexer",
50)
51
52cc_library(
53    name = "system_server_backend_multiplexer",
54    visibility = ["//targets:__pkg__"],
55    deps = select({
56        "//pw_build/constraints/board:mimxrt595_evk": ["//pw_hdlc:hdlc_sys_io_system_server"],
57        "//pw_build/constraints/board:stm32f429i-disc1": ["//pw_hdlc:hdlc_sys_io_system_server"],
58        "//conditions:default": ["//targets/host:system_rpc_server"],
59    }),
60)
61