xref: /aosp_15_r20/external/pigweed/pw_sys_io/Android.bp (revision 61c4878ac05f98d0ceed94b57d316916de578985)
1// Copyright 2024 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
19// To use the pw_sys_io facade, add pw_sys_io_no_backends to the defaults list
20// of the library or binary that uses it and provide its backend as a
21// dependency.
22cc_defaults {
23    name: "pw_sys_io_no_backends",
24    cpp_std: "c++20",
25    header_libs: [
26        "pw_sys_io_include_dirs",
27    ],
28    export_header_lib_headers: [
29        "pw_sys_io_include_dirs",
30    ],
31    static_libs: [
32        "pw_bytes",
33        "pw_status",
34    ],
35    export_static_lib_headers: [
36        "pw_bytes",
37        "pw_status",
38    ],
39    srcs: [
40        ":pw_sys_io_scr_files",
41    ],
42}
43
44// Do not include these since they are for the pw_sys_io cc_defaults. Depend
45// on pw_sys_io_no_backends instead.
46cc_library_headers {
47    name: "pw_sys_io_include_dirs",
48    cpp_std: "c++20",
49    export_include_dirs: [
50        "public",
51    ],
52    vendor_available: true,
53    host_supported: true,
54}
55
56// Do not include these since they are for the pw_sys_io cc_defaults. Depend
57// on pw_sys_io_no_backends instead.
58filegroup {
59    name: "pw_sys_io_scr_files",
60    srcs: [
61        "sys_io.cc",
62    ],
63}
64