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_xhci.c \ 57 qemu_fwcfg.c \ 58 qemu_loader.c \ 59 smbiostbl.c \ 60 sockstream.c \ 61 tpm_device.c \ 62 tpm_emul_passthru.c \ 63 tpm_emul_swtpm.c \ 64 tpm_intf_crb.c \ 65 tpm_ppi_qemu.c \ 66 uart_backend.c \ 67 uart_emul.c \ 68 usb_emul.c \ 69 usb_mouse.c \ 70 virtio.c \ 71 vmexit.c \ 72 vmgenc.c 73 74.if ${MK_BHYVE_SNAPSHOT} != "no" 75SRCS+= snapshot.c 76.endif 77 78.include "${MACHINE_CPUARCH}/Makefile.inc" 79 80.if defined(BHYVE_FDT_SUPPORT) 81LIBADD+= fdt 82CFLAGS+= -I${SRCTOP}/sys/contrib/libfdt 83.endif 84 85.if defined(BHYVE_GDB_SUPPORT) 86SRCS+= gdb.c 87CFLAGS+= -DBHYVE_GDB 88.ifdef GDB_LOG 89CFLAGS+=-DGDB_LOG 90.endif 91SUBDIR+= gdb 92.endif 93 94CFLAGS+=-I${.CURDIR} \ 95 -I${.CURDIR}/../../contrib/lib9p \ 96 -I${SRCTOP}/sys 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" 111SRCS+= net_backend_netgraph.c 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# Disable thread safety analysis since it only finds very simple bugs and 130# yields many false positives. 131NO_WTHREAD_SAFETY= 132 133NO_WCAST_ALIGN= 134 135.include <bsd.prog.mk> 136