summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/Makefile2
-rw-r--r--share/examples/Makefile9
-rw-r--r--share/man/man4/Makefile5
-rw-r--r--share/mk/bsd.own.mk1
-rw-r--r--sys/modules/Makefile2
-rw-r--r--tools/build/mk/OptionalObsoleteFiles.inc10
-rw-r--r--tools/build/options/WITHOUT_BHYVE6
-rw-r--r--usr.sbin/Makefile.amd642
8 files changed, 34 insertions, 3 deletions
diff --git a/lib/Makefile b/lib/Makefile
index cd844db..acdd88e 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -225,8 +225,10 @@ _librtld_db= librtld_db
.endif
.if ${MACHINE_CPUARCH} == "amd64"
+.if ${MK_BHYVE} != "no"
_libvmmapi= libvmmapi
.endif
+.endif
.if ${MACHINE_CPUARCH} == "ia64"
_libefi= libefi
diff --git a/share/examples/Makefile b/share/examples/Makefile
index a674f72..32d71a1 100644
--- a/share/examples/Makefile
+++ b/share/examples/Makefile
@@ -7,7 +7,6 @@
LDIRS= BSD_daemon \
FreeBSD_version \
IPv6 \
- bhyve \
bootforth \
csh \
diskless \
@@ -41,7 +40,6 @@ XFILES= BSD_daemon/FreeBSD.pfa \
FreeBSD_version/Makefile \
FreeBSD_version/README \
IPv6/USAGE \
- bhyve/vmrun.sh \
bootforth/README \
bootforth/boot.4th \
bootforth/frames.4th \
@@ -205,6 +203,13 @@ XFILES+= hast/ucarp.sh \
hast/vip-up.sh
.endif
+.if ${MACHINE_CPUARCH} == "amd64"
+.if ${MK_BHYVE} != "no"
+LDIRS+= bhyve
+XFILES+= bhyve/vmrun.sh
+.endif
+.endif
+
# Define SHARED to indicate whether you want symbolic links to the system
# source (``symlinks''), or a separate copy (``copies''); (latter useful
# in environments where it's not possible to keep /sys publicly readable)
diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile
index 651172b..8a7165b 100644
--- a/share/man/man4/Makefile
+++ b/share/man/man4/Makefile
@@ -836,7 +836,6 @@ MLINKS+=lindev.4 full.4
.endif
.if ${MACHINE_CPUARCH} == "amd64"
-_bhyve.4= bhyve.4
_if_ntb.4= if_ntb.4
_ntb.4= ntb.4
_ntb_hw.4= ntb_hw.4
@@ -849,6 +848,10 @@ MLINKS+=qlxge.4 if_qlxge.4
MLINKS+=qlxgb.4 if_qlxgb.4
MLINKS+=qlxgbe.4 if_qlxgbe.4
MLINKS+=sfxge.4 if_sfxge.4
+
+.if ${MK_BHYVE} != "no"
+_bhyve.4= bhyve.4
+.endif
.endif
.if ${MACHINE_CPUARCH} == "mips"
diff --git a/share/mk/bsd.own.mk b/share/mk/bsd.own.mk
index c2265e6..2a6e584 100644
--- a/share/mk/bsd.own.mk
+++ b/share/mk/bsd.own.mk
@@ -254,6 +254,7 @@ __DEFAULT_YES_OPTIONS = \
ATM \
AUDIT \
AUTHPF \
+ BHYVE \
BINUTILS \
BLUETOOTH \
BMAKE \
diff --git a/sys/modules/Makefile b/sys/modules/Makefile
index 0946897..1da32bb 100644
--- a/sys/modules/Makefile
+++ b/sys/modules/Makefile
@@ -774,7 +774,9 @@ _twa= twa
_vesa= vesa
_viawd= viawd
_virtio= virtio
+.if ${MK_BHYVE} != "no" || defined(ALL_MODULES)
_vmm= vmm
+.endif
_vxge= vxge
_x86bios= x86bios
_wbwd= wbwd
diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc
index 45fcf4f..288204a 100644
--- a/tools/build/mk/OptionalObsoleteFiles.inc
+++ b/tools/build/mk/OptionalObsoleteFiles.inc
@@ -144,6 +144,16 @@ OLD_FILES+=usr/share/man/man8/authpf.8.gz
OLD_FILES+=usr/share/man/man8/authpf-noip.8.gz
.endif
+.if ${MK_BHYVE} == no
+OLD_FILES+=usr/sbin/bhyve
+OLD_FILES+=usr/sbin/bhyvectl
+OLD_FILES+=usr/sbin/bhyveload
+OLD_FILES+=usr/share/examples/bhyve/vmrun.sh
+OLD_FILES+=usr/share/man/man8/bhyve.8.gz
+OLD_FILES+=usr/share/man/man8/bhyveload.8.gz
+OLD_DIRS+=usr/share/examples/bhyve
+.endif
+
.if ${MK_BLUETOOTH} == no
OLD_FILES+=etc/bluetooth/hcsecd.conf
OLD_FILES+=etc/bluetooth/hosts
diff --git a/tools/build/options/WITHOUT_BHYVE b/tools/build/options/WITHOUT_BHYVE
new file mode 100644
index 0000000..b80a726
--- /dev/null
+++ b/tools/build/options/WITHOUT_BHYVE
@@ -0,0 +1,6 @@
+.\" $FreeBSD$
+Set to not build or install
+.Xr bhyve 8 ,
+associated utilities, and examples.
+.Pp
+This option only affects amd64/amd64.
diff --git a/usr.sbin/Makefile.amd64 b/usr.sbin/Makefile.amd64
index 2d1a3e8..3f40974 100644
--- a/usr.sbin/Makefile.amd64
+++ b/usr.sbin/Makefile.amd64
@@ -10,9 +10,11 @@ SUBDIR+= acpi
SUBDIR+= apm
.endif
SUBDIR+= asf
+.if ${MK_BHYVE} != "no"
SUBDIR+= bhyve
SUBDIR+= bhyvectl
SUBDIR+= bhyveload
+.endif
SUBDIR+= boot0cfg
.if ${MK_TOOLCHAIN} != "no"
SUBDIR+= btxld
OpenPOWER on IntegriCloud