| # Copyright 2018 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. |
| |
| config("hypervisor_config") { |
| include_dirs = [ "include" ] |
| } |
| |
| source_set("hypervisor") { |
| # Don't forget to update rules.mk as well for the Zircon build. |
| sources = [ |
| "guest.cpp", |
| "phys_mem.cpp", |
| "vcpu.cpp", |
| "include/hypervisor/address.h", |
| "include/hypervisor/bits.h", |
| "include/hypervisor/guest.h", |
| "include/hypervisor/io.h", |
| "include/hypervisor/phys_mem.h", |
| "include/hypervisor/vcpu.h", |
| ] |
| |
| if (current_cpu == "x64") { |
| sources += [ |
| "arch/x86/acpi.cpp", |
| "arch/x86/acpi_priv.h", |
| "arch/x86/decode.cpp", |
| "arch/x86/local_apic.cpp", |
| "include/hypervisor/x86/acpi.h", |
| "include/hypervisor/x86/decode.h", |
| "include/hypervisor/x86/local_apic.h", |
| ] |
| |
| cflags = [ "-I../../zircon/third_party/lib/acpica/source/include" ] |
| } |
| |
| libs = [ |
| "fdio", |
| "zircon", |
| ] |
| |
| public_configs = [ ":hypervisor_config" ] |
| |
| defines = [ "_ALL_SOURCE=1" ] |
| |
| deps = [ |
| "//zircon/system/ulib/async", |
| "//zircon/system/ulib/async:loop", |
| "//zircon/system/ulib/block-client", |
| "//zircon/system/ulib/fbl", |
| "//zircon/system/ulib/zx", |
| "//zircon/system/ulib/zxcpp", |
| ] |
| } |