blob: c59a0a5849325956cf1573cd16e2c9add083a67c [file] [log] [blame] [edit]
# 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("$zx_build/public/gn/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>.
"$zx/kernel/lib/arch:headers",
# <lib/uart/uart.h> has #include <lib/zircon-internal/thread_annotations.h>.
"$zx/system/ulib/zircon-internal:headers",
# <lib/uart/uart.h> has #include <hwreg/mmio.h>.
"$zx/system/ulib/hwreg:headers",
]
if (is_kernel) {
public_deps += [ "$zx/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>.
"$zx/system/ulib/mock-function:headers",
# <lib/uart/mock.h> has #include <hwreg/mock.h>
"$zx/system/ulib/hwreg:hwreg-mock.headers",
]
if (is_kernel) {
public_deps += [ "$zx/kernel/lib/ktl:headers" ]
}
}
group("tests") {
testonly = true
deps = [ "test:tests" ]
}