xref: /freebsd/usr.sbin/bhyve/Makefile (revision 5d3e7166)
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	qemu_fwcfg.c		\
67	rfb.c			\
68	rtc.c			\
69	smbiostbl.c		\
70	sockstream.c		\
71	task_switch.c		\
72	uart_emul.c		\
73	usb_emul.c		\
74	usb_mouse.c		\
75	virtio.c		\
76	vga.c			\
77	vmgenc.c		\
78	xmsr.c			\
79	spinup_ap.c		\
80	iov.c
81
82.if ${MK_BHYVE_SNAPSHOT} != "no"
83SRCS+=	snapshot.c
84.endif
85
86CFLAGS.kernemu_dev.c+=	-I${SRCTOP}/sys/amd64
87
88.PATH:  ${BHYVE_SYSDIR}/sys/amd64/vmm
89SRCS+=	vmm_instruction_emul.c
90
91LIBADD=	vmmapi md nv pthread z util sbuf cam 9p
92
93.if ${MK_BHYVE_SNAPSHOT} != "no"
94LIBADD+= ucl xo
95.endif
96
97.if ${MK_INET_SUPPORT} != "no"
98CFLAGS+=-DINET
99.endif
100.if ${MK_INET6_SUPPORT} != "no"
101CFLAGS+=-DINET6
102.endif
103.if ${MK_NETGRAPH_SUPPORT} != "no"
104CFLAGS+=-DNETGRAPH
105LIBADD+=    netgraph
106.endif
107.if ${MK_OPENSSL} == "no"
108CFLAGS+=-DNO_OPENSSL
109.else
110LIBADD+=	crypto
111.endif
112
113CFLAGS+= -I${BHYVE_SYSDIR}/sys/dev/e1000
114CFLAGS+= -I${BHYVE_SYSDIR}/sys/dev/mii
115CFLAGS+= -I${BHYVE_SYSDIR}/sys/dev/usb/controller
116.if ${MK_BHYVE_SNAPSHOT} != "no"
117CFLAGS+= -I${SRCTOP}/contrib/libucl/include
118
119# Temporary disable capsicum, until we integrate checkpoint code with it.
120CFLAGS+= -DWITHOUT_CAPSICUM
121
122CFLAGS+= -DBHYVE_SNAPSHOT
123.endif
124
125.ifdef GDB_LOG
126CFLAGS+=-DGDB_LOG
127.endif
128
129# Disable thread safety analysis since it only finds very simple bugs and
130# yields many false positives.
131NO_WTHREAD_SAFETY=
132
133NO_WCAST_ALIGN=
134
135SUBDIR=	kbdlayout
136
137.include <bsd.prog.mk>
138