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