xref: /aosp_15_r20/external/pigweed/pw_boot/BUILD.bazel (revision 61c4878ac05f98d0ceed94b57d316916de578985)
1# Copyright 2021 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_python//sphinxdocs:sphinx_docs_library.bzl", "sphinx_docs_library")
16load("//pw_build:compatibility.bzl", "incompatible_with_mcu")
17load("//pw_build:pw_facade.bzl", "pw_facade")
18
19package(default_visibility = ["//visibility:public"])
20
21licenses(["notice"])
22
23# TODO: pwbug.dev/328679085 - Remove this alias.
24alias(
25    name = "facade",
26    actual = ":pw_boot.facade",
27)
28
29pw_facade(
30    name = "pw_boot",
31    hdrs = [
32        "public/pw_boot/boot.h",
33    ],
34    backend = ":backend",
35    strip_include_prefix = "public",
36    deps = [
37        "//pw_preprocessor",
38    ],
39)
40
41label_flag(
42    name = "backend",
43    build_setting_default = "//pw_build:unspecified_backend",
44)
45
46sphinx_docs_library(
47    name = "docs",
48    srcs = [
49        "backends.rst",
50        "docs.rst",
51    ],
52    prefix = "pw_boot/",
53    target_compatible_with = incompatible_with_mcu(),
54)
55