blob: 50333202d17629729e6f99b2919c2610095479bb [file] [log] [blame]
# Copyright 2019 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/toolchain/toolchain_environment.gni")
import("//build/zircon/zx_library.gni")
zx_library("hwreg") {
sdk = "source"
sdk_headers = [
"hwreg/asm.h",
"hwreg/bitfields.h",
"hwreg/indirect.h",
"hwreg/internal.h",
"hwreg/mmio.h",
"hwreg/pio.h",
]
sources = [ "printers.cc" ]
if (is_kernel) {
# TODO(mcgrathr): remove old multiboot environment
if (toolchain_environment != "multiboot") {
public_deps = [
"//zircon/kernel/lib/ktl:headers",
"//zircon/kernel/lib/libc:headers",
]
}
} else {
sources += [ "asm.cc" ]
deps = [ "//sdk/lib/fit" ]
}
}
zx_library("hwreg-mock") {
testonly = true
sdk = "source"
sdk_headers = [
"hwreg/asm.h",
"hwreg/bitfields.h",
"hwreg/indirect.h",
"hwreg/internal.h",
"hwreg/mmio.h",
"hwreg/mock.h",
"hwreg/pio.h",
]
sources = []
deps = [ "//zircon/system/ulib/mock-function" ]
public_deps = [
# <hwreg/mock.h> has #include <lib/mock-function/mock-function.h>.
"//zircon/system/ulib/mock-function:headers",
]
}
group("tests") {
testonly = true
deps = [ "test:tests" ]
}