xref: /freebsd/usr.sbin/bhyve/Makefile (revision 942815c54820783d3d4f7f6faa71ab7919b5f0e5)
1#
2# $FreeBSD$
3#
4
5.include <src.opts.mk>
6CFLAGS+=-I${.CURDIR}/../../contrib/lib9p
7CFLAGS+=-I${SRCTOP}/sys
8.PATH:  ${SRCTOP}/sys/cam/ctl
9
10PROG=	bhyve
11PACKAGE=	bhyve
12
13MAN=	bhyve.8 bhyve_config.5
14
15BHYVE_SYSDIR?=${SRCTOP}
16
17SRCS=	\
18	acpi_device.c		\
19	atkbdc.c		\
20	acpi.c			\
21	audio.c			\
22	basl.c			\
23	bhyvegc.c		\
24	bhyverun.c		\
25	block_if.c		\
26	bootrom.c		\
27	config.c		\
28	console.c		\
29	ctl_util.c		\
30	ctl_scsi_all.c		\
31	fwctl.c			\
32	gdb.c			\
33	hda_codec.c		\
34	inout.c			\
35	ioapic.c		\
36	kernemu_dev.c		\
37	mem.c			\
38	mevent.c		\
39	mptbl.c			\
40	net_backends.c		\
41	net_utils.c		\
42	pci_ahci.c		\
43	pci_e82545.c		\
44	pci_emul.c		\
45	pci_hda.c		\
46	pci_fbuf.c		\
47	pci_hostbridge.c	\
48	pci_irq.c		\
49	pci_lpc.c		\
50	pci_nvme.c		\
51	pci_passthru.c		\
52	pci_virtio_9p.c		\
53	pci_virtio_block.c	\
54	pci_virtio_console.c	\
55	pci_virtio_input.c	\
56	pci_virtio_net.c	\
57	pci_virtio_rnd.c	\
58	pci_virtio_scsi.c	\
59	pci_uart.c		\
60	pci_xhci.c		\
61	pctestdev.c		\
62	pm.c			\
63	post.c			\
64	ps2kbd.c		\
65	ps2mouse.c		\
66	rfb.c			\
67	rtc.c			\
68	smbiostbl.c		\
69	sockstream.c		\
70	task_switch.c		\
71	uart_emul.c		\
72	usb_emul.c		\
73	usb_mouse.c		\
74	virtio.c		\
75	vga.c			\
76	vmgenc.c		\
77	xmsr.c			\
78	spinup_ap.c		\
79	iov.c
80
81.if ${MK_BHYVE_SNAPSHOT} != "no"
82SRCS+=	snapshot.c
83.endif
84
85CFLAGS.kernemu_dev.c+=	-I${SRCTOP}/sys/amd64
86
87.PATH:  ${BHYVE_SYSDIR}/sys/amd64/vmm
88SRCS+=	vmm_instruction_emul.c
89
90LIBADD=	vmmapi md nv pthread z util sbuf cam 9p
91
92.if ${MK_CASPER} != "no"
93LIBADD+=	casper
94LIBADD+=	cap_pwd
95LIBADD+=	cap_grp
96# Temporary disable capsicum, until we integrate checkpoint code with it.
97#CFLAGS+=-DWITH_CASPER
98.endif
99
100.if ${MK_BHYVE_SNAPSHOT} != "no"
101LIBADD+= ucl xo
102.endif
103
104.if ${MK_INET_SUPPORT} != "no"
105CFLAGS+=-DINET
106.endif
107.if ${MK_INET6_SUPPORT} != "no"
108CFLAGS+=-DINET6
109.endif
110.if ${MK_NETGRAPH_SUPPORT} != "no"
111CFLAGS+=-DNETGRAPH
112LIBADD+=    netgraph
113.endif
114.if ${MK_OPENSSL} == "no"
115CFLAGS+=-DNO_OPENSSL
116.else
117LIBADD+=	crypto
118.endif
119
120CFLAGS+= -I${BHYVE_SYSDIR}/sys/dev/e1000
121CFLAGS+= -I${BHYVE_SYSDIR}/sys/dev/mii
122CFLAGS+= -I${BHYVE_SYSDIR}/sys/dev/usb/controller
123.if ${MK_BHYVE_SNAPSHOT} != "no"
124CFLAGS+= -I${SRCTOP}/contrib/libucl/include
125
126# Temporary disable capsicum, until we integrate checkpoint code with it.
127CFLAGS+= -DWITHOUT_CAPSICUM
128
129CFLAGS+= -DBHYVE_SNAPSHOT
130.endif
131
132.ifdef GDB_LOG
133CFLAGS+=-DGDB_LOG
134.endif
135
136# Disable thread safety analysis since it only finds very simple bugs and
137# yields many false positives.
138NO_WTHREAD_SAFETY=
139
140NO_WCAST_ALIGN=
141
142SUBDIR=	kbdlayout
143
144.include <bsd.prog.mk>
145