From 9770f66e4c690bfcc23d99f514efa50bf4adb394 Mon Sep 17 00:00:00 2001 From: kib Date: Sat, 30 Jun 2018 20:09:43 +0000 Subject: [PATCH] MFC r335253: Rework ofed build. Sponsored by: Mellanox Technologies --- Makefile.inc1 | 31 ++++++------------- contrib/ofed/Makefile | 10 ------ .../libibverbs/examples/build/Makefile.inc | 4 --- .../librdmacm/examples/build/Makefile.inc | 3 -- contrib/ofed/usr.bin/Makefile | 11 ------- contrib/ofed/usr.lib/0/Makefile | 8 ----- contrib/ofed/usr.lib/2/Makefile | 14 --------- contrib/ofed/usr.lib/3/Makefile | 10 ------ contrib/ofed/usr.lib/Makefile | 8 ----- lib/Makefile | 14 +++------ lib/ofed/Makefile | 30 ++++++++++++++++++ lib/ofed/Makefile.inc | 1 + .../ofed/opensm => lib/ofed}/complib/Makefile | 7 +++-- {contrib => lib}/ofed/include/Makefile | 27 ++++++++-------- {contrib => lib}/ofed/libcxgb4/Makefile | 5 +-- {contrib => lib}/ofed/libibcm/Makefile | 7 +++-- {contrib => lib}/ofed/libibmad/Makefile | 7 +++-- {contrib => lib}/ofed/libibnetdisc/Makefile | 7 +++-- {contrib => lib}/ofed/libibumad/Makefile | 7 +++-- {contrib => lib}/ofed/libibverbs/Makefile | 7 +++-- {contrib => lib}/ofed/libmlx4/Makefile | 5 +-- {contrib => lib}/ofed/libmlx5/Makefile | 7 +++-- .../opensm => lib/ofed}/libopensm/Makefile | 7 +++-- {contrib => lib}/ofed/librdmacm/Makefile | 7 +++-- .../opensm => lib/ofed}/libvendor/Makefile | 7 +++-- share/mk/src.libnames.mk | 24 +++++++------- usr.bin/Makefile | 1 + .../ofed/usr.lib/1 => usr.bin/ofed}/Makefile | 6 ++-- .../ofed/infiniband-diags}/Makefile | 0 .../ofed/infiniband-diags}/Makefile.inc | 6 ++-- .../ofed/infiniband-diags}/dump_fts/Makefile | 0 .../ofed/infiniband-diags}/ibaddr/Makefile | 0 .../infiniband-diags}/ibcacheedit/Makefile | 0 .../infiniband-diags}/ibccconfig/Makefile | 0 .../ofed/infiniband-diags}/ibccquery/Makefile | 0 .../infiniband-diags}/iblinkinfo/Makefile | 0 .../ofed/infiniband-diags}/ibmirror/Makefile | 0 .../infiniband-diags}/ibnetdiscover/Makefile | 0 .../ofed/infiniband-diags}/ibping/Makefile | 0 .../infiniband-diags}/ibportstate/Makefile | 0 .../infiniband-diags}/ibqueryerrors/Makefile | 0 .../ofed/infiniband-diags}/ibroute/Makefile | 0 .../ofed/infiniband-diags}/ibstat/Makefile | 0 .../ofed/infiniband-diags}/ibsysstat/Makefile | 0 .../ofed/infiniband-diags}/ibtracert/Makefile | 0 .../ofed/infiniband-diags}/perfquery/Makefile | 0 .../ofed/infiniband-diags}/saquery/Makefile | 0 .../ofed/infiniband-diags}/sminfo/Makefile | 0 .../ofed/infiniband-diags}/smpdump/Makefile | 0 .../ofed/infiniband-diags}/smpquery/Makefile | 0 .../ofed/infiniband-diags}/vendstat/Makefile | 0 .../ofed/libibverbs}/Makefile | 2 ++ usr.bin/ofed/libibverbs/Makefile.inc | 9 ++++++ .../ofed/libibverbs}/asyncwatch/Makefile | 1 - .../ofed/libibverbs}/devices/Makefile | 1 - .../ofed/libibverbs}/devinfo/Makefile | 1 - .../ofed/libibverbs}/rc_pingpong/Makefile | 1 - .../ofed/libibverbs}/srq_pingpong/Makefile | 1 - .../ofed/libibverbs}/uc_pingpong/Makefile | 1 - .../ofed/libibverbs}/ud_pingpong/Makefile | 1 - .../build => usr.bin/ofed/librdmacm}/Makefile | 0 usr.bin/ofed/librdmacm/Makefile.inc | 8 +++++ .../ofed/librdmacm}/mckey/Makefile | 2 -- .../ofed/librdmacm}/rping/Makefile | 2 -- .../ofed/librdmacm}/ucmatose/Makefile | 2 -- .../ofed/librdmacm}/udaddy/Makefile | 2 -- .../opensm => usr.bin/ofed}/opensm/Makefile | 5 +-- 67 files changed, 148 insertions(+), 179 deletions(-) delete mode 100644 contrib/ofed/Makefile delete mode 100644 contrib/ofed/libibverbs/examples/build/Makefile.inc delete mode 100644 contrib/ofed/librdmacm/examples/build/Makefile.inc delete mode 100644 contrib/ofed/usr.bin/Makefile delete mode 100644 contrib/ofed/usr.lib/0/Makefile delete mode 100644 contrib/ofed/usr.lib/2/Makefile delete mode 100644 contrib/ofed/usr.lib/3/Makefile delete mode 100644 contrib/ofed/usr.lib/Makefile create mode 100644 lib/ofed/Makefile create mode 100644 lib/ofed/Makefile.inc rename {contrib/ofed/opensm => lib/ofed}/complib/Makefile (75%) rename {contrib => lib}/ofed/include/Makefile (90%) rename {contrib => lib}/ofed/libcxgb4/Makefile (67%) rename {contrib => lib}/ofed/libibcm/Makefile (54%) rename {contrib => lib}/ofed/libibmad/Makefile (70%) rename {contrib => lib}/ofed/libibnetdisc/Makefile (80%) rename {contrib => lib}/ofed/libibumad/Makefile (54%) rename {contrib => lib}/ofed/libibverbs/Makefile (90%) rename {contrib => lib}/ofed/libmlx4/Makefile (71%) rename {contrib => lib}/ofed/libmlx5/Makefile (63%) rename {contrib/ofed/opensm => lib/ofed}/libopensm/Makefile (59%) rename {contrib => lib}/ofed/librdmacm/Makefile (90%) rename {contrib/ofed/opensm => lib/ofed}/libvendor/Makefile (62%) rename {contrib/ofed/usr.lib/1 => usr.bin/ofed}/Makefile (54%) rename {contrib/ofed/infiniband-diags/build => usr.bin/ofed/infiniband-diags}/Makefile (100%) rename {contrib/ofed/infiniband-diags/build => usr.bin/ofed/infiniband-diags}/Makefile.inc (60%) rename {contrib/ofed/infiniband-diags/build => usr.bin/ofed/infiniband-diags}/dump_fts/Makefile (100%) rename {contrib/ofed/infiniband-diags/build => usr.bin/ofed/infiniband-diags}/ibaddr/Makefile (100%) rename {contrib/ofed/infiniband-diags/build => usr.bin/ofed/infiniband-diags}/ibcacheedit/Makefile (100%) rename {contrib/ofed/infiniband-diags/build => usr.bin/ofed/infiniband-diags}/ibccconfig/Makefile (100%) rename {contrib/ofed/infiniband-diags/build => usr.bin/ofed/infiniband-diags}/ibccquery/Makefile (100%) rename {contrib/ofed/infiniband-diags/build => usr.bin/ofed/infiniband-diags}/iblinkinfo/Makefile (100%) rename {contrib/ofed/infiniband-diags/build => usr.bin/ofed/infiniband-diags}/ibmirror/Makefile (100%) rename {contrib/ofed/infiniband-diags/build => usr.bin/ofed/infiniband-diags}/ibnetdiscover/Makefile (100%) rename {contrib/ofed/infiniband-diags/build => usr.bin/ofed/infiniband-diags}/ibping/Makefile (100%) rename {contrib/ofed/infiniband-diags/build => usr.bin/ofed/infiniband-diags}/ibportstate/Makefile (100%) rename {contrib/ofed/infiniband-diags/build => usr.bin/ofed/infiniband-diags}/ibqueryerrors/Makefile (100%) rename {contrib/ofed/infiniband-diags/build => usr.bin/ofed/infiniband-diags}/ibroute/Makefile (100%) rename {contrib/ofed/infiniband-diags/build => usr.bin/ofed/infiniband-diags}/ibstat/Makefile (100%) rename {contrib/ofed/infiniband-diags/build => usr.bin/ofed/infiniband-diags}/ibsysstat/Makefile (100%) rename {contrib/ofed/infiniband-diags/build => usr.bin/ofed/infiniband-diags}/ibtracert/Makefile (100%) rename {contrib/ofed/infiniband-diags/build => usr.bin/ofed/infiniband-diags}/perfquery/Makefile (100%) rename {contrib/ofed/infiniband-diags/build => usr.bin/ofed/infiniband-diags}/saquery/Makefile (100%) rename {contrib/ofed/infiniband-diags/build => usr.bin/ofed/infiniband-diags}/sminfo/Makefile (100%) rename {contrib/ofed/infiniband-diags/build => usr.bin/ofed/infiniband-diags}/smpdump/Makefile (100%) rename {contrib/ofed/infiniband-diags/build => usr.bin/ofed/infiniband-diags}/smpquery/Makefile (100%) rename {contrib/ofed/infiniband-diags/build => usr.bin/ofed/infiniband-diags}/vendstat/Makefile (100%) rename {contrib/ofed/libibverbs/examples/build => usr.bin/ofed/libibverbs}/Makefile (90%) create mode 100644 usr.bin/ofed/libibverbs/Makefile.inc rename {contrib/ofed/libibverbs/examples/build => usr.bin/ofed/libibverbs}/asyncwatch/Makefile (67%) rename {contrib/ofed/libibverbs/examples/build => usr.bin/ofed/libibverbs}/devices/Makefile (66%) rename {contrib/ofed/libibverbs/examples/build => usr.bin/ofed/libibverbs}/devinfo/Makefile (65%) rename {contrib/ofed/libibverbs/examples/build => usr.bin/ofed/libibverbs}/rc_pingpong/Makefile (70%) rename {contrib/ofed/libibverbs/examples/build => usr.bin/ofed/libibverbs}/srq_pingpong/Makefile (70%) rename {contrib/ofed/libibverbs/examples/build => usr.bin/ofed/libibverbs}/uc_pingpong/Makefile (70%) rename {contrib/ofed/libibverbs/examples/build => usr.bin/ofed/libibverbs}/ud_pingpong/Makefile (70%) rename {contrib/ofed/librdmacm/examples/build => usr.bin/ofed/librdmacm}/Makefile (100%) create mode 100644 usr.bin/ofed/librdmacm/Makefile.inc rename {contrib/ofed/librdmacm/examples/build => usr.bin/ofed/librdmacm}/mckey/Makefile (60%) rename {contrib/ofed/librdmacm/examples/build => usr.bin/ofed/librdmacm}/rping/Makefile (63%) rename {contrib/ofed/librdmacm/examples/build => usr.bin/ofed/librdmacm}/ucmatose/Makefile (65%) rename {contrib/ofed/librdmacm/examples/build => usr.bin/ofed/librdmacm}/udaddy/Makefile (64%) rename {contrib/ofed/opensm => usr.bin/ofed}/opensm/Makefile (93%) diff --git a/Makefile.inc1 b/Makefile.inc1 index 08aa2af4d6f..9ab2b33b198 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -263,9 +263,6 @@ SUBDIR+=sys usr.bin usr.sbin .if ${MK_TESTS} != "no" SUBDIR+= tests .endif -.if ${MK_OFED} != "no" -SUBDIR+=contrib/ofed -.endif # Local directories are built in parallel with the base system directories. # Users may insert a .WAIT directive at the beginning or elsewhere within @@ -2141,24 +2138,16 @@ _lib_libradius= lib/libradius .endif .if ${MK_OFED} != "no" -# -# The OFED libraries are built in four steps -# as reflected below, due to interdependencies. -# -# NOTE: Depending on contrib/ofed/include is only needed for -# the lib32 compat build. -# -_ofed_lib= \ -contrib/ofed/include \ -contrib/ofed/usr.lib/0 \ -contrib/ofed/usr.lib/1 \ -contrib/ofed/usr.lib/2 \ -contrib/ofed/usr.lib/3 +_prebuild_libs+= \ + lib/ofed/libibverbs \ + lib/ofed/libibmad \ + lib/ofed/libibumad \ + lib/ofed/complib \ + lib/ofed/libmlx5 -contrib/ofed/usr.lib/0__L: contrib/ofed/include__L lib/libthr__L -contrib/ofed/usr.lib/1__L: contrib/ofed/usr.lib/0__L -contrib/ofed/usr.lib/2__L: contrib/ofed/usr.lib/1__L -contrib/ofed/usr.lib/3__L: contrib/ofed/usr.lib/2__L +lib/ofed/libibmad__L: lib/ofed/libibumad__L +lib/ofed/complib__L: lib/libthr__L +lib/ofed/libmlx5__L: lib/ofed/libibverbs__L lib/libthr__L .endif .if ${MK_CASPER} != "no" @@ -2169,7 +2158,7 @@ lib/libpjdlog__L: lib/libutil__L lib/libcasper__L: lib/libnv__L lib/liblzma__L: lib/libthr__L -_generic_libs= ${_cddl_lib} gnu/lib ${_kerberos5_lib} lib ${_secure_lib} usr.bin/lex/lib ${_ofed_lib} +_generic_libs= ${_cddl_lib} gnu/lib ${_kerberos5_lib} lib ${_secure_lib} usr.bin/lex/lib .for _DIR in ${LOCAL_LIB_DIRS} .if ${_DIR} == ".WAIT" || (empty(_generic_libs:M${_DIR}) && exists(${.CURDIR}/${_DIR}/Makefile)) _generic_libs+= ${_DIR} diff --git a/contrib/ofed/Makefile b/contrib/ofed/Makefile deleted file mode 100644 index f7a1d550871..00000000000 --- a/contrib/ofed/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -# $FreeBSD$ - -# NOTE: Make sure WITH_OFED=YES is set when building this top-level directory. - -SUBDIR= \ -include \ -usr.lib \ -usr.bin - -.include diff --git a/contrib/ofed/libibverbs/examples/build/Makefile.inc b/contrib/ofed/libibverbs/examples/build/Makefile.inc deleted file mode 100644 index 6c285e06aca..00000000000 --- a/contrib/ofed/libibverbs/examples/build/Makefile.inc +++ /dev/null @@ -1,4 +0,0 @@ -BINDIR?= /usr/bin -CFLAGS+= -I${.CURDIR}/../../.. -LDFLAGS+= -libverbs -lmlx4 -lmlx5 -lcxgb4 -lpthread - diff --git a/contrib/ofed/librdmacm/examples/build/Makefile.inc b/contrib/ofed/librdmacm/examples/build/Makefile.inc deleted file mode 100644 index 43b972b8f93..00000000000 --- a/contrib/ofed/librdmacm/examples/build/Makefile.inc +++ /dev/null @@ -1,3 +0,0 @@ -BINDIR?= /usr/bin -CFLAGS+= -I${.CURDIR}/../../.. -LDFLAGS+= -libverbs -lrdmacm -lmlx4 -lmlx5 -lcxgb4 -lpthread diff --git a/contrib/ofed/usr.bin/Makefile b/contrib/ofed/usr.bin/Makefile deleted file mode 100644 index 105ad821364..00000000000 --- a/contrib/ofed/usr.bin/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -# $FreeBSD$ - -SUBDIR= \ -../libibverbs/examples/build \ -../librdmacm/examples/build \ -../opensm/opensm \ -../infiniband-diags/build - -SUBDIR_PARALLEL= - -.include diff --git a/contrib/ofed/usr.lib/0/Makefile b/contrib/ofed/usr.lib/0/Makefile deleted file mode 100644 index 2f7360a32f3..00000000000 --- a/contrib/ofed/usr.lib/0/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -# $FreeBSD$ - -SUBDIR= \ -../../libibverbs - -SUBDIR_PARALLEL= - -.include diff --git a/contrib/ofed/usr.lib/2/Makefile b/contrib/ofed/usr.lib/2/Makefile deleted file mode 100644 index bc865b1a499..00000000000 --- a/contrib/ofed/usr.lib/2/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -# $FreeBSD$ - -SUBDIR= \ -../../librdmacm \ -../../libibmad \ -../../opensm/complib \ -../../opensm/libvendor \ -../../libcxgb4 \ -../../libmlx4 \ -../../libmlx5 - -SUBDIR_PARALLEL= - -.include diff --git a/contrib/ofed/usr.lib/3/Makefile b/contrib/ofed/usr.lib/3/Makefile deleted file mode 100644 index 3356591594a..00000000000 --- a/contrib/ofed/usr.lib/3/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -# $FreeBSD$ - -SUBDIR= \ -../../libibnetdisc \ -../../opensm/libopensm \ -../../../../lib/libpcap - -SUBDIR_PARALLEL= - -.include diff --git a/contrib/ofed/usr.lib/Makefile b/contrib/ofed/usr.lib/Makefile deleted file mode 100644 index 6481b405e32..00000000000 --- a/contrib/ofed/usr.lib/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -# $FreeBSD$ - -# NOTE: If building outside the buildworld target, install each subdirectory -# before building the next one. - -SUBDIR=0 1 2 3 - -.include diff --git a/lib/Makefile b/lib/Makefile index b7a1304b690..a2287b1f10a 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -83,7 +83,7 @@ SUBDIR= ${SUBDIR_BOOTSTRAP} \ libopenbsd \ libopie \ libpam \ - ${_libpcap} \ + libpcap \ ${_libpe} \ libpjdlog \ ${_libpmc} \ @@ -156,6 +156,9 @@ SUBDIR_DEPEND_libtacplus= libmd SUBDIR_DEPEND_libulog= libmd SUBDIR_DEPEND_libunbound= ${_libldns} SUBDIR_DEPEND_liblzma= ${_libthr} +.if ${MK_OFED} != "no" +SUBDIR_DEPEND_libpcap= ofed +.endif # NB: keep these sorted by MK_* knobs @@ -271,14 +274,6 @@ _libproc= libproc _librtld_db= librtld_db .endif -.if ${MK_OFED} == "no" -# -# When OFED is enabled libpcap is built as part of -# OFED due to library dependencies -# -_libpcap= libpcap -.endif - .if ${MACHINE_CPUARCH} == "powerpc" _libproc= libproc _librtld_db= librtld_db @@ -293,6 +288,7 @@ _libdl= libdl _libproc= libproc _librtld_db= librtld_db .endif +SUBDIR.${MK_OFED}+= ofed .if ${MK_OPENSSL} != "no" _libmp= libmp diff --git a/lib/ofed/Makefile b/lib/ofed/Makefile new file mode 100644 index 00000000000..224222b55e2 --- /dev/null +++ b/lib/ofed/Makefile @@ -0,0 +1,30 @@ +# $FreeBSD$ + +SUBDIR= \ + include \ + libibverbs \ + libibcm \ + libibumad \ + librdmacm \ + libibmad \ + complib \ + libvendor \ + libcxgb4 \ + libmlx4 \ + libmlx5 \ + libibnetdisc \ + libopensm + +SUBDIR_DEPEND_libibcm= libibverbs +SUBDIR_DEPEND_librdmacm= libibverbs +SUBDIR_DEPEND_libibmad= libibumad +SUBDIR_DEPEND_libvendor= libibumad +SUBDIR_DEPEND_libcxgb4= libibverbs +SUBDIR_DEPEND_libmlx4= libibverbs +SUBDIR_DEPEND_libmlx5= libibverbs +SUBDIR_DEPEND_libibnetdisc= libibmad libibumad complib + +SUBDIR_PARALLEL= + +.include + diff --git a/lib/ofed/Makefile.inc b/lib/ofed/Makefile.inc new file mode 100644 index 00000000000..e8c0da7a1d7 --- /dev/null +++ b/lib/ofed/Makefile.inc @@ -0,0 +1 @@ +# $FreeBSD$ diff --git a/contrib/ofed/opensm/complib/Makefile b/lib/ofed/complib/Makefile similarity index 75% rename from contrib/ofed/opensm/complib/Makefile rename to lib/ofed/complib/Makefile index f3005ff928a..3adfdb9ee2b 100644 --- a/contrib/ofed/opensm/complib/Makefile +++ b/lib/ofed/complib/Makefile @@ -1,6 +1,7 @@ # $FreeBSD$ -.PATH: ${.CURDIR} +_spath= ${SRCTOP}/contrib/ofed/opensm/complib +.PATH: ${_spath} SHLIBDIR?= /usr/lib LIB= osmcomp @@ -26,9 +27,9 @@ cl_timer.c \ cl_vector.c \ ib_statustext.c -CFLAGS+= -I${.CURDIR}/.. -DHAVE_CONFIG_H=1 +CFLAGS+= -I${_spath}/.. -DHAVE_CONFIG_H=1 CFLAGS+= -I${SYSROOT:U${DESTDIR}}/${INCLUDEDIR}/infiniband LIBADD= pthread -VERSION_MAP= ${.CURDIR}/libosmcomp.map +VERSION_MAP= ${_spath}/libosmcomp.map .include diff --git a/contrib/ofed/include/Makefile b/lib/ofed/include/Makefile similarity index 90% rename from contrib/ofed/include/Makefile rename to lib/ofed/include/Makefile index 2941a11829b..b40811e7e42 100644 --- a/contrib/ofed/include/Makefile +++ b/lib/ofed/include/Makefile @@ -1,20 +1,21 @@ # $FreeBSD$ -IBVERBS= ${.CURDIR}/../libibverbs -IBMAD= ${.CURDIR}/../libibmad -IBUMAD= ${.CURDIR}/../libibumad -IBCM= ${.CURDIR}/../libibcm -IBND= ${.CURDIR}/../libibnetdisc -RDMACM= ${.CURDIR}/../librdmacm -RDMA= ${.CURDIR}/../../../sys/ofed/include/uapi/rdma -OSM= ${.CURDIR}/../opensm/include +OFEDINCS= ${SRCTOP}/contrib/ofed/include +IBVERBS= ${SRCTOP}/contrib/ofed/libibverbs +IBMAD= ${SRCTOP}/contrib/ofed/libibmad +IBUMAD= ${SRCTOP}/contrib/ofed/libibumad +IBCM= ${SRCTOP}/contrib/ofed/libibcm +IBND= ${SRCTOP}/contrib/ofed/libibnetdisc +RDMACM= ${SRCTOP}/contrib/ofed/librdmacm +RDMA= ${SRCTOP}/sys/ofed/include/uapi/rdma +OSM= ${SRCTOP}/contrib/ofed/opensm/include IBINCS= \ -byteorder.h \ -byteswap.h \ -endian.h \ -types.h \ -udma_barrier.h \ +${OFEDINCS}/byteorder.h \ +${OFEDINCS}/byteswap.h \ +${OFEDINCS}/endian.h \ +${OFEDINCS}/types.h \ +${OFEDINCS}/udma_barrier.h \ ${IBVERBS}/arch.h \ ${IBVERBS}/driver.h \ ${IBVERBS}/kern-abi.h \ diff --git a/contrib/ofed/libcxgb4/Makefile b/lib/ofed/libcxgb4/Makefile similarity index 67% rename from contrib/ofed/libcxgb4/Makefile rename to lib/ofed/libcxgb4/Makefile index 98196ea3a4b..7611e228b83 100644 --- a/contrib/ofed/libcxgb4/Makefile +++ b/lib/ofed/libcxgb4/Makefile @@ -1,6 +1,7 @@ # $FreeBSD$ -.PATH: ${.CURDIR} +_spath= ${SRCTOP}/contrib/ofed/libcxgb4 +.PATH: ${_spath} SHLIBDIR?= /usr/lib LIB= cxgb4 @@ -14,6 +15,6 @@ qp.c \ verbs.c LIBADD= ibverbs pthread -CFLAGS+= -I${.CURDIR} +CFLAGS+= -I${_spath} .include diff --git a/contrib/ofed/libibcm/Makefile b/lib/ofed/libibcm/Makefile similarity index 54% rename from contrib/ofed/libibcm/Makefile rename to lib/ofed/libibcm/Makefile index c40e8202987..8593683a0d0 100644 --- a/contrib/ofed/libibcm/Makefile +++ b/lib/ofed/libibcm/Makefile @@ -1,6 +1,7 @@ # $FreeBSD$ -.PATH: ${.CURDIR} +_spath= ${SRCTOP}/contrib/ofed/libibcm +.PATH: ${_spath} SHLIBDIR?= /usr/lib LIB= ibcm @@ -8,8 +9,8 @@ SHLIB_MAJOR= 1 MK_PROFILE= no SRCS= cm.c LIBADD= ibverbs -CFLAGS+= -I${.CURDIR} +CFLAGS+= -I${_spath} MAN= -VERSION_MAP= ${.CURDIR}/libibcm.map +VERSION_MAP= ${_spath}/libibcm.map .include diff --git a/contrib/ofed/libibmad/Makefile b/lib/ofed/libibmad/Makefile similarity index 70% rename from contrib/ofed/libibmad/Makefile rename to lib/ofed/libibmad/Makefile index ceef5ebc207..fcb0508e956 100644 --- a/contrib/ofed/libibmad/Makefile +++ b/lib/ofed/libibmad/Makefile @@ -1,6 +1,7 @@ # $FreeBSD$ -.PATH: ${.CURDIR} +_spath= ${SRCTOP}/contrib/ofed/libibmad +.PATH: ${_spath} SHLIBDIR?= /usr/lib LIB= ibmad @@ -25,8 +26,8 @@ vendor.c LIBADD= ibumad CFLAGS+= -DHAVE_CONFIG_H=1 -CFLAGS+= -I${.CURDIR} -VERSION_MAP= ${.CURDIR}/libibmad.map +CFLAGS+= -I${_spath} +VERSION_MAP= ${_spath}/libibmad.map .include diff --git a/contrib/ofed/libibnetdisc/Makefile b/lib/ofed/libibnetdisc/Makefile similarity index 80% rename from contrib/ofed/libibnetdisc/Makefile rename to lib/ofed/libibnetdisc/Makefile index 5bd622de339..f66e58f4b0c 100644 --- a/contrib/ofed/libibnetdisc/Makefile +++ b/lib/ofed/libibnetdisc/Makefile @@ -2,7 +2,8 @@ .include -.PATH: ${.CURDIR} ${.CURDIR}/man +_spath= ${SRCTOP}/contrib/ofed/libibnetdisc +.PATH: ${_spath} ${_spath}/man SHLIBDIR?= /usr/lib LIB_CXX= ibnetdisc @@ -28,11 +29,11 @@ ibnd_show_progress.3 LIBADD= osmcomp ibmad ibumad CFLAGS+= -DHAVE_CONFIG_H=1 -CFLAGS+= -I${.CURDIR} +CFLAGS+= -I${_spath} CFLAGS+= -I${SYSROOT:U${DESTDIR}}/${INCLUDEDIR}/infiniband .if ${COMPILER_FEATURES:Mc++11} CXXFLAGS+= -std=c++11 .endif -VERSION_MAP= ${.CURDIR}/libibnetdisc.map +VERSION_MAP= ${_spath}/libibnetdisc.map .include diff --git a/contrib/ofed/libibumad/Makefile b/lib/ofed/libibumad/Makefile similarity index 54% rename from contrib/ofed/libibumad/Makefile rename to lib/ofed/libibumad/Makefile index af7ac3f9755..6ac9dafa8f5 100644 --- a/contrib/ofed/libibumad/Makefile +++ b/lib/ofed/libibumad/Makefile @@ -1,6 +1,7 @@ # $FreeBSD$ -.PATH: ${.CURDIR} +_spath= ${SRCTOP}/contrib/ofed/libibumad +.PATH: ${_spath} SHLIBDIR?= /usr/lib LIB= ibumad @@ -10,7 +11,7 @@ SRCS= \ umad.c \ umad_str.c \ sysfs.c -CFLAGS+= -I${.CURDIR} -VERSION_MAP= ${.CURDIR}/libibumad.map +CFLAGS+= -I${_spath} +VERSION_MAP= ${_spath}/libibumad.map .include diff --git a/contrib/ofed/libibverbs/Makefile b/lib/ofed/libibverbs/Makefile similarity index 90% rename from contrib/ofed/libibverbs/Makefile rename to lib/ofed/libibverbs/Makefile index 846bad02fbf..eb50be2f4ff 100644 --- a/contrib/ofed/libibverbs/Makefile +++ b/lib/ofed/libibverbs/Makefile @@ -1,14 +1,15 @@ # $FreeBSD$ -.PATH: ${.CURDIR} ${.CURDIR}/man +_spath= ${SRCTOP}/contrib/ofed/libibverbs +.PATH: ${_spath} ${_spath}/man LIB= ibverbs SHLIB_MAJOR= 1 SHLIBDIR?= /usr/lib MK_PROFILE= no -VERSION_MAP= ${.CURDIR}/libibverbs.map +VERSION_MAP= ${_spath}/libibverbs.map -CFLAGS+= -I${.CURDIR} +CFLAGS+= -I${_spath} SRCS= \ cmd.c \ diff --git a/contrib/ofed/libmlx4/Makefile b/lib/ofed/libmlx4/Makefile similarity index 71% rename from contrib/ofed/libmlx4/Makefile rename to lib/ofed/libmlx4/Makefile index d460cc2b670..434c81caba5 100644 --- a/contrib/ofed/libmlx4/Makefile +++ b/lib/ofed/libmlx4/Makefile @@ -1,6 +1,7 @@ # $FreeBSD$ -.PATH: ${.CURDIR} +_spath= ${SRCTOP}/contrib/ofed/libmlx4 +.PATH: ${_spath} SHLIBDIR?= /usr/lib LIB= mlx4 @@ -17,6 +18,6 @@ srq.c \ verbs.c LIBADD= ibverbs pthread -CFLAGS+= -I${.CURDIR} +CFLAGS+= -I${_spath} .include diff --git a/contrib/ofed/libmlx5/Makefile b/lib/ofed/libmlx5/Makefile similarity index 63% rename from contrib/ofed/libmlx5/Makefile rename to lib/ofed/libmlx5/Makefile index 5e54172ca49..5d31f1428ca 100644 --- a/contrib/ofed/libmlx5/Makefile +++ b/lib/ofed/libmlx5/Makefile @@ -1,6 +1,7 @@ # $FreeBSD$ -.PATH: ${.CURDIR} +_spath= ${SRCTOP}/contrib/ofed/libmlx5 +.PATH: ${_spath} SHLIBDIR?= /usr/lib LIB= mlx5 @@ -17,8 +18,8 @@ srq.c \ verbs.c LIBADD= ibverbs pthread -CFLAGS+= -I${.CURDIR} -VERSION_MAP= ${.CURDIR}/libmlx5.map +CFLAGS+= -I${_spath} +VERSION_MAP= ${_spath}/libmlx5.map .include diff --git a/contrib/ofed/opensm/libopensm/Makefile b/lib/ofed/libopensm/Makefile similarity index 59% rename from contrib/ofed/opensm/libopensm/Makefile rename to lib/ofed/libopensm/Makefile index 6e6b688b39b..f272f58116c 100644 --- a/contrib/ofed/opensm/libopensm/Makefile +++ b/lib/ofed/libopensm/Makefile @@ -1,6 +1,7 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../opensm +_spath= ${SRCTOP}/contrib/ofed/opensm/opensm +.PATH: ${_spath} SHLIBDIR?= /usr/lib LIB= opensm @@ -13,8 +14,8 @@ osm_mad_pool.c \ osm_helper.c LIBADD= pthread -CFLAGS+= -I${.CURDIR}/.. -DHAVE_CONFIG_H=1 +CFLAGS+= -I${_spath} -I${_spath}/.. -DHAVE_CONFIG_H=1 CFLAGS+= -I${SYSROOT:U${DESTDIR}}/${INCLUDEDIR}/infiniband -VERSION_MAP= ${.CURDIR}/../opensm/libopensm.map +VERSION_MAP= ${_spath}/libopensm.map .include diff --git a/contrib/ofed/librdmacm/Makefile b/lib/ofed/librdmacm/Makefile similarity index 90% rename from contrib/ofed/librdmacm/Makefile rename to lib/ofed/librdmacm/Makefile index 593315dd611..e7234530e1e 100644 --- a/contrib/ofed/librdmacm/Makefile +++ b/lib/ofed/librdmacm/Makefile @@ -1,12 +1,13 @@ # $FreeBSD$ -.PATH: ${.CURDIR} ${.CURDIR}/man +_spath= ${SRCTOP}/contrib/ofed/librdmacm +.PATH: ${_spath} ${_spath}/man SHLIBDIR?= /usr/lib LIB= rdmacm SHLIB_MAJOR= 1 MK_PROFILE= no -CFLAGS+= -I${.CURDIR} +CFLAGS+= -I${_spath} SRCS= \ acm.c \ @@ -66,6 +67,6 @@ rdma_resolve_route.3 \ rdma_set_option.3 LIBADD= ibverbs -VERSION_MAP= ${.CURDIR}/librdmacm.map +VERSION_MAP= ${_spath}/librdmacm.map .include diff --git a/contrib/ofed/opensm/libvendor/Makefile b/lib/ofed/libvendor/Makefile similarity index 62% rename from contrib/ofed/opensm/libvendor/Makefile rename to lib/ofed/libvendor/Makefile index 9a90fac1428..8405bd11c3c 100644 --- a/contrib/ofed/opensm/libvendor/Makefile +++ b/lib/ofed/libvendor/Makefile @@ -1,6 +1,7 @@ # $FreeBSD$ -.PATH: ${.CURDIR} +_spath= ${SRCTOP}/contrib/ofed/opensm/libvendor +.PATH: ${_spath} SHLIBDIR?= /usr/lib LIB= osmvendor @@ -12,8 +13,8 @@ osm_vendor_ibumad.c \ osm_vendor_ibumad_sa.c LIBADD= ibumad pthread -CFLAGS+= -I${.CURDIR}/.. -DHAVE_CONFIG_H=1 +CFLAGS+= -I${_spath}/.. -DHAVE_CONFIG_H=1 CFLAGS+= -I${SYSROOT:U${DESTDIR}}/${INCLUDEDIR}/infiniband -VERSION_MAP= ${.CURDIR}/libosmvendor.map +VERSION_MAP= ${_spath}/libosmvendor.map .include diff --git a/share/mk/src.libnames.mk b/share/mk/src.libnames.mk index 7dd0575786f..f227353372b 100644 --- a/share/mk/src.libnames.mk +++ b/share/mk/src.libnames.mk @@ -480,18 +480,18 @@ LIBZFS_COREDIR= ${OBJTOP}/cddl/lib/libzfs_core LIBZPOOLDIR= ${OBJTOP}/cddl/lib/libzpool # OFED support -LIBCXGB4DIR= ${OBJTOP}/contrib/ofed/libcxgb4 -LIBIBCMDIR= ${OBJTOP}/contrib/ofed/libibcm -LIBIBMADDIR= ${OBJTOP}/contrib/ofed/libibmad -LIBIBNETDISCDIR=${OBJTOP}/contrib/ofed/libibnetdisc -LIBIBUMADDIR= ${OBJTOP}/contrib/ofed/libibumad -LIBIBVERBSDIR= ${OBJTOP}/contrib/ofed/libibverbs -LIBMLX4DIR= ${OBJTOP}/contrib/ofed/libmlx4 -LIBMLX5DIR= ${OBJTOP}/contrib/ofed/libmlx5 -LIBRDMACMDIR= ${OBJTOP}/contrib/ofed/librdmacm -LIBOSMCOMPDIR= ${OBJTOP}/contrib/ofed/opensm/complib -LIBOPENSMDIR= ${OBJTOP}/contrib/ofed/opensm/libopensm -LIBOSMVENDORDIR=${OBJTOP}/contrib/ofed/opensm/libvendor +LIBCXGB4DIR= ${OBJTOP}/lib/ofed/libcxgb4 +LIBIBCMDIR= ${OBJTOP}/lib/ofed/libibcm +LIBIBMADDIR= ${OBJTOP}/lib/ofed/libibmad +LIBIBNETDISCDIR=${OBJTOP}/lib/ofed/libibnetdisc +LIBIBUMADDIR= ${OBJTOP}/lib/ofed/libibumad +LIBIBVERBSDIR= ${OBJTOP}/lib/ofed/libibverbs +LIBMLX4DIR= ${OBJTOP}/lib/ofed/libmlx4 +LIBMLX5DIR= ${OBJTOP}/lib/ofed/libmlx5 +LIBRDMACMDIR= ${OBJTOP}/lib/ofed/librdmacm +LIBOSMCOMPDIR= ${OBJTOP}/lib/ofed/complib +LIBOPENSMDIR= ${OBJTOP}/lib/ofed/libopensm +LIBOSMVENDORDIR=${OBJTOP}/lib/ofed/libvendor LIBDIALOGDIR= ${OBJTOP}/gnu/lib/libdialog LIBGCOVDIR= ${OBJTOP}/gnu/lib/libgcov diff --git a/usr.bin/Makefile b/usr.bin/Makefile index bf1bf969eb2..283e17c7ee0 100644 --- a/usr.bin/Makefile +++ b/usr.bin/Makefile @@ -306,6 +306,7 @@ SUBDIR.${MK_UTMPX}+= users SUBDIR.${MK_UTMPX}+= who SUBDIR.${MK_SVN}+= svn SUBDIR.${MK_SVNLITE}+= svn +SUBDIR.${MK_OFED}+= ofed # These are normally only handled for build-tools. .if make(clean*) diff --git a/contrib/ofed/usr.lib/1/Makefile b/usr.bin/ofed/Makefile similarity index 54% rename from contrib/ofed/usr.lib/1/Makefile rename to usr.bin/ofed/Makefile index 3203cc96f9b..3069676c9e6 100644 --- a/contrib/ofed/usr.lib/1/Makefile +++ b/usr.bin/ofed/Makefile @@ -1,8 +1,10 @@ # $FreeBSD$ SUBDIR= \ -../../libibcm \ -../../libibumad + libibverbs \ + librdmacm \ + opensm \ + infiniband-diags SUBDIR_PARALLEL= diff --git a/contrib/ofed/infiniband-diags/build/Makefile b/usr.bin/ofed/infiniband-diags/Makefile similarity index 100% rename from contrib/ofed/infiniband-diags/build/Makefile rename to usr.bin/ofed/infiniband-diags/Makefile diff --git a/contrib/ofed/infiniband-diags/build/Makefile.inc b/usr.bin/ofed/infiniband-diags/Makefile.inc similarity index 60% rename from contrib/ofed/infiniband-diags/build/Makefile.inc rename to usr.bin/ofed/infiniband-diags/Makefile.inc index 54b6d80cb63..76bf879f609 100644 --- a/contrib/ofed/infiniband-diags/build/Makefile.inc +++ b/usr.bin/ofed/infiniband-diags/Makefile.inc @@ -1,12 +1,12 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../src ${.CURDIR}/../../man +_spath= ${SRCTOP}/contrib/ofed/infiniband-diags +.PATH: ${_spath}/src ${_spath}/man BINDIR?= /usr/bin SRCS+= ibdiag_common.c ibdiag_sa.c CFLAGS+= -I${SYSROOT:U${DESTDIR}}/${INCLUDEDIR}/infiniband CFLAGS+= -DHAVE_CONFIG_H=1 -CFLAGS+= -I${.CURDIR}/../../ -CFLAGS+= -I${.CURDIR}/../../src +CFLAGS+= -I${_spath} -I${_spath}/src LIBADD+= osmcomp ibmad ibumad diff --git a/contrib/ofed/infiniband-diags/build/dump_fts/Makefile b/usr.bin/ofed/infiniband-diags/dump_fts/Makefile similarity index 100% rename from contrib/ofed/infiniband-diags/build/dump_fts/Makefile rename to usr.bin/ofed/infiniband-diags/dump_fts/Makefile diff --git a/contrib/ofed/infiniband-diags/build/ibaddr/Makefile b/usr.bin/ofed/infiniband-diags/ibaddr/Makefile similarity index 100% rename from contrib/ofed/infiniband-diags/build/ibaddr/Makefile rename to usr.bin/ofed/infiniband-diags/ibaddr/Makefile diff --git a/contrib/ofed/infiniband-diags/build/ibcacheedit/Makefile b/usr.bin/ofed/infiniband-diags/ibcacheedit/Makefile similarity index 100% rename from contrib/ofed/infiniband-diags/build/ibcacheedit/Makefile rename to usr.bin/ofed/infiniband-diags/ibcacheedit/Makefile diff --git a/contrib/ofed/infiniband-diags/build/ibccconfig/Makefile b/usr.bin/ofed/infiniband-diags/ibccconfig/Makefile similarity index 100% rename from contrib/ofed/infiniband-diags/build/ibccconfig/Makefile rename to usr.bin/ofed/infiniband-diags/ibccconfig/Makefile diff --git a/contrib/ofed/infiniband-diags/build/ibccquery/Makefile b/usr.bin/ofed/infiniband-diags/ibccquery/Makefile similarity index 100% rename from contrib/ofed/infiniband-diags/build/ibccquery/Makefile rename to usr.bin/ofed/infiniband-diags/ibccquery/Makefile diff --git a/contrib/ofed/infiniband-diags/build/iblinkinfo/Makefile b/usr.bin/ofed/infiniband-diags/iblinkinfo/Makefile similarity index 100% rename from contrib/ofed/infiniband-diags/build/iblinkinfo/Makefile rename to usr.bin/ofed/infiniband-diags/iblinkinfo/Makefile diff --git a/contrib/ofed/infiniband-diags/build/ibmirror/Makefile b/usr.bin/ofed/infiniband-diags/ibmirror/Makefile similarity index 100% rename from contrib/ofed/infiniband-diags/build/ibmirror/Makefile rename to usr.bin/ofed/infiniband-diags/ibmirror/Makefile diff --git a/contrib/ofed/infiniband-diags/build/ibnetdiscover/Makefile b/usr.bin/ofed/infiniband-diags/ibnetdiscover/Makefile similarity index 100% rename from contrib/ofed/infiniband-diags/build/ibnetdiscover/Makefile rename to usr.bin/ofed/infiniband-diags/ibnetdiscover/Makefile diff --git a/contrib/ofed/infiniband-diags/build/ibping/Makefile b/usr.bin/ofed/infiniband-diags/ibping/Makefile similarity index 100% rename from contrib/ofed/infiniband-diags/build/ibping/Makefile rename to usr.bin/ofed/infiniband-diags/ibping/Makefile diff --git a/contrib/ofed/infiniband-diags/build/ibportstate/Makefile b/usr.bin/ofed/infiniband-diags/ibportstate/Makefile similarity index 100% rename from contrib/ofed/infiniband-diags/build/ibportstate/Makefile rename to usr.bin/ofed/infiniband-diags/ibportstate/Makefile diff --git a/contrib/ofed/infiniband-diags/build/ibqueryerrors/Makefile b/usr.bin/ofed/infiniband-diags/ibqueryerrors/Makefile similarity index 100% rename from contrib/ofed/infiniband-diags/build/ibqueryerrors/Makefile rename to usr.bin/ofed/infiniband-diags/ibqueryerrors/Makefile diff --git a/contrib/ofed/infiniband-diags/build/ibroute/Makefile b/usr.bin/ofed/infiniband-diags/ibroute/Makefile similarity index 100% rename from contrib/ofed/infiniband-diags/build/ibroute/Makefile rename to usr.bin/ofed/infiniband-diags/ibroute/Makefile diff --git a/contrib/ofed/infiniband-diags/build/ibstat/Makefile b/usr.bin/ofed/infiniband-diags/ibstat/Makefile similarity index 100% rename from contrib/ofed/infiniband-diags/build/ibstat/Makefile rename to usr.bin/ofed/infiniband-diags/ibstat/Makefile diff --git a/contrib/ofed/infiniband-diags/build/ibsysstat/Makefile b/usr.bin/ofed/infiniband-diags/ibsysstat/Makefile similarity index 100% rename from contrib/ofed/infiniband-diags/build/ibsysstat/Makefile rename to usr.bin/ofed/infiniband-diags/ibsysstat/Makefile diff --git a/contrib/ofed/infiniband-diags/build/ibtracert/Makefile b/usr.bin/ofed/infiniband-diags/ibtracert/Makefile similarity index 100% rename from contrib/ofed/infiniband-diags/build/ibtracert/Makefile rename to usr.bin/ofed/infiniband-diags/ibtracert/Makefile diff --git a/contrib/ofed/infiniband-diags/build/perfquery/Makefile b/usr.bin/ofed/infiniband-diags/perfquery/Makefile similarity index 100% rename from contrib/ofed/infiniband-diags/build/perfquery/Makefile rename to usr.bin/ofed/infiniband-diags/perfquery/Makefile diff --git a/contrib/ofed/infiniband-diags/build/saquery/Makefile b/usr.bin/ofed/infiniband-diags/saquery/Makefile similarity index 100% rename from contrib/ofed/infiniband-diags/build/saquery/Makefile rename to usr.bin/ofed/infiniband-diags/saquery/Makefile diff --git a/contrib/ofed/infiniband-diags/build/sminfo/Makefile b/usr.bin/ofed/infiniband-diags/sminfo/Makefile similarity index 100% rename from contrib/ofed/infiniband-diags/build/sminfo/Makefile rename to usr.bin/ofed/infiniband-diags/sminfo/Makefile diff --git a/contrib/ofed/infiniband-diags/build/smpdump/Makefile b/usr.bin/ofed/infiniband-diags/smpdump/Makefile similarity index 100% rename from contrib/ofed/infiniband-diags/build/smpdump/Makefile rename to usr.bin/ofed/infiniband-diags/smpdump/Makefile diff --git a/contrib/ofed/infiniband-diags/build/smpquery/Makefile b/usr.bin/ofed/infiniband-diags/smpquery/Makefile similarity index 100% rename from contrib/ofed/infiniband-diags/build/smpquery/Makefile rename to usr.bin/ofed/infiniband-diags/smpquery/Makefile diff --git a/contrib/ofed/infiniband-diags/build/vendstat/Makefile b/usr.bin/ofed/infiniband-diags/vendstat/Makefile similarity index 100% rename from contrib/ofed/infiniband-diags/build/vendstat/Makefile rename to usr.bin/ofed/infiniband-diags/vendstat/Makefile diff --git a/contrib/ofed/libibverbs/examples/build/Makefile b/usr.bin/ofed/libibverbs/Makefile similarity index 90% rename from contrib/ofed/libibverbs/examples/build/Makefile rename to usr.bin/ofed/libibverbs/Makefile index b2b8ebe54d2..bd164751c9c 100644 --- a/contrib/ofed/libibverbs/examples/build/Makefile +++ b/usr.bin/ofed/libibverbs/Makefile @@ -1,3 +1,5 @@ +# $FreeBSD$ + SUBDIR= \ asyncwatch \ devinfo \ diff --git a/usr.bin/ofed/libibverbs/Makefile.inc b/usr.bin/ofed/libibverbs/Makefile.inc new file mode 100644 index 00000000000..9ed20e6a94b --- /dev/null +++ b/usr.bin/ofed/libibverbs/Makefile.inc @@ -0,0 +1,9 @@ +# $FreeBSD$ + +_spath=${SRCTOP}/contrib/ofed/libibverbs +.PATH: ${_spath}/examples ${_spath}/man + +BINDIR?= /usr/bin +CFLAGS+= -I${_spath} +LIBADD+= ibverbs mlx4 mlx5 cxgb4 pthread + diff --git a/contrib/ofed/libibverbs/examples/build/asyncwatch/Makefile b/usr.bin/ofed/libibverbs/asyncwatch/Makefile similarity index 67% rename from contrib/ofed/libibverbs/examples/build/asyncwatch/Makefile rename to usr.bin/ofed/libibverbs/asyncwatch/Makefile index cf3eb15bde1..c82c0024d57 100644 --- a/contrib/ofed/libibverbs/examples/build/asyncwatch/Makefile +++ b/usr.bin/ofed/libibverbs/asyncwatch/Makefile @@ -1,5 +1,4 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../.. ${.CURDIR}/../../../man PROG= ibv_asyncwatch MAN= ibv_asyncwatch.1 diff --git a/contrib/ofed/libibverbs/examples/build/devices/Makefile b/usr.bin/ofed/libibverbs/devices/Makefile similarity index 66% rename from contrib/ofed/libibverbs/examples/build/devices/Makefile rename to usr.bin/ofed/libibverbs/devices/Makefile index 9c981d33a54..c2440ff40a9 100644 --- a/contrib/ofed/libibverbs/examples/build/devices/Makefile +++ b/usr.bin/ofed/libibverbs/devices/Makefile @@ -1,5 +1,4 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../.. ${.CURDIR}/../../../man PROG= ibv_devices MAN= ibv_devices.1 diff --git a/contrib/ofed/libibverbs/examples/build/devinfo/Makefile b/usr.bin/ofed/libibverbs/devinfo/Makefile similarity index 65% rename from contrib/ofed/libibverbs/examples/build/devinfo/Makefile rename to usr.bin/ofed/libibverbs/devinfo/Makefile index 8ecd9c745a2..83a61318fae 100644 --- a/contrib/ofed/libibverbs/examples/build/devinfo/Makefile +++ b/usr.bin/ofed/libibverbs/devinfo/Makefile @@ -1,5 +1,4 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../.. ${.CURDIR}/../../../man PROG= ibv_devinfo MAN= ibv_devinfo.1 diff --git a/contrib/ofed/libibverbs/examples/build/rc_pingpong/Makefile b/usr.bin/ofed/libibverbs/rc_pingpong/Makefile similarity index 70% rename from contrib/ofed/libibverbs/examples/build/rc_pingpong/Makefile rename to usr.bin/ofed/libibverbs/rc_pingpong/Makefile index 2abc22bdf94..4145967dd0a 100644 --- a/contrib/ofed/libibverbs/examples/build/rc_pingpong/Makefile +++ b/usr.bin/ofed/libibverbs/rc_pingpong/Makefile @@ -1,5 +1,4 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../.. ${.CURDIR}/../../../man PROG= ibv_rc_pingpong MAN= ibv_rc_pingpong.1 diff --git a/contrib/ofed/libibverbs/examples/build/srq_pingpong/Makefile b/usr.bin/ofed/libibverbs/srq_pingpong/Makefile similarity index 70% rename from contrib/ofed/libibverbs/examples/build/srq_pingpong/Makefile rename to usr.bin/ofed/libibverbs/srq_pingpong/Makefile index 460ec9a6cd2..ee2a6e07dac 100644 --- a/contrib/ofed/libibverbs/examples/build/srq_pingpong/Makefile +++ b/usr.bin/ofed/libibverbs/srq_pingpong/Makefile @@ -1,5 +1,4 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../.. ${.CURDIR}/../../../man PROG= ibv_srq_pingpong MAN= ibv_srq_pingpong.1 diff --git a/contrib/ofed/libibverbs/examples/build/uc_pingpong/Makefile b/usr.bin/ofed/libibverbs/uc_pingpong/Makefile similarity index 70% rename from contrib/ofed/libibverbs/examples/build/uc_pingpong/Makefile rename to usr.bin/ofed/libibverbs/uc_pingpong/Makefile index 8e4b61758db..8740e706297 100644 --- a/contrib/ofed/libibverbs/examples/build/uc_pingpong/Makefile +++ b/usr.bin/ofed/libibverbs/uc_pingpong/Makefile @@ -1,5 +1,4 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../.. ${.CURDIR}/../../../man PROG= ibv_uc_pingpong MAN= ibv_uc_pingpong.1 diff --git a/contrib/ofed/libibverbs/examples/build/ud_pingpong/Makefile b/usr.bin/ofed/libibverbs/ud_pingpong/Makefile similarity index 70% rename from contrib/ofed/libibverbs/examples/build/ud_pingpong/Makefile rename to usr.bin/ofed/libibverbs/ud_pingpong/Makefile index f2f967acecf..7a153f5395a 100644 --- a/contrib/ofed/libibverbs/examples/build/ud_pingpong/Makefile +++ b/usr.bin/ofed/libibverbs/ud_pingpong/Makefile @@ -1,5 +1,4 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../.. ${.CURDIR}/../../../man PROG= ibv_ud_pingpong MAN= ibv_ud_pingpong.1 diff --git a/contrib/ofed/librdmacm/examples/build/Makefile b/usr.bin/ofed/librdmacm/Makefile similarity index 100% rename from contrib/ofed/librdmacm/examples/build/Makefile rename to usr.bin/ofed/librdmacm/Makefile diff --git a/usr.bin/ofed/librdmacm/Makefile.inc b/usr.bin/ofed/librdmacm/Makefile.inc new file mode 100644 index 00000000000..d407c8ff968 --- /dev/null +++ b/usr.bin/ofed/librdmacm/Makefile.inc @@ -0,0 +1,8 @@ +# $FreeBSD$ + +_spath=${SRCTOP}/contrib/ofed/librdmacm +.PATH: ${_spath}/examples ${_spath}/man + +BINDIR?= /usr/bin +CFLAGS+= -I${SRCTOP}/contrib/ofed +LIBADD+= ibverbs rdmacm mlx4 mlx5 cxgb4 pthread diff --git a/contrib/ofed/librdmacm/examples/build/mckey/Makefile b/usr.bin/ofed/librdmacm/mckey/Makefile similarity index 60% rename from contrib/ofed/librdmacm/examples/build/mckey/Makefile rename to usr.bin/ofed/librdmacm/mckey/Makefile index 17f3b573991..f0dd7f023fe 100644 --- a/contrib/ofed/librdmacm/examples/build/mckey/Makefile +++ b/usr.bin/ofed/librdmacm/mckey/Makefile @@ -1,7 +1,5 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../.. ${.CURDIR}/../../../man - PROG= mckey MAN= mckey.1 SRCS= mckey.c diff --git a/contrib/ofed/librdmacm/examples/build/rping/Makefile b/usr.bin/ofed/librdmacm/rping/Makefile similarity index 63% rename from contrib/ofed/librdmacm/examples/build/rping/Makefile rename to usr.bin/ofed/librdmacm/rping/Makefile index 93f608ca742..1112357558f 100644 --- a/contrib/ofed/librdmacm/examples/build/rping/Makefile +++ b/usr.bin/ofed/librdmacm/rping/Makefile @@ -1,7 +1,5 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../.. ${.CURDIR}/../../../man - PROG= rping MAN= rping.1 SRCS= rping.c common.c diff --git a/contrib/ofed/librdmacm/examples/build/ucmatose/Makefile b/usr.bin/ofed/librdmacm/ucmatose/Makefile similarity index 65% rename from contrib/ofed/librdmacm/examples/build/ucmatose/Makefile rename to usr.bin/ofed/librdmacm/ucmatose/Makefile index 22a88fac61e..9f984a8a49a 100644 --- a/contrib/ofed/librdmacm/examples/build/ucmatose/Makefile +++ b/usr.bin/ofed/librdmacm/ucmatose/Makefile @@ -1,7 +1,5 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../.. ${.CURDIR}/../../../man - PROG= ucmatose MAN= ucmatose.1 SRCS= cmatose.c common.c diff --git a/contrib/ofed/librdmacm/examples/build/udaddy/Makefile b/usr.bin/ofed/librdmacm/udaddy/Makefile similarity index 64% rename from contrib/ofed/librdmacm/examples/build/udaddy/Makefile rename to usr.bin/ofed/librdmacm/udaddy/Makefile index 8bb39c16ddf..df8f86de428 100644 --- a/contrib/ofed/librdmacm/examples/build/udaddy/Makefile +++ b/usr.bin/ofed/librdmacm/udaddy/Makefile @@ -1,7 +1,5 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../.. ${.CURDIR}/../../../man - PROG= udaddy MAN= udaddy.1 SRCS= udaddy.c common.c diff --git a/contrib/ofed/opensm/opensm/Makefile b/usr.bin/ofed/opensm/Makefile similarity index 93% rename from contrib/ofed/opensm/opensm/Makefile rename to usr.bin/ofed/opensm/Makefile index a22d2fb6573..2c1f504dc19 100644 --- a/contrib/ofed/opensm/opensm/Makefile +++ b/usr.bin/ofed/opensm/Makefile @@ -1,6 +1,7 @@ # $FreeBSD$ -.PATH: ${.CURDIR} ${.CURDIR}/../man +_spath= ${SRCTOP}/contrib/ofed/opensm/opensm +.PATH: ${_spath} ${_spath:H}/man BINDIR?= /usr/bin PROG= opensm @@ -94,7 +95,7 @@ osm_vl_arb_rcv.c \ st.c MAN= opensm.8 -CFLAGS+= -I${.CURDIR}/.. -DHAVE_CONFIG_H=1 +CFLAGS+= -I${_spath:H} -DHAVE_CONFIG_H=1 CFLAGS+= -I${SYSROOT:U${DESTDIR}}/${INCLUDEDIR}/infiniband LIBADD= opensm osmvendor osmcomp wrap pthread -- 2.45.0