1# 2# $FreeBSD$ 3# 4 5.include <src.opts.mk> 6CFLAGS+=-I${.CURDIR}/../../contrib/lib9p 7CFLAGS+=-I${SRCTOP}/sys 8.PATH: ${SRCTOP}/sys/libkern ${SRCTOP}/sys/cam/ctl 9 10PROG= bhyve 11PACKAGE= bhyve 12 13MAN= bhyve.8 bhyve_config.5 14 15BHYVE_SYSDIR?=${SRCTOP} 16 17SRCS= \ 18 acpi.c \ 19 acpi_device.c \ 20 atkbdc.c \ 21 audio.c \ 22 basl.c \ 23 bhyvegc.c \ 24 bhyverun.c \ 25 block_if.c \ 26 bootrom.c \ 27 config.c \ 28 console.c \ 29 crc16.c \ 30 ctl_scsi_all.c \ 31 ctl_util.c \ 32 e820.c \ 33 fwctl.c \ 34 gdb.c \ 35 hda_codec.c \ 36 inout.c \ 37 ioapic.c \ 38 iov.c \ 39 kernemu_dev.c \ 40 mem.c \ 41 mevent.c \ 42 mptbl.c \ 43 net_backends.c \ 44 net_utils.c \ 45 pci_ahci.c \ 46 pci_e82545.c \ 47 pci_emul.c \ 48 pci_fbuf.c \ 49 pci_gvt-d.c \ 50 pci_hda.c \ 51 pci_hostbridge.c \ 52 pci_irq.c \ 53 pci_lpc.c \ 54 pci_nvme.c \ 55 pci_passthru.c \ 56 pci_uart.c \ 57 pci_virtio_9p.c \ 58 pci_virtio_block.c \ 59 pci_virtio_console.c \ 60 pci_virtio_input.c \ 61 pci_virtio_net.c \ 62 pci_virtio_rnd.c \ 63 pci_virtio_scsi.c \ 64 pci_xhci.c \ 65 pctestdev.c \ 66 pm.c \ 67 post.c \ 68 ps2kbd.c \ 69 ps2mouse.c \ 70 qemu_fwcfg.c \ 71 qemu_loader.c \ 72 rfb.c \ 73 rtc.c \ 74 smbiostbl.c \ 75 sockstream.c \ 76 spinup_ap.c \ 77 task_switch.c \ 78 tpm_device.c \ 79 tpm_emul_passthru.c \ 80 tpm_intf_crb.c \ 81 uart_emul.c \ 82 usb_emul.c \ 83 usb_mouse.c \ 84 vga.c \ 85 virtio.c \ 86 vmgenc.c \ 87 xmsr.c 88 89.if ${MK_BHYVE_SNAPSHOT} != "no" 90SRCS+= snapshot.c 91.endif 92 93CFLAGS.kernemu_dev.c+= -I${SRCTOP}/sys/amd64 94 95.PATH: ${BHYVE_SYSDIR}/sys/amd64/vmm 96SRCS+= vmm_instruction_emul.c 97 98LIBADD= vmmapi md nv pthread z util sbuf cam 9p 99 100.if ${MK_BHYVE_SNAPSHOT} != "no" 101LIBADD+= ucl xo 102.endif 103 104.if ${MK_INET_SUPPORT} != "no" 105CFLAGS+=-DINET 106.endif 107.if ${MK_INET6_SUPPORT} != "no" 108CFLAGS+=-DINET6 109.endif 110.if ${MK_NETGRAPH_SUPPORT} != "no" 111CFLAGS+=-DNETGRAPH 112LIBADD+= netgraph 113.endif 114.if ${MK_OPENSSL} == "no" 115CFLAGS+=-DNO_OPENSSL 116.else 117LIBADD+= crypto 118CFLAGS+=-DOPENSSL_API_COMPAT=0x10100000L 119.endif 120 121CFLAGS+= -I${BHYVE_SYSDIR}/sys/dev/e1000 122CFLAGS+= -I${BHYVE_SYSDIR}/sys/dev/mii 123CFLAGS+= -I${BHYVE_SYSDIR}/sys/dev/usb/controller 124.if ${MK_BHYVE_SNAPSHOT} != "no" 125CFLAGS+= -I${SRCTOP}/contrib/libucl/include 126CFLAGS+= -DBHYVE_SNAPSHOT 127.endif 128 129.ifdef GDB_LOG 130CFLAGS+=-DGDB_LOG 131.endif 132 133# Disable thread safety analysis since it only finds very simple bugs and 134# yields many false positives. 135NO_WTHREAD_SAFETY= 136 137NO_WCAST_ALIGN= 138 139SUBDIR= kbdlayout 140 141.include <bsd.prog.mk> 142