xref: /freebsd/usr.sbin/bhyve/Makefile (revision 054accac71e0944ab588c3ab052bea6947df7885)
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
13621b5090SJohn BaldwinMAN=	bhyve.8 bhyve_config.5
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		\
25621b5090SJohn Baldwin	config.c		\
262cf9911fSPeter Grehan	console.c		\
27f9c005a1SMarcelo Araujo	ctl_util.c		\
28f9c005a1SMarcelo Araujo	ctl_scsi_all.c		\
2988ac6958SPeter Grehan	fwctl.c			\
30cd377eb3SJohn Baldwin	gdb.c			\
316b021cc2SWarner Losh	hda_codec.c		\
32b1843e71SPeter Grehan	inout.c			\
333cbf3585SJohn Baldwin	ioapic.c		\
348a68ae80SConrad 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		\
50100353cfSJakub Wojciech Klama	pci_virtio_9p.c		\
51b1843e71SPeter Grehan	pci_virtio_block.c	\
5213ee8ddeSJakub Wojciech Klama	pci_virtio_console.c	\
53*054accacSCorvin Köhne	pci_virtio_input.c	\
54b1843e71SPeter Grehan	pci_virtio_net.c	\
559d0c4e17SPeter Grehan	pci_virtio_rnd.c	\
56f9c005a1SMarcelo Araujo	pci_virtio_scsi.c	\
57b1843e71SPeter Grehan	pci_uart.c		\
582cf9911fSPeter Grehan	pci_xhci.c		\
592f40fc6fSPeter Grehan	pctestdev.c		\
60b1843e71SPeter Grehan	pm.c			\
61b1843e71SPeter Grehan	post.c			\
622cf9911fSPeter Grehan	ps2kbd.c		\
632cf9911fSPeter Grehan	ps2mouse.c		\
642cf9911fSPeter Grehan	rfb.c			\
65b1843e71SPeter Grehan	rtc.c			\
66af5bfc53STycho Nightingale	smbiostbl.c		\
672cf9911fSPeter Grehan	sockstream.c		\
683d5444c8SNeel Natu	task_switch.c		\
69b1843e71SPeter Grehan	uart_emul.c		\
702cf9911fSPeter Grehan	usb_emul.c		\
712cf9911fSPeter Grehan	usb_mouse.c		\
72b1843e71SPeter Grehan	virtio.c		\
732cf9911fSPeter Grehan	vga.c			\
749cb339ccSConrad Meyer	vmgenc.c		\
75b1843e71SPeter Grehan	xmsr.c			\
76f9c005a1SMarcelo Araujo	spinup_ap.c		\
77f9c005a1SMarcelo Araujo	iov.c
78366f6083SPeter Grehan
79483d953aSJohn Baldwin.if ${MK_BHYVE_SNAPSHOT} != "no"
80483d953aSJohn BaldwinSRCS+=	snapshot.c
81483d953aSJohn Baldwin.endif
82483d953aSJohn Baldwin
838a68ae80SConrad MeyerCFLAGS.kernemu_dev.c+=	-I${SRCTOP}/sys/amd64
848a68ae80SConrad Meyer
85e37bf586SPeter Grehan.PATH:  ${BHYVE_SYSDIR}/sys/amd64/vmm
86ba9b7bf7SNeel NatuSRCS+=	vmm_instruction_emul.c
87ba9b7bf7SNeel Natu
88621b5090SJohn BaldwinLIBADD=	vmmapi md nv pthread z util sbuf cam 9p
8996602624SMariusz Zaborski
90845b2737SMariusz Zaborski.if ${MK_CASPER} != "no"
9196602624SMariusz ZaborskiLIBADD+=	casper
9296602624SMariusz ZaborskiLIBADD+=	cap_pwd
9396602624SMariusz ZaborskiLIBADD+=	cap_grp
9496602624SMariusz Zaborski# Temporary disable capsicum, until we integrate checkpoint code with it.
9596602624SMariusz Zaborski#CFLAGS+=-DWITH_CASPER
9696602624SMariusz Zaborski.endif
9796602624SMariusz Zaborski
98483d953aSJohn Baldwin.if ${MK_BHYVE_SNAPSHOT} != "no"
99483d953aSJohn BaldwinLIBADD+= ucl xo
100483d953aSJohn Baldwin.endif
1012cf9911fSPeter Grehan
1028883128bSBjoern A. Zeeb.if ${MK_INET_SUPPORT} != "no"
1038883128bSBjoern A. ZeebCFLAGS+=-DINET
1048883128bSBjoern A. Zeeb.endif
1058883128bSBjoern A. Zeeb.if ${MK_INET6_SUPPORT} != "no"
1068883128bSBjoern A. ZeebCFLAGS+=-DINET6
1078883128bSBjoern A. Zeeb.endif
1082cd7735dSAleksandr Fedorov.if ${MK_NETGRAPH_SUPPORT} != "no"
1092cd7735dSAleksandr FedorovCFLAGS+=-DNETGRAPH
1102cd7735dSAleksandr FedorovLIBADD+=    netgraph
1112cd7735dSAleksandr Fedorov.endif
112f4d34383SMarcelo Araujo.if ${MK_OPENSSL} == "no"
113f4d34383SMarcelo AraujoCFLAGS+=-DNO_OPENSSL
114f4d34383SMarcelo Araujo.else
115f4d34383SMarcelo AraujoLIBADD+=	crypto
116f4d34383SMarcelo Araujo.endif
117f4d34383SMarcelo Araujo
1189e749f25SAlexander MotinCFLAGS+= -I${BHYVE_SYSDIR}/sys/dev/e1000
1199e749f25SAlexander MotinCFLAGS+= -I${BHYVE_SYSDIR}/sys/dev/mii
1202cf9911fSPeter GrehanCFLAGS+= -I${BHYVE_SYSDIR}/sys/dev/usb/controller
121483d953aSJohn Baldwin.if ${MK_BHYVE_SNAPSHOT} != "no"
122483d953aSJohn BaldwinCFLAGS+= -I${SRCTOP}/contrib/libucl/include
123483d953aSJohn Baldwin
124483d953aSJohn Baldwin# Temporary disable capsicum, until we integrate checkpoint code with it.
125483d953aSJohn BaldwinCFLAGS+= -DWITHOUT_CAPSICUM
126483d953aSJohn Baldwin
127483d953aSJohn BaldwinCFLAGS+= -DBHYVE_SNAPSHOT
128483d953aSJohn Baldwin.endif
129366f6083SPeter Grehan
130cd377eb3SJohn Baldwin.ifdef GDB_LOG
131cd377eb3SJohn BaldwinCFLAGS+=-DGDB_LOG
132cd377eb3SJohn Baldwin.endif
133cd377eb3SJohn Baldwin
134b67e81dbSJohn BaldwinWARNS?=	2
135b67e81dbSJohn Baldwin
136366f6083SPeter Grehan.include <bsd.prog.mk>
137