aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/bhyve/Makefile
blob: 25fb71b5768f791acdc6e9e76a384fd2102dc5bd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
#
#

.include <src.opts.mk>

PROG=	bhyve
PACKAGE=	bhyve

MAN=	bhyve.8 bhyve_config.5

BHYVE_SYSDIR?=${SRCTOP}

.PATH:	${.CURDIR}/${MACHINE_CPUARCH}	\
	${SRCTOP}/sys/libkern		\
	${SRCTOP}/sys/cam/ctl

SRCS=	\
	acpi.c			\
	acpi_device.c		\
	audio.c			\
	basl.c			\
	bhyvegc.c		\
	bhyverun.c		\
	bhyverun_machdep.c	\
	block_if.c		\
	bootrom.c		\
	config.c		\
	console.c		\
	crc16.c			\
	ctl_nvme_all.c		\
	ctl_scsi_all.c		\
	ctl_util.c		\
	hda_codec.c		\
	iov.c			\
	mem.c			\
	mevent.c		\
	net_backend_netmap.c	\
	net_backend_slirp.c	\
	net_backends.c		\
	net_utils.c		\
	pci_ahci.c		\
	pci_e82545.c		\
	pci_emul.c		\
	pci_hda.c		\
	pci_hostbridge.c	\
	pci_irq.c		\
	pci_nvme.c		\
	pci_uart.c		\
	pci_virtio_9p.c		\
	pci_virtio_block.c	\
	pci_virtio_console.c	\
	pci_virtio_input.c	\
	pci_virtio_net.c	\
	pci_virtio_rnd.c	\
	pci_virtio_scsi.c	\
	pci_xhci.c		\
	qemu_fwcfg.c		\
	qemu_loader.c		\
	smbiostbl.c		\
	sockstream.c		\
	tpm_device.c		\
	tpm_emul_passthru.c	\
	tpm_emul_swtpm.c	\
	tpm_intf_crb.c		\
	tpm_ppi_qemu.c		\
	uart_backend.c		\
	uart_emul.c		\
	usb_emul.c		\
	usb_mouse.c		\
	virtio.c		\
	vmexit.c		\
	vmgenc.c

.if ${MK_BHYVE_SNAPSHOT} != "no"
SRCS+=	snapshot.c
.endif

.include "${MACHINE_CPUARCH}/Makefile.inc"

SUBDIR+= slirp

.if defined(BHYVE_FDT_SUPPORT)
LIBADD+= fdt
CFLAGS+= -I${SRCTOP}/sys/contrib/libfdt
.endif

.if defined(BHYVE_GDB_SUPPORT)
SRCS+=	gdb.c
CFLAGS+= -DBHYVE_GDB
.ifdef GDB_LOG
CFLAGS+=-DGDB_LOG
.endif
SUBDIR+= gdb
.endif

CFLAGS+=-I${.CURDIR}		\
	-I${.CURDIR}/../../contrib/lib9p \
	-I${SRCTOP}/sys

LIBADD+= vmmapi md nv uvmem pthread z util sbuf cam 9p

.if ${MK_BHYVE_SNAPSHOT} != "no"
LIBADD+= ucl xo
.endif

.if ${MK_INET_SUPPORT} != "no"
CFLAGS+=-DINET
.endif
.if ${MK_INET6_SUPPORT} != "no"
CFLAGS+=-DINET6
.endif
.if ${MK_NETGRAPH_SUPPORT} != "no"
SRCS+=	net_backend_netgraph.c
LIBADD+=	netgraph
.endif
.if ${MK_OPENSSL} == "no"
CFLAGS+=-DNO_OPENSSL
.else
LIBADD+=	crypto
CFLAGS+=-DOPENSSL_API_COMPAT=0x10100000L
.endif

CFLAGS+= -I${BHYVE_SYSDIR}/sys/dev/e1000
CFLAGS+= -I${BHYVE_SYSDIR}/sys/dev/mii
CFLAGS+= -I${BHYVE_SYSDIR}/sys/dev/usb/controller
.if ${MK_BHYVE_SNAPSHOT} != "no"
CFLAGS+= -I${SRCTOP}/contrib/libucl/include
CFLAGS+= -DBHYVE_SNAPSHOT
.endif

# Disable thread safety analysis since it only finds very simple bugs and
# yields many false positives.
NO_WTHREAD_SAFETY=

NO_WCAST_ALIGN=

.include <bsd.prog.mk>