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_device.c \ 19 atkbdc.c \ 20 acpi.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_util.c \ 31 ctl_scsi_all.c \ 32 e820.c \ 33 fwctl.c \ 34 gdb.c \ 35 hda_codec.c \ 36 inout.c \ 37 ioapic.c \ 38 kernemu_dev.c \ 39 mem.c \ 40 mevent.c \ 41 mptbl.c \ 42 net_backends.c \ 43 net_utils.c \ 44 pci_ahci.c \ 45 pci_e82545.c \ 46 pci_emul.c \ 47 pci_hda.c \ 48 pci_fbuf.c \ 49 pci_hostbridge.c \ 50 pci_irq.c \ 51 pci_lpc.c \ 52 pci_nvme.c \ 53 pci_passthru.c \ 54 pci_virtio_9p.c \ 55 pci_virtio_block.c \ 56 pci_virtio_console.c \ 57 pci_virtio_input.c \ 58 pci_virtio_net.c \ 59 pci_virtio_rnd.c \ 60 pci_virtio_scsi.c \ 61 pci_uart.c \ 62 pci_xhci.c \ 63 pctestdev.c \ 64 pm.c \ 65 post.c \ 66 ps2kbd.c \ 67 ps2mouse.c \ 68 qemu_fwcfg.c \ 69 qemu_loader.c \ 70 rfb.c \ 71 rtc.c \ 72 smbiostbl.c \ 73 sockstream.c \ 74 task_switch.c \ 75 uart_emul.c \ 76 usb_emul.c \ 77 usb_mouse.c \ 78 virtio.c \ 79 vga.c \ 80 vmgenc.c \ 81 xmsr.c \ 82 spinup_ap.c \ 83 iov.c 84 85.if ${MK_BHYVE_SNAPSHOT} != "no" 86SRCS+= snapshot.c 87.endif 88 89CFLAGS.kernemu_dev.c+= -I${SRCTOP}/sys/amd64 90 91.PATH: ${BHYVE_SYSDIR}/sys/amd64/vmm 92SRCS+= vmm_instruction_emul.c 93 94LIBADD= vmmapi md nv pthread z util sbuf cam 9p 95 96.if ${MK_BHYVE_SNAPSHOT} != "no" 97LIBADD+= ucl xo 98.endif 99 100.if ${MK_INET_SUPPORT} != "no" 101CFLAGS+=-DINET 102.endif 103.if ${MK_INET6_SUPPORT} != "no" 104CFLAGS+=-DINET6 105.endif 106.if ${MK_NETGRAPH_SUPPORT} != "no" 107CFLAGS+=-DNETGRAPH 108LIBADD+= netgraph 109.endif 110.if ${MK_OPENSSL} == "no" 111CFLAGS+=-DNO_OPENSSL 112.else 113LIBADD+= crypto 114.endif 115 116CFLAGS+= -I${BHYVE_SYSDIR}/sys/dev/e1000 117CFLAGS+= -I${BHYVE_SYSDIR}/sys/dev/mii 118CFLAGS+= -I${BHYVE_SYSDIR}/sys/dev/usb/controller 119.if ${MK_BHYVE_SNAPSHOT} != "no" 120CFLAGS+= -I${SRCTOP}/contrib/libucl/include 121CFLAGS+= -DBHYVE_SNAPSHOT 122.endif 123 124.ifdef GDB_LOG 125CFLAGS+=-DGDB_LOG 126.endif 127 128# Disable thread safety analysis since it only finds very simple bugs and 129# yields many false positives. 130NO_WTHREAD_SAFETY= 131 132NO_WCAST_ALIGN= 133 134SUBDIR= kbdlayout 135 136.include <bsd.prog.mk> 137