diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk index ec4bf66fc9e3..23065688d999 100644 --- a/share/mk/src.opts.mk +++ b/share/mk/src.opts.mk @@ -275,6 +275,13 @@ BROKEN_OPTIONS+=SSP BROKEN_OPTIONS+=EFI .endif +.if ${__T} == "aarch64" || ${__T} == "amd64" || ${__T} == "i386" || \ + ${__T} == "powerpc64" || ${__T} == "sparc64" +__DEFAULT_YES_OPTIONS+=CXGBETOOL +.else +__DEFAULT_NO_OPTIONS+=CXGBETOOL +.endif + .include # diff --git a/targets/pseudo/userland/Makefile.depend b/targets/pseudo/userland/Makefile.depend index 1201a233c36d..43fe71d61984 100644 --- a/targets/pseudo/userland/Makefile.depend +++ b/targets/pseudo/userland/Makefile.depend @@ -895,6 +895,10 @@ DIRDEPS+= \ usr.sbin/blacklistd .endif +.if ${MK_CXGBETOOL} != "no" +DIRDEPS+= usr.sbin/cxgbetool +.endif + .if ${MK_GPL_DTC} != "yes" DIRDEPS+= usr.bin/dtc .endif diff --git a/tools/build/options/WITHOUT_CXGBETOOL b/tools/build/options/WITHOUT_CXGBETOOL new file mode 100644 index 000000000000..d7aef386344b --- /dev/null +++ b/tools/build/options/WITHOUT_CXGBETOOL @@ -0,0 +1,3 @@ +.\" $FreeBSD$ +Set to not build +.Xr cxgbetool 8 diff --git a/tools/build/options/WITH_CXGBETOOL b/tools/build/options/WITH_CXGBETOOL new file mode 100644 index 000000000000..b9c26a09c2e5 --- /dev/null +++ b/tools/build/options/WITH_CXGBETOOL @@ -0,0 +1,3 @@ +.\" $FreeBSD$ +Set to build +.Xr cxgbetool 8 diff --git a/tools/tools/cxgbetool/Makefile b/tools/tools/cxgbetool/Makefile deleted file mode 100644 index 1430a5a09062..000000000000 --- a/tools/tools/cxgbetool/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -# $FreeBSD$ - -PROG= cxgbetool -SRCS= cxgbetool.c -MAN= cxgbetool.8 -CFLAGS+= -I${.CURDIR}/../../../sys/dev/cxgbe -I${.CURDIR}/../../../sys -I. -BINDIR?= /usr/sbin - -.include diff --git a/usr.sbin/Makefile b/usr.sbin/Makefile index 9eb92da76f23..ac33d277b73a 100644 --- a/usr.sbin/Makefile +++ b/usr.sbin/Makefile @@ -123,6 +123,7 @@ SUBDIR.${MK_BOOTPARAMD}+= bootparamd SUBDIR.${MK_BSDINSTALL}+= bsdinstall SUBDIR.${MK_BSNMP}+= bsnmpd SUBDIR.${MK_CTM}+= ctm +SUBDIR.${MK_CXGBETOOL}+= cxgbetool SUBDIR.${MK_DIALOG}+= bsdconfig SUBDIR.${MK_EFI}+= efivar SUBDIR.${MK_FLOPPY}+= fdcontrol diff --git a/usr.sbin/cxgbetool/Makefile b/usr.sbin/cxgbetool/Makefile new file mode 100644 index 000000000000..f8291aff0a1b --- /dev/null +++ b/usr.sbin/cxgbetool/Makefile @@ -0,0 +1,8 @@ +# $FreeBSD$ + +PROG= cxgbetool +MAN= cxgbetool.8 +CFLAGS+= -I${SRCTOP}/sys/dev/cxgbe -I${SRCTOP}/sys -I. +WARNS?= 2 + +.include diff --git a/usr.sbin/cxgbetool/Makefile.depend b/usr.sbin/cxgbetool/Makefile.depend new file mode 100644 index 000000000000..54c1f6f1442e --- /dev/null +++ b/usr.sbin/cxgbetool/Makefile.depend @@ -0,0 +1,19 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + gnu/lib/csu \ + gnu/lib/libgcc \ + include \ + include/arpa \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif diff --git a/tools/tools/cxgbetool/cxgbetool.8 b/usr.sbin/cxgbetool/cxgbetool.8 similarity index 100% rename from tools/tools/cxgbetool/cxgbetool.8 rename to usr.sbin/cxgbetool/cxgbetool.8 diff --git a/tools/tools/cxgbetool/cxgbetool.c b/usr.sbin/cxgbetool/cxgbetool.c similarity index 100% rename from tools/tools/cxgbetool/cxgbetool.c rename to usr.sbin/cxgbetool/cxgbetool.c diff --git a/tools/tools/cxgbetool/reg_defs_t4.c b/usr.sbin/cxgbetool/reg_defs_t4.c similarity index 100% rename from tools/tools/cxgbetool/reg_defs_t4.c rename to usr.sbin/cxgbetool/reg_defs_t4.c diff --git a/tools/tools/cxgbetool/reg_defs_t4vf.c b/usr.sbin/cxgbetool/reg_defs_t4vf.c similarity index 100% rename from tools/tools/cxgbetool/reg_defs_t4vf.c rename to usr.sbin/cxgbetool/reg_defs_t4vf.c diff --git a/tools/tools/cxgbetool/reg_defs_t5.c b/usr.sbin/cxgbetool/reg_defs_t5.c similarity index 100% rename from tools/tools/cxgbetool/reg_defs_t5.c rename to usr.sbin/cxgbetool/reg_defs_t5.c diff --git a/tools/tools/cxgbetool/reg_defs_t6.c b/usr.sbin/cxgbetool/reg_defs_t6.c similarity index 100% rename from tools/tools/cxgbetool/reg_defs_t6.c rename to usr.sbin/cxgbetool/reg_defs_t6.c