Rework ofed build.

Aligns the build with the FreeBSD traditional approach to not build in
contrib/, and to track inter-dependencies between libraries.

With help from:	bdrewery
Reviewed by:	bdrewery, hselasky
Sponsored by:	Mellanox Technologies
MFC after:	2 weeks
Differential revision:	https://reviews.freebsd.org/D15648
This commit is contained in:
Konstantin Belousov 2018-06-16 15:05:05 +00:00
parent 20efcfc602
commit f39bffc62c
67 changed files with 148 additions and 179 deletions

View File

@ -274,9 +274,6 @@ SUBDIR+=sys usr.bin usr.sbin
.if ${MK_TESTS} != "no" .if ${MK_TESTS} != "no"
SUBDIR+= tests SUBDIR+= tests
.endif .endif
.if ${MK_OFED} != "no"
SUBDIR+=contrib/ofed
.endif
# Local directories are built in parallel with the base system directories. # Local directories are built in parallel with the base system directories.
# Users may insert a .WAIT directive at the beginning or elsewhere within # Users may insert a .WAIT directive at the beginning or elsewhere within
@ -2462,24 +2459,16 @@ _lib_libradius= lib/libradius
.endif .endif
.if ${MK_OFED} != "no" .if ${MK_OFED} != "no"
# _prebuild_libs+= \
# The OFED libraries are built in four steps lib/ofed/libibverbs \
# as reflected below, due to interdependencies. lib/ofed/libibmad \
# lib/ofed/libibumad \
# NOTE: Depending on contrib/ofed/include is only needed for lib/ofed/complib \
# the lib32 compat build. lib/ofed/libmlx5
#
_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
contrib/ofed/usr.lib/0__L: contrib/ofed/include__L lib/libthr__L lib/ofed/libibmad__L: lib/ofed/libibumad__L
contrib/ofed/usr.lib/1__L: contrib/ofed/usr.lib/0__L lib/ofed/complib__L: lib/libthr__L
contrib/ofed/usr.lib/2__L: contrib/ofed/usr.lib/1__L lib/ofed/libmlx5__L: lib/ofed/libibverbs__L lib/libthr__L
contrib/ofed/usr.lib/3__L: contrib/ofed/usr.lib/2__L
.endif .endif
.if ${MK_CASPER} != "no" .if ${MK_CASPER} != "no"
@ -2490,7 +2479,7 @@ lib/libpjdlog__L: lib/libutil__L
lib/libcasper__L: lib/libnv__L lib/libcasper__L: lib/libnv__L
lib/liblzma__L: lib/libthr__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
.if ${MK_IPFILTER} != "no" .if ${MK_IPFILTER} != "no"
_generic_libs+= sbin/ipf/libipf _generic_libs+= sbin/ipf/libipf
.endif .endif

View File

@ -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 <bsd.subdir.mk>

View File

@ -1,4 +0,0 @@
BINDIR?= /usr/bin
CFLAGS+= -I${.CURDIR}/../../..
LDFLAGS+= -libverbs -lmlx4 -lmlx5 -lcxgb4 -lpthread

View File

@ -1,3 +0,0 @@
BINDIR?= /usr/bin
CFLAGS+= -I${.CURDIR}/../../..
LDFLAGS+= -libverbs -lrdmacm -lmlx4 -lmlx5 -lcxgb4 -lpthread

View File

@ -1,11 +0,0 @@
# $FreeBSD$
SUBDIR= \
../libibverbs/examples/build \
../librdmacm/examples/build \
../opensm/opensm \
../infiniband-diags/build
SUBDIR_PARALLEL=
.include <bsd.subdir.mk>

View File

@ -1,8 +0,0 @@
# $FreeBSD$
SUBDIR= \
../../libibverbs
SUBDIR_PARALLEL=
.include <bsd.subdir.mk>

View File

@ -1,14 +0,0 @@
# $FreeBSD$
SUBDIR= \
../../librdmacm \
../../libibmad \
../../opensm/complib \
../../opensm/libvendor \
../../libcxgb4 \
../../libmlx4 \
../../libmlx5
SUBDIR_PARALLEL=
.include <bsd.subdir.mk>

View File

@ -1,10 +0,0 @@
# $FreeBSD$
SUBDIR= \
../../libibnetdisc \
../../opensm/libopensm \
../../../../lib/libpcap
SUBDIR_PARALLEL=
.include <bsd.subdir.mk>

View File

@ -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 <bsd.subdir.mk>

View File

@ -67,7 +67,7 @@ SUBDIR= ${SUBDIR_BOOTSTRAP} \
libopie \ libopie \
libpam \ libpam \
libpathconv \ libpathconv \
${_libpcap} \ libpcap \
libpjdlog \ libpjdlog \
${_libproc} \ ${_libproc} \
libprocstat \ libprocstat \
@ -124,6 +124,9 @@ SUBDIR_DEPEND_libtacplus= libmd
SUBDIR_DEPEND_libulog= libmd SUBDIR_DEPEND_libulog= libmd
SUBDIR_DEPEND_libunbound= ${_libldns} SUBDIR_DEPEND_libunbound= ${_libldns}
SUBDIR_DEPEND_liblzma= ${_libthr} SUBDIR_DEPEND_liblzma= ${_libthr}
.if ${MK_OFED} != "no"
SUBDIR_DEPEND_libpcap= ofed
.endif
# NB: keep these sorted by MK_* knobs # NB: keep these sorted by MK_* knobs
@ -184,14 +187,6 @@ SUBDIR.${MK_PMC}+= libipt
SUBDIR.${MK_BHYVE}+= libvmmapi SUBDIR.${MK_BHYVE}+= libvmmapi
.endif .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} != "sparc64" .if ${MACHINE_CPUARCH} != "sparc64"
_libproc= libproc _libproc= libproc
_librtld_db= librtld_db _librtld_db= librtld_db
@ -212,6 +207,7 @@ SUBDIR.${MK_TESTS_SUPPORT}+= atf
SUBDIR.${MK_TESTS}+= tests SUBDIR.${MK_TESTS}+= tests
SUBDIR.${MK_UNBOUND}+= libunbound SUBDIR.${MK_UNBOUND}+= libunbound
SUBDIR.${MK_USB}+= libusbhid libusb SUBDIR.${MK_USB}+= libusbhid libusb
SUBDIR.${MK_OFED}+= ofed
.if !make(install) .if !make(install)
SUBDIR_PARALLEL= SUBDIR_PARALLEL=

30
lib/ofed/Makefile Normal file
View File

@ -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 <bsd.subdir.mk>

1
lib/ofed/Makefile.inc Normal file
View File

@ -0,0 +1 @@
# $FreeBSD$

View File

@ -1,6 +1,7 @@
# $FreeBSD$ # $FreeBSD$
.PATH: ${.CURDIR} _spath= ${SRCTOP}/contrib/ofed/opensm/complib
.PATH: ${_spath}
SHLIBDIR?= /usr/lib SHLIBDIR?= /usr/lib
LIB= osmcomp LIB= osmcomp
@ -26,9 +27,9 @@ cl_timer.c \
cl_vector.c \ cl_vector.c \
ib_statustext.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 CFLAGS+= -I${SYSROOT:U${DESTDIR}}/${INCLUDEDIR}/infiniband
LIBADD= pthread LIBADD= pthread
VERSION_MAP= ${.CURDIR}/libosmcomp.map VERSION_MAP= ${_spath}/libosmcomp.map
.include <bsd.lib.mk> .include <bsd.lib.mk>

View File

@ -1,20 +1,21 @@
# $FreeBSD$ # $FreeBSD$
IBVERBS= ${.CURDIR}/../libibverbs OFEDINCS= ${SRCTOP}/contrib/ofed/include
IBMAD= ${.CURDIR}/../libibmad IBVERBS= ${SRCTOP}/contrib/ofed/libibverbs
IBUMAD= ${.CURDIR}/../libibumad IBMAD= ${SRCTOP}/contrib/ofed/libibmad
IBCM= ${.CURDIR}/../libibcm IBUMAD= ${SRCTOP}/contrib/ofed/libibumad
IBND= ${.CURDIR}/../libibnetdisc IBCM= ${SRCTOP}/contrib/ofed/libibcm
RDMACM= ${.CURDIR}/../librdmacm IBND= ${SRCTOP}/contrib/ofed/libibnetdisc
RDMA= ${.CURDIR}/../../../sys/ofed/include/uapi/rdma RDMACM= ${SRCTOP}/contrib/ofed/librdmacm
OSM= ${.CURDIR}/../opensm/include RDMA= ${SRCTOP}/sys/ofed/include/uapi/rdma
OSM= ${SRCTOP}/contrib/ofed/opensm/include
IBINCS= \ IBINCS= \
byteorder.h \ ${OFEDINCS}/byteorder.h \
byteswap.h \ ${OFEDINCS}/byteswap.h \
endian.h \ ${OFEDINCS}/endian.h \
types.h \ ${OFEDINCS}/types.h \
udma_barrier.h \ ${OFEDINCS}/udma_barrier.h \
${IBVERBS}/arch.h \ ${IBVERBS}/arch.h \
${IBVERBS}/driver.h \ ${IBVERBS}/driver.h \
${IBVERBS}/kern-abi.h \ ${IBVERBS}/kern-abi.h \

View File

@ -1,6 +1,7 @@
# $FreeBSD$ # $FreeBSD$
.PATH: ${.CURDIR} _spath= ${SRCTOP}/contrib/ofed/libcxgb4
.PATH: ${_spath}
SHLIBDIR?= /usr/lib SHLIBDIR?= /usr/lib
LIB= cxgb4 LIB= cxgb4
@ -14,6 +15,6 @@ qp.c \
verbs.c verbs.c
LIBADD= ibverbs pthread LIBADD= ibverbs pthread
CFLAGS+= -I${.CURDIR} CFLAGS+= -I${_spath}
.include <bsd.lib.mk> .include <bsd.lib.mk>

View File

@ -1,6 +1,7 @@
# $FreeBSD$ # $FreeBSD$
.PATH: ${.CURDIR} _spath= ${SRCTOP}/contrib/ofed/libibcm
.PATH: ${_spath}
SHLIBDIR?= /usr/lib SHLIBDIR?= /usr/lib
LIB= ibcm LIB= ibcm
@ -8,8 +9,8 @@ SHLIB_MAJOR= 1
MK_PROFILE= no MK_PROFILE= no
SRCS= cm.c SRCS= cm.c
LIBADD= ibverbs LIBADD= ibverbs
CFLAGS+= -I${.CURDIR} CFLAGS+= -I${_spath}
MAN= MAN=
VERSION_MAP= ${.CURDIR}/libibcm.map VERSION_MAP= ${_spath}/libibcm.map
.include <bsd.lib.mk> .include <bsd.lib.mk>

View File

@ -1,6 +1,7 @@
# $FreeBSD$ # $FreeBSD$
.PATH: ${.CURDIR} _spath= ${SRCTOP}/contrib/ofed/libibmad
.PATH: ${_spath}
SHLIBDIR?= /usr/lib SHLIBDIR?= /usr/lib
LIB= ibmad LIB= ibmad
@ -25,8 +26,8 @@ vendor.c
LIBADD= ibumad LIBADD= ibumad
CFLAGS+= -DHAVE_CONFIG_H=1 CFLAGS+= -DHAVE_CONFIG_H=1
CFLAGS+= -I${.CURDIR} CFLAGS+= -I${_spath}
VERSION_MAP= ${.CURDIR}/libibmad.map VERSION_MAP= ${_spath}/libibmad.map
.include <bsd.lib.mk> .include <bsd.lib.mk>

View File

@ -2,7 +2,8 @@
.include <src.opts.mk> .include <src.opts.mk>
.PATH: ${.CURDIR} ${.CURDIR}/man _spath= ${SRCTOP}/contrib/ofed/libibnetdisc
.PATH: ${_spath} ${_spath}/man
SHLIBDIR?= /usr/lib SHLIBDIR?= /usr/lib
LIB_CXX= ibnetdisc LIB_CXX= ibnetdisc
@ -28,11 +29,11 @@ ibnd_show_progress.3
LIBADD= osmcomp ibmad ibumad LIBADD= osmcomp ibmad ibumad
CFLAGS+= -DHAVE_CONFIG_H=1 CFLAGS+= -DHAVE_CONFIG_H=1
CFLAGS+= -I${.CURDIR} CFLAGS+= -I${_spath}
CFLAGS+= -I${SYSROOT:U${DESTDIR}}/${INCLUDEDIR}/infiniband CFLAGS+= -I${SYSROOT:U${DESTDIR}}/${INCLUDEDIR}/infiniband
.if ${COMPILER_FEATURES:Mc++11} .if ${COMPILER_FEATURES:Mc++11}
CXXFLAGS+= -std=c++11 CXXFLAGS+= -std=c++11
.endif .endif
VERSION_MAP= ${.CURDIR}/libibnetdisc.map VERSION_MAP= ${_spath}/libibnetdisc.map
.include <bsd.lib.mk> .include <bsd.lib.mk>

View File

@ -1,6 +1,7 @@
# $FreeBSD$ # $FreeBSD$
.PATH: ${.CURDIR} _spath= ${SRCTOP}/contrib/ofed/libibumad
.PATH: ${_spath}
SHLIBDIR?= /usr/lib SHLIBDIR?= /usr/lib
LIB= ibumad LIB= ibumad
@ -10,7 +11,7 @@ SRCS= \
umad.c \ umad.c \
umad_str.c \ umad_str.c \
sysfs.c sysfs.c
CFLAGS+= -I${.CURDIR} CFLAGS+= -I${_spath}
VERSION_MAP= ${.CURDIR}/libibumad.map VERSION_MAP= ${_spath}/libibumad.map
.include <bsd.lib.mk> .include <bsd.lib.mk>

View File

@ -1,14 +1,15 @@
# $FreeBSD$ # $FreeBSD$
.PATH: ${.CURDIR} ${.CURDIR}/man _spath= ${SRCTOP}/contrib/ofed/libibverbs
.PATH: ${_spath} ${_spath}/man
LIB= ibverbs LIB= ibverbs
SHLIB_MAJOR= 1 SHLIB_MAJOR= 1
SHLIBDIR?= /usr/lib SHLIBDIR?= /usr/lib
MK_PROFILE= no MK_PROFILE= no
VERSION_MAP= ${.CURDIR}/libibverbs.map VERSION_MAP= ${_spath}/libibverbs.map
CFLAGS+= -I${.CURDIR} CFLAGS+= -I${_spath}
SRCS= \ SRCS= \
cmd.c \ cmd.c \

View File

@ -1,6 +1,7 @@
# $FreeBSD$ # $FreeBSD$
.PATH: ${.CURDIR} _spath= ${SRCTOP}/contrib/ofed/libmlx4
.PATH: ${_spath}
SHLIBDIR?= /usr/lib SHLIBDIR?= /usr/lib
LIB= mlx4 LIB= mlx4
@ -17,6 +18,6 @@ srq.c \
verbs.c verbs.c
LIBADD= ibverbs pthread LIBADD= ibverbs pthread
CFLAGS+= -I${.CURDIR} CFLAGS+= -I${_spath}
.include <bsd.lib.mk> .include <bsd.lib.mk>

View File

@ -1,6 +1,7 @@
# $FreeBSD$ # $FreeBSD$
.PATH: ${.CURDIR} _spath= ${SRCTOP}/contrib/ofed/libmlx5
.PATH: ${_spath}
SHLIBDIR?= /usr/lib SHLIBDIR?= /usr/lib
LIB= mlx5 LIB= mlx5
@ -17,8 +18,8 @@ srq.c \
verbs.c verbs.c
LIBADD= ibverbs pthread LIBADD= ibverbs pthread
CFLAGS+= -I${.CURDIR} CFLAGS+= -I${_spath}
VERSION_MAP= ${.CURDIR}/libmlx5.map VERSION_MAP= ${_spath}/libmlx5.map
.include <bsd.lib.mk> .include <bsd.lib.mk>

View File

@ -1,6 +1,7 @@
# $FreeBSD$ # $FreeBSD$
.PATH: ${.CURDIR}/../opensm _spath= ${SRCTOP}/contrib/ofed/opensm/opensm
.PATH: ${_spath}
SHLIBDIR?= /usr/lib SHLIBDIR?= /usr/lib
LIB= opensm LIB= opensm
@ -13,8 +14,8 @@ osm_mad_pool.c \
osm_helper.c osm_helper.c
LIBADD= pthread 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 CFLAGS+= -I${SYSROOT:U${DESTDIR}}/${INCLUDEDIR}/infiniband
VERSION_MAP= ${.CURDIR}/../opensm/libopensm.map VERSION_MAP= ${_spath}/libopensm.map
.include <bsd.lib.mk> .include <bsd.lib.mk>

View File

@ -1,12 +1,13 @@
# $FreeBSD$ # $FreeBSD$
.PATH: ${.CURDIR} ${.CURDIR}/man _spath= ${SRCTOP}/contrib/ofed/librdmacm
.PATH: ${_spath} ${_spath}/man
SHLIBDIR?= /usr/lib SHLIBDIR?= /usr/lib
LIB= rdmacm LIB= rdmacm
SHLIB_MAJOR= 1 SHLIB_MAJOR= 1
MK_PROFILE= no MK_PROFILE= no
CFLAGS+= -I${.CURDIR} CFLAGS+= -I${_spath}
SRCS= \ SRCS= \
acm.c \ acm.c \
@ -66,6 +67,6 @@ rdma_resolve_route.3 \
rdma_set_option.3 rdma_set_option.3
LIBADD= ibverbs LIBADD= ibverbs
VERSION_MAP= ${.CURDIR}/librdmacm.map VERSION_MAP= ${_spath}/librdmacm.map
.include <bsd.lib.mk> .include <bsd.lib.mk>

View File

@ -1,6 +1,7 @@
# $FreeBSD$ # $FreeBSD$
.PATH: ${.CURDIR} _spath= ${SRCTOP}/contrib/ofed/opensm/libvendor
.PATH: ${_spath}
SHLIBDIR?= /usr/lib SHLIBDIR?= /usr/lib
LIB= osmvendor LIB= osmvendor
@ -12,8 +13,8 @@ osm_vendor_ibumad.c \
osm_vendor_ibumad_sa.c osm_vendor_ibumad_sa.c
LIBADD= ibumad pthread LIBADD= ibumad pthread
CFLAGS+= -I${.CURDIR}/.. -DHAVE_CONFIG_H=1 CFLAGS+= -I${_spath}/.. -DHAVE_CONFIG_H=1
CFLAGS+= -I${SYSROOT:U${DESTDIR}}/${INCLUDEDIR}/infiniband CFLAGS+= -I${SYSROOT:U${DESTDIR}}/${INCLUDEDIR}/infiniband
VERSION_MAP= ${.CURDIR}/libosmvendor.map VERSION_MAP= ${_spath}/libosmvendor.map
.include <bsd.lib.mk> .include <bsd.lib.mk>

View File

@ -492,18 +492,18 @@ LIBZFS_COREDIR= ${OBJTOP}/cddl/lib/libzfs_core
LIBZPOOLDIR= ${OBJTOP}/cddl/lib/libzpool LIBZPOOLDIR= ${OBJTOP}/cddl/lib/libzpool
# OFED support # OFED support
LIBCXGB4DIR= ${OBJTOP}/contrib/ofed/libcxgb4 LIBCXGB4DIR= ${OBJTOP}/lib/ofed/libcxgb4
LIBIBCMDIR= ${OBJTOP}/contrib/ofed/libibcm LIBIBCMDIR= ${OBJTOP}/lib/ofed/libibcm
LIBIBMADDIR= ${OBJTOP}/contrib/ofed/libibmad LIBIBMADDIR= ${OBJTOP}/lib/ofed/libibmad
LIBIBNETDISCDIR=${OBJTOP}/contrib/ofed/libibnetdisc LIBIBNETDISCDIR=${OBJTOP}/lib/ofed/libibnetdisc
LIBIBUMADDIR= ${OBJTOP}/contrib/ofed/libibumad LIBIBUMADDIR= ${OBJTOP}/lib/ofed/libibumad
LIBIBVERBSDIR= ${OBJTOP}/contrib/ofed/libibverbs LIBIBVERBSDIR= ${OBJTOP}/lib/ofed/libibverbs
LIBMLX4DIR= ${OBJTOP}/contrib/ofed/libmlx4 LIBMLX4DIR= ${OBJTOP}/lib/ofed/libmlx4
LIBMLX5DIR= ${OBJTOP}/contrib/ofed/libmlx5 LIBMLX5DIR= ${OBJTOP}/lib/ofed/libmlx5
LIBRDMACMDIR= ${OBJTOP}/contrib/ofed/librdmacm LIBRDMACMDIR= ${OBJTOP}/lib/ofed/librdmacm
LIBOSMCOMPDIR= ${OBJTOP}/contrib/ofed/opensm/complib LIBOSMCOMPDIR= ${OBJTOP}/lib/ofed/complib
LIBOPENSMDIR= ${OBJTOP}/contrib/ofed/opensm/libopensm LIBOPENSMDIR= ${OBJTOP}/lib/ofed/libopensm
LIBOSMVENDORDIR=${OBJTOP}/contrib/ofed/opensm/libvendor LIBOSMVENDORDIR=${OBJTOP}/lib/ofed/libvendor
LIBDIALOGDIR= ${OBJTOP}/gnu/lib/libdialog LIBDIALOGDIR= ${OBJTOP}/gnu/lib/libdialog
LIBGCOVDIR= ${OBJTOP}/gnu/lib/libgcov LIBGCOVDIR= ${OBJTOP}/gnu/lib/libgcov

View File

@ -292,6 +292,7 @@ SUBDIR.${MK_UTMPX}+= users
SUBDIR.${MK_UTMPX}+= who SUBDIR.${MK_UTMPX}+= who
SUBDIR.${MK_SVN}+= svn SUBDIR.${MK_SVN}+= svn
SUBDIR.${MK_SVNLITE}+= svn SUBDIR.${MK_SVNLITE}+= svn
SUBDIR.${MK_OFED}+= ofed
# These are normally only handled for build-tools. # These are normally only handled for build-tools.
.if make(clean*) .if make(clean*)

View File

@ -1,8 +1,10 @@
# $FreeBSD$ # $FreeBSD$
SUBDIR= \ SUBDIR= \
../../libibcm \ libibverbs \
../../libibumad librdmacm \
opensm \
infiniband-diags
SUBDIR_PARALLEL= SUBDIR_PARALLEL=

View File

@ -1,12 +1,12 @@
# $FreeBSD$ # $FreeBSD$
.PATH: ${.CURDIR}/../../src ${.CURDIR}/../../man _spath= ${SRCTOP}/contrib/ofed/infiniband-diags
.PATH: ${_spath}/src ${_spath}/man
BINDIR?= /usr/bin BINDIR?= /usr/bin
SRCS+= ibdiag_common.c ibdiag_sa.c SRCS+= ibdiag_common.c ibdiag_sa.c
CFLAGS+= -I${SYSROOT:U${DESTDIR}}/${INCLUDEDIR}/infiniband CFLAGS+= -I${SYSROOT:U${DESTDIR}}/${INCLUDEDIR}/infiniband
CFLAGS+= -DHAVE_CONFIG_H=1 CFLAGS+= -DHAVE_CONFIG_H=1
CFLAGS+= -I${.CURDIR}/../../ CFLAGS+= -I${_spath} -I${_spath}/src
CFLAGS+= -I${.CURDIR}/../../src
LIBADD+= osmcomp ibmad ibumad LIBADD+= osmcomp ibmad ibumad

View File

@ -1,3 +1,5 @@
# $FreeBSD$
SUBDIR= \ SUBDIR= \
asyncwatch \ asyncwatch \
devinfo \ devinfo \

View File

@ -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

View File

@ -1,5 +1,4 @@
# $FreeBSD$ # $FreeBSD$
.PATH: ${.CURDIR}/../.. ${.CURDIR}/../../../man
PROG= ibv_asyncwatch PROG= ibv_asyncwatch
MAN= ibv_asyncwatch.1 MAN= ibv_asyncwatch.1

View File

@ -1,5 +1,4 @@
# $FreeBSD$ # $FreeBSD$
.PATH: ${.CURDIR}/../.. ${.CURDIR}/../../../man
PROG= ibv_devices PROG= ibv_devices
MAN= ibv_devices.1 MAN= ibv_devices.1

View File

@ -1,5 +1,4 @@
# $FreeBSD$ # $FreeBSD$
.PATH: ${.CURDIR}/../.. ${.CURDIR}/../../../man
PROG= ibv_devinfo PROG= ibv_devinfo
MAN= ibv_devinfo.1 MAN= ibv_devinfo.1

View File

@ -1,5 +1,4 @@
# $FreeBSD$ # $FreeBSD$
.PATH: ${.CURDIR}/../.. ${.CURDIR}/../../../man
PROG= ibv_rc_pingpong PROG= ibv_rc_pingpong
MAN= ibv_rc_pingpong.1 MAN= ibv_rc_pingpong.1

View File

@ -1,5 +1,4 @@
# $FreeBSD$ # $FreeBSD$
.PATH: ${.CURDIR}/../.. ${.CURDIR}/../../../man
PROG= ibv_srq_pingpong PROG= ibv_srq_pingpong
MAN= ibv_srq_pingpong.1 MAN= ibv_srq_pingpong.1

View File

@ -1,5 +1,4 @@
# $FreeBSD$ # $FreeBSD$
.PATH: ${.CURDIR}/../.. ${.CURDIR}/../../../man
PROG= ibv_uc_pingpong PROG= ibv_uc_pingpong
MAN= ibv_uc_pingpong.1 MAN= ibv_uc_pingpong.1

View File

@ -1,5 +1,4 @@
# $FreeBSD$ # $FreeBSD$
.PATH: ${.CURDIR}/../.. ${.CURDIR}/../../../man
PROG= ibv_ud_pingpong PROG= ibv_ud_pingpong
MAN= ibv_ud_pingpong.1 MAN= ibv_ud_pingpong.1

View File

@ -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

View File

@ -1,7 +1,5 @@
# $FreeBSD$ # $FreeBSD$
.PATH: ${.CURDIR}/../.. ${.CURDIR}/../../../man
PROG= mckey PROG= mckey
MAN= mckey.1 MAN= mckey.1
SRCS= mckey.c SRCS= mckey.c

View File

@ -1,7 +1,5 @@
# $FreeBSD$ # $FreeBSD$
.PATH: ${.CURDIR}/../.. ${.CURDIR}/../../../man
PROG= rping PROG= rping
MAN= rping.1 MAN= rping.1
SRCS= rping.c common.c SRCS= rping.c common.c

View File

@ -1,7 +1,5 @@
# $FreeBSD$ # $FreeBSD$
.PATH: ${.CURDIR}/../.. ${.CURDIR}/../../../man
PROG= ucmatose PROG= ucmatose
MAN= ucmatose.1 MAN= ucmatose.1
SRCS= cmatose.c common.c SRCS= cmatose.c common.c

View File

@ -1,7 +1,5 @@
# $FreeBSD$ # $FreeBSD$
.PATH: ${.CURDIR}/../.. ${.CURDIR}/../../../man
PROG= udaddy PROG= udaddy
MAN= udaddy.1 MAN= udaddy.1
SRCS= udaddy.c common.c SRCS= udaddy.c common.c

View File

@ -1,6 +1,7 @@
# $FreeBSD$ # $FreeBSD$
.PATH: ${.CURDIR} ${.CURDIR}/../man _spath= ${SRCTOP}/contrib/ofed/opensm/opensm
.PATH: ${_spath} ${_spath:H}/man
BINDIR?= /usr/bin BINDIR?= /usr/bin
PROG= opensm PROG= opensm
@ -94,7 +95,7 @@ osm_vl_arb_rcv.c \
st.c st.c
MAN= opensm.8 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 CFLAGS+= -I${SYSROOT:U${DESTDIR}}/${INCLUDEDIR}/infiniband
LIBADD= opensm osmvendor osmcomp wrap pthread LIBADD= opensm osmvendor osmcomp wrap pthread