blob: d20c88469459b32a627039078574cb7f830cde97 [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") {
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/sync.h",
"lib/uart/uart.h",
]
sources = [ "parse.cc" ]
public_deps = [
# Most headers have #include <lib/zbi-format/driver-config.h>.
# Most headers have #include <lib/zbi-format/zbi.h>.
"//sdk/lib/zbi-format",
# <lib/uart/uart.h> has #include <lib/arch/intrin.h>.
"//zircon/kernel/lib/arch:headers",
# <lib/uart/ns8250.h> has #include <lib/acpi_lite.h>
"//zircon/kernel/lib/acpi_lite:headers",
# Various headers have #include <lib/devicetree/devicetree.h>
"//zircon/kernel/lib/devicetree: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
sdk = "source"
sdk_headers = [ "lib/uart/mock.h" ]
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" ]
}