Change script for apply upstream code
[platform/upstream/connectedhomeip.git] / third_party / pigweed / repo / pw_hdlc_lite / BUILD
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
15 load(
16     "//pw_build:pigweed.bzl",
17     "pw_cc_library",
18 )
19
20 package(default_visibility = ["//visibility:public"])
21
22 licenses(["notice"])  # Apache License 2.0
23
24 pw_cc_library(
25     name = "pw_hdlc_lite",
26     srcs = [
27         "decoder.cc",
28         "encoder.cc",
29         "pw_hdlc_lite_private/protocol.h",
30         "rpc_packets.cc",
31     ],
32     hdrs = [
33         "public/pw_hdlc_lite/decoder.h",
34         "public/pw_hdlc_lite/encoder.h",
35         "public/pw_hdlc_lite/sys_io_stream.h",
36     ],
37     includes = ["public"],
38     deps = [
39         "//pw_bytes",
40         "//pw_checksum",
41         "//pw_log",
42         "//pw_result",
43         "//pw_span",
44         "//pw_status",
45         "//pw_stream",
46     ],
47 )
48
49 pw_cc_library(
50     name = "pw_rpc",
51     srcs = ["rpc_packets.cc"],
52     hdrs = [
53         "public/pw_hdlc_lite/rpc_channel.h",
54         "public/pw_hdlc_lite/rpc_packets.h",
55     ],
56     includes = ["public"],
57     deps = [
58         ":pw_hdlc_lite",
59         "//pw_rpc:server",
60     ],
61 )
62
63 cc_test(
64     name = "encoder_test",
65     srcs = ["encoder_test.cc"],
66     deps = [
67         ":pw_hdlc_lite",
68         "//pw_stream",
69         "//pw_unit_test",
70     ],
71 )
72
73 cc_test(
74     name = "decoder_test",
75     srcs = ["decoder_test.cc"],
76     deps = [
77         ":pw_hdlc_lite",
78         "//pw_result",
79         "//pw_stream",
80         "//pw_unit_test",
81     ],
82 )
83
84 cc_test(
85     name = "rpc_channel_test",
86     srcs = ["rpc_channel_test.cc"],
87     deps = [
88         ":pw_hdlc_lite",
89         "//pw_stream",
90         "//pw_unit_test",
91     ],
92 )