blob: 1cea02d598dfab8c1ef63b2af7f6ba9eb76b2bf6 [file] [log] [blame]
# Copyright 2020 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("uart") {
kernel = true
host = true
static = true
sdk = "source"
sdk_headers = [
"lib/uart/all.h",
"lib/uart/chars-from.h",
"lib/uart/ns8250.h",
"lib/uart/null.h",
"lib/uart/pl011.h",
"lib/uart/qemu.h",
"lib/uart/uart.h",
]
sdk_migrated = true
sources = [ "parse.cc" ]
public_deps = [
# <lib/uart/uart.h> has #include <lib/arch/intrin.h>.
"//zircon/kernel/lib/arch:headers",
# <lib/uart/uart.h> has #include <lib/zircon-internal/thread_annotations.h>.
"//zircon/system/ulib/zircon-internal:headers",
# <lib/uart/uart.h> has #include <hwreg/mmio.h>.
"//zircon/system/ulib/hwreg:headers",
]
if (is_kernel) {
public_deps += [ "//zircon/kernel/lib/ktl:headers" ]
}
}
zx_library("uart-mock") {
testonly = true
kernel = true
static = true
host = true
sdk = "source"
sdk_headers = [ "lib/uart/mock.h" ]
sdk_migrated = true
sources = []
public_deps = [
":headers",
# <lib/uart/mock.h> has #include <lib/mock-function/mock-function.h>.
"//zircon/system/ulib/mock-function:headers",
# <lib/uart/mock.h> has #include <hwreg/mock.h>
"//zircon/system/ulib/hwreg:hwreg-mock.headers",
]
if (is_kernel) {
public_deps += [ "//zircon/kernel/lib/ktl:headers" ]
}
}
group("tests") {
testonly = true
deps = [ "test:tests" ]
}