xref: /freebsd/usr.sbin/bhyve/Makefile (revision 8a68ae80f67adcb35e6f9712384a3da6dca26de2)
1366f6083SPeter Grehan#
2366f6083SPeter Grehan# $FreeBSD$
3366f6083SPeter Grehan#
4366f6083SPeter Grehan
5f4d34383SMarcelo Araujo.include <src.opts.mk>
6f9c005a1SMarcelo AraujoCFLAGS+=-I${SRCTOP}/sys
7f9c005a1SMarcelo Araujo.PATH:  ${SRCTOP}/sys/cam/ctl
8f4d34383SMarcelo Araujo
9366f6083SPeter GrehanPROG=	bhyve
10c2e2d02cSBaptiste DaroussinPACKAGE=	bhyve
11366f6083SPeter Grehan
12b13e60daSPeter GrehanMAN=	bhyve.8
13b1843e71SPeter Grehan
14e37bf586SPeter GrehanBHYVE_SYSDIR?=${SRCTOP}
155ccf6ce1SPeter Grehan
16b1843e71SPeter GrehanSRCS=	\
17d42ea573STycho Nightingale	atkbdc.c		\
18b1843e71SPeter Grehan	acpi.c			\
196b021cc2SWarner Losh	audio.c			\
202cf9911fSPeter Grehan	bhyvegc.c		\
21b1843e71SPeter Grehan	bhyverun.c		\
22b1843e71SPeter Grehan	block_if.c		\
239b1aa8d6SNeel Natu	bootrom.c		\
242cf9911fSPeter Grehan	console.c		\
25b1843e71SPeter Grehan	consport.c		\
26f9c005a1SMarcelo Araujo	ctl_util.c		\
27f9c005a1SMarcelo Araujo	ctl_scsi_all.c		\
28b1843e71SPeter Grehan	dbgport.c		\
2988ac6958SPeter Grehan	fwctl.c			\
30cd377eb3SJohn Baldwin	gdb.c			\
316b021cc2SWarner Losh	hda_codec.c		\
32b1843e71SPeter Grehan	inout.c			\
333cbf3585SJohn Baldwin	ioapic.c		\
34*8a68ae80SConrad Meyer	kernemu_dev.c		\
35b1843e71SPeter Grehan	mem.c			\
36b1843e71SPeter Grehan	mevent.c		\
37b1843e71SPeter Grehan	mptbl.c			\
380ff7076bSVincenzo Maffione	net_backends.c		\
394f7c3b7bSVincenzo Maffione	net_utils.c		\
40b1843e71SPeter Grehan	pci_ahci.c		\
419e749f25SAlexander Motin	pci_e82545.c		\
42b1843e71SPeter Grehan	pci_emul.c		\
436b021cc2SWarner Losh	pci_hda.c		\
442cf9911fSPeter Grehan	pci_fbuf.c		\
45b1843e71SPeter Grehan	pci_hostbridge.c	\
46b3e9732aSJohn Baldwin	pci_irq.c		\
47b1843e71SPeter Grehan	pci_lpc.c		\
48c066c68cSMarcelo Araujo	pci_nvme.c		\
49b1843e71SPeter Grehan	pci_passthru.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		\
57b1843e71SPeter Grehan	pm.c			\
58b1843e71SPeter Grehan	post.c			\
592cf9911fSPeter Grehan	ps2kbd.c		\
602cf9911fSPeter Grehan	ps2mouse.c		\
612cf9911fSPeter Grehan	rfb.c			\
62b1843e71SPeter Grehan	rtc.c			\
63af5bfc53STycho Nightingale	smbiostbl.c		\
642cf9911fSPeter Grehan	sockstream.c		\
653d5444c8SNeel Natu	task_switch.c		\
66b1843e71SPeter Grehan	uart_emul.c		\
672cf9911fSPeter Grehan	usb_emul.c		\
682cf9911fSPeter Grehan	usb_mouse.c		\
69b1843e71SPeter Grehan	virtio.c		\
702cf9911fSPeter Grehan	vga.c			\
719cb339ccSConrad Meyer	vmgenc.c		\
72b1843e71SPeter Grehan	xmsr.c			\
73f9c005a1SMarcelo Araujo	spinup_ap.c		\
74f9c005a1SMarcelo Araujo	iov.c
75366f6083SPeter Grehan
76483d953aSJohn Baldwin.if ${MK_BHYVE_SNAPSHOT} != "no"
77483d953aSJohn BaldwinSRCS+=	snapshot.c
78483d953aSJohn Baldwin.endif
79483d953aSJohn Baldwin
80*8a68ae80SConrad MeyerCFLAGS.kernemu_dev.c+=	-I${SRCTOP}/sys/amd64
81*8a68ae80SConrad Meyer
82e37bf586SPeter Grehan.PATH:  ${BHYVE_SYSDIR}/sys/amd64/vmm
83ba9b7bf7SNeel NatuSRCS+=	vmm_instruction_emul.c
84ba9b7bf7SNeel Natu
85f9c005a1SMarcelo AraujoLIBADD=	vmmapi md pthread z util sbuf cam
86483d953aSJohn Baldwin.if ${MK_BHYVE_SNAPSHOT} != "no"
87483d953aSJohn BaldwinLIBADD+= ucl xo
88483d953aSJohn Baldwin.endif
892cf9911fSPeter Grehan
908883128bSBjoern A. Zeeb.if ${MK_INET_SUPPORT} != "no"
918883128bSBjoern A. ZeebCFLAGS+=-DINET
928883128bSBjoern A. Zeeb.endif
938883128bSBjoern A. Zeeb.if ${MK_INET6_SUPPORT} != "no"
948883128bSBjoern A. ZeebCFLAGS+=-DINET6
958883128bSBjoern A. Zeeb.endif
962cd7735dSAleksandr Fedorov.if ${MK_NETGRAPH_SUPPORT} != "no"
972cd7735dSAleksandr FedorovCFLAGS+=-DNETGRAPH
982cd7735dSAleksandr FedorovLIBADD+=    netgraph
992cd7735dSAleksandr Fedorov.endif
100f4d34383SMarcelo Araujo.if ${MK_OPENSSL} == "no"
101f4d34383SMarcelo AraujoCFLAGS+=-DNO_OPENSSL
102f4d34383SMarcelo Araujo.else
103f4d34383SMarcelo AraujoLIBADD+=	crypto
104f4d34383SMarcelo Araujo.endif
105f4d34383SMarcelo Araujo
1069e749f25SAlexander MotinCFLAGS+= -I${BHYVE_SYSDIR}/sys/dev/e1000
1079e749f25SAlexander MotinCFLAGS+= -I${BHYVE_SYSDIR}/sys/dev/mii
1082cf9911fSPeter GrehanCFLAGS+= -I${BHYVE_SYSDIR}/sys/dev/usb/controller
109483d953aSJohn Baldwin.if ${MK_BHYVE_SNAPSHOT} != "no"
110483d953aSJohn BaldwinCFLAGS+= -I${SRCTOP}/contrib/libucl/include
111483d953aSJohn Baldwin
112483d953aSJohn Baldwin# Temporary disable capsicum, until we integrate checkpoint code with it.
113483d953aSJohn BaldwinCFLAGS+= -DWITHOUT_CAPSICUM
114483d953aSJohn Baldwin
115483d953aSJohn BaldwinCFLAGS+= -DBHYVE_SNAPSHOT
116483d953aSJohn Baldwin.endif
117366f6083SPeter Grehan
118cd377eb3SJohn Baldwin.ifdef GDB_LOG
119cd377eb3SJohn BaldwinCFLAGS+=-DGDB_LOG
120cd377eb3SJohn Baldwin.endif
121cd377eb3SJohn Baldwin
122b67e81dbSJohn BaldwinWARNS?=	2
123b67e81dbSJohn Baldwin
124366f6083SPeter Grehan.include <bsd.prog.mk>
125