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 8f9c005a1SMarcelo Araujo.PATH: ${SRCTOP}/sys/cam/ctl 9f4d34383SMarcelo Araujo 10366f6083SPeter GrehanPROG= bhyve 11c2e2d02cSBaptiste DaroussinPACKAGE= bhyve 12366f6083SPeter Grehan 13b13e60daSPeter GrehanMAN= bhyve.8 14b1843e71SPeter Grehan 15e37bf586SPeter GrehanBHYVE_SYSDIR?=${SRCTOP} 165ccf6ce1SPeter Grehan 17b1843e71SPeter GrehanSRCS= \ 18d42ea573STycho Nightingale atkbdc.c \ 19b1843e71SPeter Grehan acpi.c \ 206b021cc2SWarner Losh audio.c \ 212cf9911fSPeter Grehan bhyvegc.c \ 22b1843e71SPeter Grehan bhyverun.c \ 23b1843e71SPeter Grehan block_if.c \ 249b1aa8d6SNeel Natu bootrom.c \ 252cf9911fSPeter Grehan console.c \ 26f9c005a1SMarcelo Araujo ctl_util.c \ 27f9c005a1SMarcelo Araujo ctl_scsi_all.c \ 2888ac6958SPeter Grehan fwctl.c \ 29cd377eb3SJohn Baldwin gdb.c \ 306b021cc2SWarner Losh hda_codec.c \ 31b1843e71SPeter Grehan inout.c \ 323cbf3585SJohn Baldwin ioapic.c \ 338a68ae80SConrad Meyer kernemu_dev.c \ 34b1843e71SPeter Grehan mem.c \ 35b1843e71SPeter Grehan mevent.c \ 36b1843e71SPeter Grehan mptbl.c \ 370ff7076bSVincenzo Maffione net_backends.c \ 384f7c3b7bSVincenzo Maffione net_utils.c \ 39b1843e71SPeter Grehan pci_ahci.c \ 409e749f25SAlexander Motin pci_e82545.c \ 41b1843e71SPeter Grehan pci_emul.c \ 426b021cc2SWarner Losh pci_hda.c \ 432cf9911fSPeter Grehan pci_fbuf.c \ 44b1843e71SPeter Grehan pci_hostbridge.c \ 45b3e9732aSJohn Baldwin pci_irq.c \ 46b1843e71SPeter Grehan pci_lpc.c \ 47c066c68cSMarcelo Araujo pci_nvme.c \ 48b1843e71SPeter Grehan pci_passthru.c \ 49100353cfSJakub Wojciech Klama pci_virtio_9p.c \ 50b1843e71SPeter Grehan pci_virtio_block.c \ 5113ee8ddeSJakub Wojciech Klama pci_virtio_console.c \ 52b1843e71SPeter Grehan pci_virtio_net.c \ 539d0c4e17SPeter Grehan pci_virtio_rnd.c \ 54f9c005a1SMarcelo Araujo pci_virtio_scsi.c \ 55b1843e71SPeter Grehan pci_uart.c \ 562cf9911fSPeter Grehan pci_xhci.c \ 572f40fc6fSPeter Grehan pctestdev.c \ 58b1843e71SPeter Grehan pm.c \ 59b1843e71SPeter Grehan post.c \ 602cf9911fSPeter Grehan ps2kbd.c \ 612cf9911fSPeter Grehan ps2mouse.c \ 622cf9911fSPeter Grehan rfb.c \ 63b1843e71SPeter Grehan rtc.c \ 64af5bfc53STycho Nightingale smbiostbl.c \ 652cf9911fSPeter Grehan sockstream.c \ 663d5444c8SNeel Natu task_switch.c \ 67b1843e71SPeter Grehan uart_emul.c \ 682cf9911fSPeter Grehan usb_emul.c \ 692cf9911fSPeter Grehan usb_mouse.c \ 70b1843e71SPeter Grehan virtio.c \ 712cf9911fSPeter Grehan vga.c \ 729cb339ccSConrad Meyer vmgenc.c \ 73b1843e71SPeter Grehan xmsr.c \ 74f9c005a1SMarcelo Araujo spinup_ap.c \ 75f9c005a1SMarcelo Araujo iov.c 76366f6083SPeter Grehan 77483d953aSJohn Baldwin.if ${MK_BHYVE_SNAPSHOT} != "no" 78483d953aSJohn BaldwinSRCS+= snapshot.c 79483d953aSJohn Baldwin.endif 80483d953aSJohn Baldwin 818a68ae80SConrad MeyerCFLAGS.kernemu_dev.c+= -I${SRCTOP}/sys/amd64 828a68ae80SConrad Meyer 83e37bf586SPeter Grehan.PATH: ${BHYVE_SYSDIR}/sys/amd64/vmm 84ba9b7bf7SNeel NatuSRCS+= vmm_instruction_emul.c 85ba9b7bf7SNeel Natu 8696602624SMariusz ZaborskiLIBADD= vmmapi md pthread z util sbuf cam 9p 8796602624SMariusz Zaborski 88*845b2737SMariusz Zaborski.if ${MK_CASPER} != "no" 8996602624SMariusz ZaborskiLIBADD+= casper 9096602624SMariusz ZaborskiLIBADD+= cap_pwd 9196602624SMariusz ZaborskiLIBADD+= cap_grp 9296602624SMariusz Zaborski# Temporary disable capsicum, until we integrate checkpoint code with it. 9396602624SMariusz Zaborski#CFLAGS+=-DWITH_CASPER 9496602624SMariusz Zaborski.endif 9596602624SMariusz Zaborski 96483d953aSJohn Baldwin.if ${MK_BHYVE_SNAPSHOT} != "no" 97483d953aSJohn BaldwinLIBADD+= ucl xo 98483d953aSJohn Baldwin.endif 992cf9911fSPeter Grehan 1008883128bSBjoern A. Zeeb.if ${MK_INET_SUPPORT} != "no" 1018883128bSBjoern A. ZeebCFLAGS+=-DINET 1028883128bSBjoern A. Zeeb.endif 1038883128bSBjoern A. Zeeb.if ${MK_INET6_SUPPORT} != "no" 1048883128bSBjoern A. ZeebCFLAGS+=-DINET6 1058883128bSBjoern A. Zeeb.endif 1062cd7735dSAleksandr Fedorov.if ${MK_NETGRAPH_SUPPORT} != "no" 1072cd7735dSAleksandr FedorovCFLAGS+=-DNETGRAPH 1082cd7735dSAleksandr FedorovLIBADD+= netgraph 1092cd7735dSAleksandr Fedorov.endif 110f4d34383SMarcelo Araujo.if ${MK_OPENSSL} == "no" 111f4d34383SMarcelo AraujoCFLAGS+=-DNO_OPENSSL 112f4d34383SMarcelo Araujo.else 113f4d34383SMarcelo AraujoLIBADD+= crypto 114f4d34383SMarcelo Araujo.endif 115f4d34383SMarcelo Araujo 1169e749f25SAlexander MotinCFLAGS+= -I${BHYVE_SYSDIR}/sys/dev/e1000 1179e749f25SAlexander MotinCFLAGS+= -I${BHYVE_SYSDIR}/sys/dev/mii 1182cf9911fSPeter GrehanCFLAGS+= -I${BHYVE_SYSDIR}/sys/dev/usb/controller 119483d953aSJohn Baldwin.if ${MK_BHYVE_SNAPSHOT} != "no" 120483d953aSJohn BaldwinCFLAGS+= -I${SRCTOP}/contrib/libucl/include 121483d953aSJohn Baldwin 122483d953aSJohn Baldwin# Temporary disable capsicum, until we integrate checkpoint code with it. 123483d953aSJohn BaldwinCFLAGS+= -DWITHOUT_CAPSICUM 124483d953aSJohn Baldwin 125483d953aSJohn BaldwinCFLAGS+= -DBHYVE_SNAPSHOT 126483d953aSJohn Baldwin.endif 127366f6083SPeter Grehan 128cd377eb3SJohn Baldwin.ifdef GDB_LOG 129cd377eb3SJohn BaldwinCFLAGS+=-DGDB_LOG 130cd377eb3SJohn Baldwin.endif 131cd377eb3SJohn Baldwin 132b67e81dbSJohn BaldwinWARNS?= 2 133b67e81dbSJohn Baldwin 134366f6083SPeter Grehan.include <bsd.prog.mk> 135