xref: /freebsd/usr.sbin/bhyve/Makefile (revision f2d48b5e2c3b45850585e4d7aee324fe148afbf2)
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
14
15BHYVE_SYSDIR?=${SRCTOP}
16
17SRCS=	\
18	atkbdc.c		\
19	acpi.c			\
20	audio.c			\
21	bhyvegc.c		\
22	bhyverun.c		\
23	block_if.c		\
24	bootrom.c		\
25	console.c		\
26	ctl_util.c		\
27	ctl_scsi_all.c		\
28	fwctl.c			\
29	gdb.c			\
30	hda_codec.c		\
31	inout.c			\
32	ioapic.c		\
33	kernemu_dev.c		\
34	mem.c			\
35	mevent.c		\
36	mptbl.c			\
37	net_backends.c		\
38	net_utils.c		\
39	pci_ahci.c		\
40	pci_e82545.c		\
41	pci_emul.c		\
42	pci_hda.c		\
43	pci_fbuf.c		\
44	pci_hostbridge.c	\
45	pci_irq.c		\
46	pci_lpc.c		\
47	pci_nvme.c		\
48	pci_passthru.c		\
49	pci_virtio_9p.c		\
50	pci_virtio_block.c	\
51	pci_virtio_console.c	\
52	pci_virtio_net.c	\
53	pci_virtio_rnd.c	\
54	pci_virtio_scsi.c	\
55	pci_uart.c		\
56	pci_xhci.c		\
57	pctestdev.c		\
58	pm.c			\
59	post.c			\
60	ps2kbd.c		\
61	ps2mouse.c		\
62	rfb.c			\
63	rtc.c			\
64	smbiostbl.c		\
65	sockstream.c		\
66	task_switch.c		\
67	uart_emul.c		\
68	usb_emul.c		\
69	usb_mouse.c		\
70	virtio.c		\
71	vga.c			\
72	vmgenc.c		\
73	xmsr.c			\
74	spinup_ap.c		\
75	iov.c
76
77.if ${MK_BHYVE_SNAPSHOT} != "no"
78SRCS+=	snapshot.c
79.endif
80
81CFLAGS.kernemu_dev.c+=	-I${SRCTOP}/sys/amd64
82
83.PATH:  ${BHYVE_SYSDIR}/sys/amd64/vmm
84SRCS+=	vmm_instruction_emul.c
85
86LIBADD=	vmmapi md pthread z util sbuf cam 9p casper cap_pwd cap_grp
87.if ${MK_BHYVE_SNAPSHOT} != "no"
88LIBADD+= ucl xo
89.endif
90
91.if ${MK_INET_SUPPORT} != "no"
92CFLAGS+=-DINET
93.endif
94.if ${MK_INET6_SUPPORT} != "no"
95CFLAGS+=-DINET6
96.endif
97.if ${MK_NETGRAPH_SUPPORT} != "no"
98CFLAGS+=-DNETGRAPH
99LIBADD+=    netgraph
100.endif
101.if ${MK_OPENSSL} == "no"
102CFLAGS+=-DNO_OPENSSL
103.else
104LIBADD+=	crypto
105.endif
106
107CFLAGS+= -I${BHYVE_SYSDIR}/sys/dev/e1000
108CFLAGS+= -I${BHYVE_SYSDIR}/sys/dev/mii
109CFLAGS+= -I${BHYVE_SYSDIR}/sys/dev/usb/controller
110.if ${MK_BHYVE_SNAPSHOT} != "no"
111CFLAGS+= -I${SRCTOP}/contrib/libucl/include
112
113# Temporary disable capsicum, until we integrate checkpoint code with it.
114CFLAGS+= -DWITHOUT_CAPSICUM
115
116CFLAGS+= -DBHYVE_SNAPSHOT
117.endif
118
119.ifdef GDB_LOG
120CFLAGS+=-DGDB_LOG
121.endif
122
123WARNS?=	2
124
125.include <bsd.prog.mk>
126