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("//pw_unit_test:pw_cc_test.bzl", "pw_cc_test") 16 17package(default_visibility = ["//visibility:public"]) 18 19licenses(["notice"]) 20 21cc_library( 22 name = "pw_random", 23 hdrs = [ 24 "public/pw_random/random.h", 25 "public/pw_random/xor_shift.h", 26 ], 27 strip_include_prefix = "public", 28 deps = [ 29 "//pw_assert", 30 "//pw_bytes", 31 "//pw_span", 32 "//pw_status", 33 ], 34) 35 36cc_library( 37 name = "fuzzer_generator", 38 hdrs = ["public/pw_random/fuzzer.h"], 39 strip_include_prefix = "public", 40 deps = [ 41 ":pw_random", 42 "//pw_bytes", 43 "//pw_fuzzer:libfuzzer", 44 ], 45) 46 47pw_cc_test( 48 name = "xor_shift_test", 49 srcs = ["xor_shift_test.cc"], 50 deps = [ 51 ":pw_random", 52 "//pw_assert", 53 "//pw_bytes", 54 "//pw_unit_test", 55 ], 56) 57 58filegroup( 59 name = "doxygen", 60 srcs = [ 61 "public/pw_random/random.h", 62 "public/pw_random/xor_shift.h", 63 ], 64) 65