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