blob: cd259ba6f7c191570754bef4ec1ef2a0fa876e2f [file] [log] [blame]
# Copyright 2019 The Fuchsia Authors
#
# Use of this source code is governed by a MIT-style
# license that can be found in the LICENSE file or at
# https://opensource.org/licenses/MIT
import("//build/zircon/migrated_targets.gni")
zx_library("pc") {
kernel = true
sources = [
"acpi.cc",
"cmos_bootbyte.cc",
"console.cc",
"debug.cc",
"hpet.cc",
"interrupts.cc",
"keyboard.cc",
"memory.cc",
"pcie_quirks.cc",
"pic.cc",
"platform.cc",
"platform_pcie.cc",
"power.cc",
"smbios.cc",
"timer.cc",
]
deps = [
":tests",
"$zx/kernel/arch/x86:headers",
"$zx/kernel/dev/interrupt",
"$zx/kernel/dev/pcie",
"$zx/kernel/lib/acpi_lite",
"$zx/kernel/lib/arch",
"$zx/kernel/lib/cbuf",
"$zx/kernel/lib/cmdline",
"$zx/kernel/lib/console",
"$zx/kernel/lib/counters",
"$zx/kernel/lib/debuglog",
"$zx/kernel/lib/efi",
"$zx/kernel/lib/fbl",
"$zx/kernel/lib/fixed_point",
"$zx/kernel/lib/gfxconsole",
"$zx/kernel/lib/init",
"$zx/kernel/lib/ktl",
"$zx/kernel/lib/lockdep",
"$zx/kernel/lib/memory_limit",
"$zx/kernel/lib/pow2_range_allocator",
"$zx/kernel/lib/topology",
"$zx/kernel/lib/unittest",
"$zx/system/ulib/explicit-memory",
"$zx/system/ulib/smbios",
"$zx/system/ulib/zbitl",
"$zx/third_party/ulib/cksum",
]
public_deps = [
# <platform/pc/smbios.h> has #include <lib/smbios/smbios.h>.
"$zx/system/ulib/smbios:headers",
]
if (toolchain.environment == "kernel") {
public_deps += [
# <platform/pc/timer.h> has #include <lib/affine/ratio.h>.
"$zx/system/ulib/affine",
]
}
}
source_set("tests") {
# TODO: testonly = true
sources = [
"debug_test.cc",
"interrupts_test.cc",
]
deps = [
":headers",
"$zx/kernel/dev/interrupt",
"$zx/kernel/lib/console",
"$zx/kernel/lib/pow2_range_allocator",
"$zx/kernel/lib/unittest",
]
}