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_scsi_all.c \ 31 ctl_util.c \ 32 hda_codec.c \ 33 iov.c \ 34 mem.c \ 35 mevent.c \ 36 net_backend_netmap.c \ 37 net_backend_slirp.c \ 38 net_backends.c \ 39 net_utils.c \ 40 pci_emul.c \ 41 pci_hostbridge.c \ 42 pci_nvme.c \ 43 pci_passthru.c \ 44 pci_virtio_9p.c \ 45 pci_virtio_block.c \ 46 pci_virtio_console.c \ 47 pci_virtio_input.c \ 48 pci_virtio_net.c \ 49 pci_virtio_rnd.c \ 50 pci_virtio_scsi.c \ 51 qemu_fwcfg.c \ 52 qemu_loader.c \ 53 smbiostbl.c \ 54 sockstream.c \ 55 tpm_device.c \ 56 tpm_emul_passthru.c \ 57 tpm_intf_crb.c \ 58 tpm_ppi_qemu.c \ 59 uart_emul.c \ 60 usb_emul.c \ 61 usb_mouse.c \ 62 virtio.c \ 63 vmexit.c \ 64 vmgenc.c 65 66.if ${MK_BHYVE_SNAPSHOT} != "no" 67SRCS+= snapshot.c 68.endif 69 70.include "${MACHINE_CPUARCH}/Makefile.inc" 71 72.if defined(BHYVE_GDB_SUPPORT) 73SRCS+= gdb.c 74CFLAGS+= -DBHYVE_GDB 75.ifdef GDB_LOG 76CFLAGS+=-DGDB_LOG 77.endif 78SUBDIR+= gdb 79.endif 80 81CFLAGS+=-I${.CURDIR} \ 82 -I${.CURDIR}/../../contrib/lib9p \ 83 -I${SRCTOP}/sys 84 85LIBADD= vmmapi md nv pthread z util sbuf cam 9p 86 87.if ${MK_BHYVE_SNAPSHOT} != "no" 88LIBADD+= ucl xo 89.endif 90 91.if ${MK_INET_SUPPORT} != "no" 92CFLAGS+=-DINET 93.endif 94.if ${MK_INET6_SUPPORT} != "no" 95CFLAGS+=-DINET6 96.endif 97.if ${MK_NETGRAPH_SUPPORT} != "no" 98SRCS+= net_backend_netgraph.c 99LIBADD+= netgraph 100.endif 101.if ${MK_OPENSSL} == "no" 102CFLAGS+=-DNO_OPENSSL 103.else 104LIBADD+= crypto 105CFLAGS+=-DOPENSSL_API_COMPAT=0x10100000L 106.endif 107 108CFLAGS+= -I${BHYVE_SYSDIR}/sys/dev/e1000 109CFLAGS+= -I${BHYVE_SYSDIR}/sys/dev/mii 110CFLAGS+= -I${BHYVE_SYSDIR}/sys/dev/usb/controller 111.if ${MK_BHYVE_SNAPSHOT} != "no" 112CFLAGS+= -I${SRCTOP}/contrib/libucl/include 113CFLAGS+= -DBHYVE_SNAPSHOT 114.endif 115 116# Disable thread safety analysis since it only finds very simple bugs and 117# yields many false positives. 118NO_WTHREAD_SAFETY= 119 120NO_WCAST_ALIGN= 121 122.include <bsd.prog.mk> 123