1366f6083SPeter Grehan# 2366f6083SPeter Grehan# $FreeBSD$ 3366f6083SPeter Grehan# 4366f6083SPeter Grehan 5f4d34383SMarcelo Araujo.include <src.opts.mk> 6100353cfSJakub Wojciech KlamaCFLAGS+=-I${.CURDIR}/../../contrib/lib9p 7f9c005a1SMarcelo AraujoCFLAGS+=-I${SRCTOP}/sys 8*b344bd3aSVal Packett.PATH: ${SRCTOP}/sys/libkern ${SRCTOP}/sys/cam/ctl 9f4d34383SMarcelo Araujo 10366f6083SPeter GrehanPROG= bhyve 11c2e2d02cSBaptiste DaroussinPACKAGE= bhyve 12366f6083SPeter Grehan 13621b5090SJohn BaldwinMAN= bhyve.8 bhyve_config.5 14b1843e71SPeter Grehan 15e37bf586SPeter GrehanBHYVE_SYSDIR?=${SRCTOP} 165ccf6ce1SPeter Grehan 17b1843e71SPeter GrehanSRCS= \ 181231f047SCorvin Köhne acpi_device.c \ 19d42ea573STycho Nightingale atkbdc.c \ 20b1843e71SPeter Grehan acpi.c \ 216b021cc2SWarner Losh audio.c \ 2221bbc284SCorvin Köhne basl.c \ 232cf9911fSPeter Grehan bhyvegc.c \ 24b1843e71SPeter Grehan bhyverun.c \ 25b1843e71SPeter Grehan block_if.c \ 269b1aa8d6SNeel Natu bootrom.c \ 27621b5090SJohn Baldwin config.c \ 282cf9911fSPeter Grehan console.c \ 29*b344bd3aSVal Packett crc16.c \ 30f9c005a1SMarcelo Araujo ctl_util.c \ 31f9c005a1SMarcelo Araujo ctl_scsi_all.c \ 3288ac6958SPeter Grehan fwctl.c \ 33cd377eb3SJohn Baldwin gdb.c \ 346b021cc2SWarner Losh hda_codec.c \ 35b1843e71SPeter Grehan inout.c \ 363cbf3585SJohn Baldwin ioapic.c \ 378a68ae80SConrad Meyer kernemu_dev.c \ 38b1843e71SPeter Grehan mem.c \ 39b1843e71SPeter Grehan mevent.c \ 40b1843e71SPeter Grehan mptbl.c \ 410ff7076bSVincenzo Maffione net_backends.c \ 424f7c3b7bSVincenzo Maffione net_utils.c \ 43b1843e71SPeter Grehan pci_ahci.c \ 449e749f25SAlexander Motin pci_e82545.c \ 45b1843e71SPeter Grehan pci_emul.c \ 466b021cc2SWarner Losh pci_hda.c \ 472cf9911fSPeter Grehan pci_fbuf.c \ 48b1843e71SPeter Grehan pci_hostbridge.c \ 49b3e9732aSJohn Baldwin pci_irq.c \ 50b1843e71SPeter Grehan pci_lpc.c \ 51c066c68cSMarcelo Araujo pci_nvme.c \ 52b1843e71SPeter Grehan pci_passthru.c \ 53100353cfSJakub Wojciech Klama pci_virtio_9p.c \ 54b1843e71SPeter Grehan pci_virtio_block.c \ 5513ee8ddeSJakub Wojciech Klama pci_virtio_console.c \ 56054accacSCorvin Köhne pci_virtio_input.c \ 57b1843e71SPeter Grehan pci_virtio_net.c \ 589d0c4e17SPeter Grehan pci_virtio_rnd.c \ 59f9c005a1SMarcelo Araujo pci_virtio_scsi.c \ 60b1843e71SPeter Grehan pci_uart.c \ 612cf9911fSPeter Grehan pci_xhci.c \ 622f40fc6fSPeter Grehan pctestdev.c \ 63b1843e71SPeter Grehan pm.c \ 64b1843e71SPeter Grehan post.c \ 652cf9911fSPeter Grehan ps2kbd.c \ 662cf9911fSPeter Grehan ps2mouse.c \ 67d85147f3SCorvin Köhne qemu_fwcfg.c \ 682cf9911fSPeter Grehan rfb.c \ 69b1843e71SPeter Grehan rtc.c \ 70af5bfc53STycho Nightingale smbiostbl.c \ 712cf9911fSPeter Grehan sockstream.c \ 723d5444c8SNeel Natu task_switch.c \ 73b1843e71SPeter Grehan uart_emul.c \ 742cf9911fSPeter Grehan usb_emul.c \ 752cf9911fSPeter Grehan usb_mouse.c \ 76b1843e71SPeter Grehan virtio.c \ 772cf9911fSPeter Grehan vga.c \ 789cb339ccSConrad Meyer vmgenc.c \ 79b1843e71SPeter Grehan xmsr.c \ 80f9c005a1SMarcelo Araujo spinup_ap.c \ 81f9c005a1SMarcelo Araujo iov.c 82366f6083SPeter Grehan 83483d953aSJohn Baldwin.if ${MK_BHYVE_SNAPSHOT} != "no" 84483d953aSJohn BaldwinSRCS+= snapshot.c 85483d953aSJohn Baldwin.endif 86483d953aSJohn Baldwin 878a68ae80SConrad MeyerCFLAGS.kernemu_dev.c+= -I${SRCTOP}/sys/amd64 888a68ae80SConrad Meyer 89e37bf586SPeter Grehan.PATH: ${BHYVE_SYSDIR}/sys/amd64/vmm 90ba9b7bf7SNeel NatuSRCS+= vmm_instruction_emul.c 91ba9b7bf7SNeel Natu 92621b5090SJohn BaldwinLIBADD= vmmapi md nv pthread z util sbuf cam 9p 9396602624SMariusz Zaborski 94483d953aSJohn Baldwin.if ${MK_BHYVE_SNAPSHOT} != "no" 95483d953aSJohn BaldwinLIBADD+= ucl xo 96483d953aSJohn Baldwin.endif 972cf9911fSPeter Grehan 988883128bSBjoern A. Zeeb.if ${MK_INET_SUPPORT} != "no" 998883128bSBjoern A. ZeebCFLAGS+=-DINET 1008883128bSBjoern A. Zeeb.endif 1018883128bSBjoern A. Zeeb.if ${MK_INET6_SUPPORT} != "no" 1028883128bSBjoern A. ZeebCFLAGS+=-DINET6 1038883128bSBjoern A. Zeeb.endif 1042cd7735dSAleksandr Fedorov.if ${MK_NETGRAPH_SUPPORT} != "no" 1052cd7735dSAleksandr FedorovCFLAGS+=-DNETGRAPH 1062cd7735dSAleksandr FedorovLIBADD+= netgraph 1072cd7735dSAleksandr Fedorov.endif 108f4d34383SMarcelo Araujo.if ${MK_OPENSSL} == "no" 109f4d34383SMarcelo AraujoCFLAGS+=-DNO_OPENSSL 110f4d34383SMarcelo Araujo.else 111f4d34383SMarcelo AraujoLIBADD+= crypto 112f4d34383SMarcelo Araujo.endif 113f4d34383SMarcelo Araujo 1149e749f25SAlexander MotinCFLAGS+= -I${BHYVE_SYSDIR}/sys/dev/e1000 1159e749f25SAlexander MotinCFLAGS+= -I${BHYVE_SYSDIR}/sys/dev/mii 1162cf9911fSPeter GrehanCFLAGS+= -I${BHYVE_SYSDIR}/sys/dev/usb/controller 117483d953aSJohn Baldwin.if ${MK_BHYVE_SNAPSHOT} != "no" 118483d953aSJohn BaldwinCFLAGS+= -I${SRCTOP}/contrib/libucl/include 119483d953aSJohn Baldwin 120483d953aSJohn Baldwin# Temporary disable capsicum, until we integrate checkpoint code with it. 121483d953aSJohn BaldwinCFLAGS+= -DWITHOUT_CAPSICUM 122483d953aSJohn Baldwin 123483d953aSJohn BaldwinCFLAGS+= -DBHYVE_SNAPSHOT 124483d953aSJohn Baldwin.endif 125366f6083SPeter Grehan 126cd377eb3SJohn Baldwin.ifdef GDB_LOG 127cd377eb3SJohn BaldwinCFLAGS+=-DGDB_LOG 128cd377eb3SJohn Baldwin.endif 129cd377eb3SJohn Baldwin 1301a8e5239SMark Johnston# Disable thread safety analysis since it only finds very simple bugs and 1311a8e5239SMark Johnston# yields many false positives. 1321a8e5239SMark JohnstonNO_WTHREAD_SAFETY= 1331a8e5239SMark Johnston 13471ebd117SMark JohnstonNO_WCAST_ALIGN= 13571ebd117SMark Johnston 13619eaa01bSMichael ReifenbergerSUBDIR= kbdlayout 1371a8e5239SMark Johnston 138366f6083SPeter Grehan.include <bsd.prog.mk> 139