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