blob: fff06a2ce773d453455a3a5e2482c79daf434da9 [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/zircon/migrated_targets.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",
]
sdk_migrated = true
kernel = true
static = true
host = true
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",
]
sdk_migrated = true
kernel = true
static = true
host = true
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" ]
}