• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
15load("@rules_cc//cc:cc_library.bzl", "cc_library")
16load(
17    "@rules_fuchsia//fuchsia:defs.bzl",
18    "fuchsia_cc_test",
19    "fuchsia_unittest_package",
20)
21load("@rules_python//sphinxdocs:sphinx_docs_library.bzl", "sphinx_docs_library")
22load("//pw_bluetooth_sapphire/fuchsia:fuchsia_api_level.bzl", "FUCHSIA_API_LEVEL")
23load("//pw_build:compatibility.bzl", "incompatible_with_mcu")
24
25package(default_visibility = ["//visibility:public"])
26
27licenses(["notice"])
28
29cc_library(
30    name = "zircon_random_generator",
31    hdrs = [
32        "public/pw_random_fuchsia/zircon_random_generator.h",
33    ],
34    strip_include_prefix = "public",
35    target_compatible_with = ["@platforms//os:fuchsia"],
36    deps = [
37        "//pw_random",
38        "//pw_span",
39    ],
40)
41
42fuchsia_cc_test(
43    name = "zircon_random_generator_test",
44    srcs = ["zircon_random_generator_test.cc"],
45    deps = [
46        ":zircon_random_generator",
47        "//pw_unit_test",
48        "//pw_unit_test:printf_main",
49    ],
50)
51
52fuchsia_unittest_package(
53    name = "test_pkg",
54    package_name = "zircon_random_generator_tests",
55    fuchsia_api_level = FUCHSIA_API_LEVEL,
56    tags = ["manual"],
57    unit_tests = [":zircon_random_generator_test"],
58)
59
60sphinx_docs_library(
61    name = "docs",
62    srcs = [
63        "docs.rst",
64    ],
65    prefix = "pw_random_fuchsia/",
66    target_compatible_with = incompatible_with_mcu(),
67)
68