1# 2# $FreeBSD$ 3# 4 5.include <src.opts.mk> 6CFLAGS+=-I${.CURDIR}/../../contrib/lib9p 7CFLAGS+=-I${SRCTOP}/sys 8.PATH: ${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 ctl_util.c \ 30 ctl_scsi_all.c \ 31 fwctl.c \ 32 gdb.c \ 33 hda_codec.c \ 34 inout.c \ 35 ioapic.c \ 36 kernemu_dev.c \ 37 mem.c \ 38 mevent.c \ 39 mptbl.c \ 40 net_backends.c \ 41 net_utils.c \ 42 pci_ahci.c \ 43 pci_e82545.c \ 44 pci_emul.c \ 45 pci_hda.c \ 46 pci_fbuf.c \ 47 pci_hostbridge.c \ 48 pci_irq.c \ 49 pci_lpc.c \ 50 pci_nvme.c \ 51 pci_passthru.c \ 52 pci_virtio_9p.c \ 53 pci_virtio_block.c \ 54 pci_virtio_console.c \ 55 pci_virtio_input.c \ 56 pci_virtio_net.c \ 57 pci_virtio_rnd.c \ 58 pci_virtio_scsi.c \ 59 pci_uart.c \ 60 pci_xhci.c \ 61 pctestdev.c \ 62 pm.c \ 63 post.c \ 64 ps2kbd.c \ 65 ps2mouse.c \ 66 rfb.c \ 67 rtc.c \ 68 smbiostbl.c \ 69 sockstream.c \ 70 task_switch.c \ 71 uart_emul.c \ 72 usb_emul.c \ 73 usb_mouse.c \ 74 virtio.c \ 75 vga.c \ 76 vmgenc.c \ 77 xmsr.c \ 78 spinup_ap.c \ 79 iov.c 80 81.if ${MK_BHYVE_SNAPSHOT} != "no" 82SRCS+= snapshot.c 83.endif 84 85CFLAGS.kernemu_dev.c+= -I${SRCTOP}/sys/amd64 86 87.PATH: ${BHYVE_SYSDIR}/sys/amd64/vmm 88SRCS+= vmm_instruction_emul.c 89 90LIBADD= vmmapi md nv pthread z util sbuf cam 9p 91 92.if ${MK_BHYVE_SNAPSHOT} != "no" 93LIBADD+= ucl xo 94.endif 95 96.if ${MK_INET_SUPPORT} != "no" 97CFLAGS+=-DINET 98.endif 99.if ${MK_INET6_SUPPORT} != "no" 100CFLAGS+=-DINET6 101.endif 102.if ${MK_NETGRAPH_SUPPORT} != "no" 103CFLAGS+=-DNETGRAPH 104LIBADD+= netgraph 105.endif 106.if ${MK_OPENSSL} == "no" 107CFLAGS+=-DNO_OPENSSL 108.else 109LIBADD+= crypto 110.endif 111 112CFLAGS+= -I${BHYVE_SYSDIR}/sys/dev/e1000 113CFLAGS+= -I${BHYVE_SYSDIR}/sys/dev/mii 114CFLAGS+= -I${BHYVE_SYSDIR}/sys/dev/usb/controller 115.if ${MK_BHYVE_SNAPSHOT} != "no" 116CFLAGS+= -I${SRCTOP}/contrib/libucl/include 117 118# Temporary disable capsicum, until we integrate checkpoint code with it. 119CFLAGS+= -DWITHOUT_CAPSICUM 120 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