xref: /freebsd/usr.sbin/bhyve/Makefile (revision f61e92ca5a23450bc28169bbdd71d7674df98c19)
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
87
88.if ${MK_CASPER} != "no"
89LIBADD+=	casper
90LIBADD+=	cap_pwd
91LIBADD+=	cap_grp
92# Temporary disable capsicum, until we integrate checkpoint code with it.
93#CFLAGS+=-DWITH_CASPER
94.endif
95
96.if ${MK_BHYVE_SNAPSHOT} != "no"
97LIBADD+= ucl xo
98.endif
99
100.if ${MK_INET_SUPPORT} != "no"
101CFLAGS+=-DINET
102.endif
103.if ${MK_INET6_SUPPORT} != "no"
104CFLAGS+=-DINET6
105.endif
106.if ${MK_NETGRAPH_SUPPORT} != "no"
107CFLAGS+=-DNETGRAPH
108LIBADD+=    netgraph
109.endif
110.if ${MK_OPENSSL} == "no"
111CFLAGS+=-DNO_OPENSSL
112.else
113LIBADD+=	crypto
114.endif
115
116CFLAGS+= -I${BHYVE_SYSDIR}/sys/dev/e1000
117CFLAGS+= -I${BHYVE_SYSDIR}/sys/dev/mii
118CFLAGS+= -I${BHYVE_SYSDIR}/sys/dev/usb/controller
119.if ${MK_BHYVE_SNAPSHOT} != "no"
120CFLAGS+= -I${SRCTOP}/contrib/libucl/include
121
122# Temporary disable capsicum, until we integrate checkpoint code with it.
123CFLAGS+= -DWITHOUT_CAPSICUM
124
125CFLAGS+= -DBHYVE_SNAPSHOT
126.endif
127
128.ifdef GDB_LOG
129CFLAGS+=-DGDB_LOG
130.endif
131
132WARNS?=	2
133
134.include <bsd.prog.mk>
135