freebsd-dev/cddl/usr.sbin/Makefile
Brooks Davis 3bf6636512 cddl/*: add a WITH(OUT)_DTRACE option
Add an option to enable/disable DTrace without disabling ZFS.  New
architectures such as CHERI may support ZFS before they support DTrace
and the old model of WITHOUT_CDDL disabling both wasn't helpful.

For compatiblity, the CDDL option remains and WITHOUT_CDDL implies
WITHOUT_DTRACE.  WITHOUT_DTRACE also implies WITHOUT_CTF.

As part of this change, largely convert cddl/*/Makefile to using the
more compact SUBDIR.${MK_<FOO>}+= form rather than using intermediate
variables.

Reviewed by:	markj
Obtained from:	CheriBSD
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D35718
2022-07-06 14:03:48 +01:00

42 lines
669 B
Makefile

# $FreeBSD$
.include <src.opts.mk>
SUBDIR.${MK_DTRACE}+= \
${_dtrace} \
${_dwatch} \
${_lockstat} \
${_plockstat}
SUBDIR.${MK_TESTS}+= tests
SUBDIR.${MK_ZFS}+= \
zdb \
zhack
SUBDIR.${MK_ZFS}.${MK_CXX}+= \
zfsd
.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386"
_dtrace= dtrace
_dwatch= dwatch
_lockstat= lockstat
_plockstat= plockstat
.endif
.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "arm" || \
${MACHINE_CPUARCH} == "riscv"
_dtrace= dtrace
_dwatch= dwatch
_lockstat= lockstat
.endif
.if ${MACHINE_CPUARCH} == "powerpc"
_dtrace= dtrace
_dwatch= dwatch
_lockstat= lockstat
.endif
SUBDIR_PARALLEL=
.include <bsd.subdir.mk>