xref: /freebsd/usr.sbin/bhyve/Makefile (revision b4d3dd861511cc58c1d1328511189b8a42a6d091)
1#
2# $FreeBSD$
3#
4
5.include <src.opts.mk>
6CFLAGS+=-I${.CURDIR}/../../contrib/lib9p
7CFLAGS+=-I${SRCTOP}/sys
8.PATH:  ${SRCTOP}/sys/libkern ${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	crc16.c			\
30	ctl_util.c		\
31	ctl_scsi_all.c		\
32	fwctl.c			\
33	gdb.c			\
34	hda_codec.c		\
35	inout.c			\
36	ioapic.c		\
37	kernemu_dev.c		\
38	mem.c			\
39	mevent.c		\
40	mptbl.c			\
41	net_backends.c		\
42	net_utils.c		\
43	pci_ahci.c		\
44	pci_e82545.c		\
45	pci_emul.c		\
46	pci_hda.c		\
47	pci_fbuf.c		\
48	pci_hostbridge.c	\
49	pci_irq.c		\
50	pci_lpc.c		\
51	pci_nvme.c		\
52	pci_passthru.c		\
53	pci_virtio_9p.c		\
54	pci_virtio_block.c	\
55	pci_virtio_console.c	\
56	pci_virtio_input.c	\
57	pci_virtio_net.c	\
58	pci_virtio_rnd.c	\
59	pci_virtio_scsi.c	\
60	pci_uart.c		\
61	pci_xhci.c		\
62	pctestdev.c		\
63	pm.c			\
64	post.c			\
65	ps2kbd.c		\
66	ps2mouse.c		\
67	qemu_fwcfg.c		\
68	qemu_loader.c		\
69	rfb.c			\
70	rtc.c			\
71	smbiostbl.c		\
72	sockstream.c		\
73	task_switch.c		\
74	uart_emul.c		\
75	usb_emul.c		\
76	usb_mouse.c		\
77	virtio.c		\
78	vga.c			\
79	vmgenc.c		\
80	xmsr.c			\
81	spinup_ap.c		\
82	iov.c
83
84.if ${MK_BHYVE_SNAPSHOT} != "no"
85SRCS+=	snapshot.c
86.endif
87
88CFLAGS.kernemu_dev.c+=	-I${SRCTOP}/sys/amd64
89
90.PATH:  ${BHYVE_SYSDIR}/sys/amd64/vmm
91SRCS+=	vmm_instruction_emul.c
92
93LIBADD=	vmmapi md nv pthread z util sbuf cam 9p
94
95.if ${MK_BHYVE_SNAPSHOT} != "no"
96LIBADD+= ucl xo
97.endif
98
99.if ${MK_INET_SUPPORT} != "no"
100CFLAGS+=-DINET
101.endif
102.if ${MK_INET6_SUPPORT} != "no"
103CFLAGS+=-DINET6
104.endif
105.if ${MK_NETGRAPH_SUPPORT} != "no"
106CFLAGS+=-DNETGRAPH
107LIBADD+=    netgraph
108.endif
109.if ${MK_OPENSSL} == "no"
110CFLAGS+=-DNO_OPENSSL
111.else
112LIBADD+=	crypto
113.endif
114
115CFLAGS+= -I${BHYVE_SYSDIR}/sys/dev/e1000
116CFLAGS+= -I${BHYVE_SYSDIR}/sys/dev/mii
117CFLAGS+= -I${BHYVE_SYSDIR}/sys/dev/usb/controller
118.if ${MK_BHYVE_SNAPSHOT} != "no"
119CFLAGS+= -I${SRCTOP}/contrib/libucl/include
120
121# Temporary disable capsicum, until we integrate checkpoint code with it.
122CFLAGS+= -DWITHOUT_CAPSICUM
123
124CFLAGS+= -DBHYVE_SNAPSHOT
125.endif
126
127.ifdef GDB_LOG
128CFLAGS+=-DGDB_LOG
129.endif
130
131# Disable thread safety analysis since it only finds very simple bugs and
132# yields many false positives.
133NO_WTHREAD_SAFETY=
134
135NO_WCAST_ALIGN=
136
137SUBDIR=	kbdlayout
138
139.include <bsd.prog.mk>
140