xref: /freebsd/usr.sbin/bhyve/Makefile (revision cd8537910406e68d4719136a5b0cf6d23bb1b23b)
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	pctestdev.c		\
60	pm.c			\
61	post.c			\
62	ps2kbd.c		\
63	ps2mouse.c		\
64	rfb.c			\
65	rtc.c			\
66	smbiostbl.c		\
67	sockstream.c		\
68	task_switch.c		\
69	uart_emul.c		\
70	usb_emul.c		\
71	usb_mouse.c		\
72	virtio.c		\
73	vga.c			\
74	vmgenc.c		\
75	xmsr.c			\
76	spinup_ap.c		\
77	iov.c
78
79.if ${MK_BHYVE_SNAPSHOT} != "no"
80SRCS+=	snapshot.c
81.endif
82
83CFLAGS.kernemu_dev.c+=	-I${SRCTOP}/sys/amd64
84
85.PATH:  ${BHYVE_SYSDIR}/sys/amd64/vmm
86SRCS+=	vmm_instruction_emul.c
87
88LIBADD=	vmmapi md pthread z util sbuf cam 9p casper cap_pwd cap_grp
89.if ${MK_BHYVE_SNAPSHOT} != "no"
90LIBADD+= ucl xo
91.endif
92
93.if ${MK_INET_SUPPORT} != "no"
94CFLAGS+=-DINET
95.endif
96.if ${MK_INET6_SUPPORT} != "no"
97CFLAGS+=-DINET6
98.endif
99.if ${MK_NETGRAPH_SUPPORT} != "no"
100CFLAGS+=-DNETGRAPH
101LIBADD+=    netgraph
102.endif
103.if ${MK_OPENSSL} == "no"
104CFLAGS+=-DNO_OPENSSL
105.else
106LIBADD+=	crypto
107.endif
108
109CFLAGS+= -I${BHYVE_SYSDIR}/sys/dev/e1000
110CFLAGS+= -I${BHYVE_SYSDIR}/sys/dev/mii
111CFLAGS+= -I${BHYVE_SYSDIR}/sys/dev/usb/controller
112.if ${MK_BHYVE_SNAPSHOT} != "no"
113CFLAGS+= -I${SRCTOP}/contrib/libucl/include
114
115# Temporary disable capsicum, until we integrate checkpoint code with it.
116CFLAGS+= -DWITHOUT_CAPSICUM
117
118CFLAGS+= -DBHYVE_SNAPSHOT
119.endif
120
121.ifdef GDB_LOG
122CFLAGS+=-DGDB_LOG
123.endif
124
125WARNS?=	2
126
127.include <bsd.prog.mk>
128