• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
15load("@rules_cc//cc:cc_library.bzl", "cc_library")
16
17package(
18    default_visibility = ["//visibility:public"],
19    features = ["-layering_check"],
20)
21
22licenses(["notice"])
23
24cc_library(
25    name = "facade",
26    hdrs = ["public/pw_rpc_system_server/rpc_server.h"],
27    strip_include_prefix = "public",
28    deps = [
29        "//pw_rpc",
30        "//pw_span",
31        "//pw_status",
32    ],
33)
34
35cc_library(
36    name = "system_server",
37    hdrs = [
38        "public/pw_rpc_system_server/rpc_server.h",
39        "public/pw_rpc_system_server/socket.h",
40    ],
41    strip_include_prefix = "public",
42    deps = [
43        ":backend",
44        ":facade",
45        "//pw_rpc",
46        "//pw_span",
47        "//pw_status",
48        "//pw_stream",
49    ],
50)
51
52label_flag(
53    name = "backend",
54    build_setting_default = ":system_server_backend_multiplexer",
55)
56
57cc_library(
58    name = "system_server_backend_multiplexer",
59    visibility = ["//targets:__pkg__"],
60    deps = select({
61        "//pw_build/constraints/board:mimxrt595_evk": ["//pw_hdlc:hdlc_sys_io_system_server"],
62        "//pw_build/constraints/board:stm32f429i-disc1": ["//pw_hdlc:hdlc_sys_io_system_server"],
63        "//conditions:default": ["//targets/host:system_rpc_server"],
64    }),
65)
66