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