Index: Makefile.inc1 =================================================================== --- Makefile.inc1 +++ Makefile.inc1 @@ -270,9 +270,6 @@ .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 @@ -2454,24 +2451,17 @@ .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/libvendor + +_ofed_lib= lib/ofed -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/libvendor__L: lib/libthr__L +lib/ofed/libibmad__L: lib/ofed/libibumad__L +lib/ofed__L: lib/libthr__L .endif .if ${MK_CASPER} != "no" Index: Makefile.libcompat =================================================================== --- Makefile.libcompat +++ Makefile.libcompat @@ -149,6 +149,7 @@ _LC_LIBDIRS.${MK_CDDL:tl}+= cddl/lib _LC_LIBDIRS.${MK_CRYPT:tl}+= secure/lib _LC_LIBDIRS.${MK_KERBEROS:tl}+= kerberos5/lib +_LC_LIBDIRS.${MK_OFED:tl}+= lib/ofed/include _LC_INCDIRS= \ include \ Index: contrib/ofed/Makefile =================================================================== --- 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 Index: contrib/ofed/libibcm/Makefile =================================================================== --- contrib/ofed/libibcm/Makefile +++ /dev/null @@ -1,15 +0,0 @@ -# $FreeBSD$ - -.PATH: ${.CURDIR} - -SHLIBDIR?= /usr/lib -LIB= ibcm -SHLIB_MAJOR= 1 -MK_PROFILE= no -SRCS= cm.c -LIBADD= ibverbs -CFLAGS+= -I${.CURDIR} -MAN= -VERSION_MAP= ${.CURDIR}/libibcm.map - -.include Index: contrib/ofed/libibverbs/examples/build/Makefile.inc =================================================================== --- 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 - Index: contrib/ofed/librdmacm/examples/build/Makefile.inc =================================================================== --- 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 Index: contrib/ofed/usr.bin/Makefile =================================================================== --- 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 Index: contrib/ofed/usr.lib/1/Makefile =================================================================== --- contrib/ofed/usr.lib/1/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -# $FreeBSD$ - -SUBDIR= \ -../../libibcm \ -../../libibumad - -SUBDIR_PARALLEL= - -.include Index: contrib/ofed/usr.lib/2/Makefile =================================================================== --- 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 Index: contrib/ofed/usr.lib/3/Makefile =================================================================== --- contrib/ofed/usr.lib/3/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -# $FreeBSD$ - -SUBDIR= \ -../../libibnetdisc \ -../../opensm/libopensm \ -../../../../lib/libpcap - -SUBDIR_PARALLEL= - -.include Index: contrib/ofed/usr.lib/Makefile =================================================================== --- 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 Index: lib/Makefile =================================================================== --- lib/Makefile +++ lib/Makefile @@ -67,7 +67,7 @@ libopie \ libpam \ libpathconv \ - ${_libpcap} \ + libpcap \ libpjdlog \ ${_libproc} \ libprocstat \ @@ -124,6 +124,9 @@ 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 @@ -184,14 +187,6 @@ SUBDIR.${MK_BHYVE}+= libvmmapi .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" _libproc= libproc _librtld_db= librtld_db @@ -211,6 +206,10 @@ SUBDIR.${MK_UNBOUND}+= libunbound SUBDIR.${MK_USB}+= libusbhid libusb +.if ${MK_OFED} != "no" +SUBDIR+= ofed +.endif + .if !make(install) SUBDIR_PARALLEL= .endif Index: lib/libpcap/Makefile =================================================================== --- lib/libpcap/Makefile +++ lib/libpcap/Makefile @@ -147,6 +147,8 @@ .if ${MK_OFED} != "no" SRCS+= pcap-rdmasniff.c +LDADD+= -L${.OBJDIR:H}/ofed/libibverbs +LDADD+= -L${.OBJDIR:H}/ofed/libmlx5 LIBADD+= ibverbs LIBADD+= mlx5 CFLAGS+= -DPCAP_SUPPORT_RDMASNIFF Index: lib/ofed/Makefile =================================================================== --- /dev/null +++ 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 + Index: lib/ofed/complib/Makefile =================================================================== --- lib/ofed/complib/Makefile +++ 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_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 Index: lib/ofed/include/Makefile =================================================================== --- lib/ofed/include/Makefile +++ 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 \ Index: lib/ofed/libcxgb4/Makefile =================================================================== --- lib/ofed/libcxgb4/Makefile +++ lib/ofed/libcxgb4/Makefile @@ -1,6 +1,7 @@ # $FreeBSD$ -.PATH: ${.CURDIR} +_spath= ${SRCTOP}/contrib/ofed/libcxgb4 +.PATH: ${_spath} SHLIBDIR?= /usr/lib LIB= cxgb4 @@ -13,7 +14,8 @@ qp.c \ verbs.c +LDADD+= -L${.OBJDIR:H}/libibverbs LIBADD= ibverbs pthread -CFLAGS+= -I${.CURDIR} +CFLAGS+= -I${_spath} .include Index: lib/ofed/libibcm/Makefile =================================================================== --- /dev/null +++ lib/ofed/libibcm/Makefile @@ -0,0 +1,17 @@ +# $FreeBSD$ + +_spath= ${SRCTOP}/contrib/ofed/libibcm +.PATH: ${_spath} + +SHLIBDIR?= /usr/lib +LIB= ibcm +SHLIB_MAJOR= 1 +MK_PROFILE= no +SRCS= cm.c +LDADD+= -L${.OBJDIR:H}/libibverbs +LIBADD= ibverbs +CFLAGS+= -I${_spath} +MAN= +VERSION_MAP= ${_spath}/libibcm.map + +.include Index: lib/ofed/libibmad/Makefile =================================================================== --- lib/ofed/libibmad/Makefile +++ lib/ofed/libibmad/Makefile @@ -1,6 +1,7 @@ # $FreeBSD$ -.PATH: ${.CURDIR} +_spath= ${SRCTOP}/contrib/ofed/libibmad +.PATH: ${_spath} SHLIBDIR?= /usr/lib LIB= ibmad @@ -23,10 +24,11 @@ smp.c \ vendor.c +LDADD+= -L${.OBJDIR:H}/libibumad LIBADD= ibumad CFLAGS+= -DHAVE_CONFIG_H=1 -CFLAGS+= -I${.CURDIR} -VERSION_MAP= ${.CURDIR}/libibmad.map +CFLAGS+= -I${_spath} +VERSION_MAP= ${_spath}/libibmad.map .include Index: lib/ofed/libibnetdisc/Makefile =================================================================== --- lib/ofed/libibnetdisc/Makefile +++ 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 @@ -26,13 +27,16 @@ ibnd_iter_nodes_type.3 \ ibnd_show_progress.3 +LDADD+= -L${.OBJDIR:H}/libibmad +LDADD+= -L${.OBJDIR:H}/libibumad +LDADD+= -L${.OBJDIR:H}/complib 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 Index: lib/ofed/libibumad/Makefile =================================================================== --- lib/ofed/libibumad/Makefile +++ 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 @@ umad.c \ umad_str.c \ sysfs.c -CFLAGS+= -I${.CURDIR} -VERSION_MAP= ${.CURDIR}/libibumad.map +CFLAGS+= -I${_spath} +VERSION_MAP= ${_spath}/libibumad.map .include Index: lib/ofed/libibverbs/Makefile =================================================================== --- lib/ofed/libibverbs/Makefile +++ 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 \ Index: lib/ofed/libmlx4/Makefile =================================================================== --- lib/ofed/libmlx4/Makefile +++ lib/ofed/libmlx4/Makefile @@ -1,6 +1,7 @@ # $FreeBSD$ -.PATH: ${.CURDIR} +_spath= ${SRCTOP}/contrib/ofed/libmlx4 +.PATH: ${_spath} SHLIBDIR?= /usr/lib LIB= mlx4 @@ -16,7 +17,8 @@ srq.c \ verbs.c +LDADD+= -L${.OBJDIR:H}/libibverbs LIBADD= ibverbs pthread -CFLAGS+= -I${.CURDIR} +CFLAGS+= -I${_spath} .include Index: lib/ofed/libmlx5/Makefile =================================================================== --- lib/ofed/libmlx5/Makefile +++ lib/ofed/libmlx5/Makefile @@ -1,6 +1,7 @@ # $FreeBSD$ -.PATH: ${.CURDIR} +_spath= ${SRCTOP}/contrib/ofed/libmlx5 +.PATH: ${_spath} SHLIBDIR?= /usr/lib LIB= mlx5 @@ -16,9 +17,10 @@ srq.c \ verbs.c +LDADD+= -L${.OBJDIR:H}/libibverbs LIBADD= ibverbs pthread -CFLAGS+= -I${.CURDIR} -VERSION_MAP= ${.CURDIR}/libmlx5.map +CFLAGS+= -I${_spath} +VERSION_MAP= ${_spath}/libmlx5.map .include Index: lib/ofed/libopensm/Makefile =================================================================== --- lib/ofed/libopensm/Makefile +++ 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_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 Index: lib/ofed/librdmacm/Makefile =================================================================== --- lib/ofed/librdmacm/Makefile +++ 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 \ @@ -65,7 +66,8 @@ rdma_resolve_route.3 \ rdma_set_option.3 +LDADD+= -L${.OBJDIR:H}/libibverbs LIBADD= ibverbs -VERSION_MAP= ${.CURDIR}/librdmacm.map +VERSION_MAP= ${_spath}/librdmacm.map .include Index: lib/ofed/libvendor/Makefile =================================================================== --- lib/ofed/libvendor/Makefile +++ lib/ofed/libvendor/Makefile @@ -1,6 +1,7 @@ # $FreeBSD$ -.PATH: ${.CURDIR} +_spath= ${SRCTOP}/contrib/ofed/opensm/libvendor +.PATH: ${_spath} SHLIBDIR?= /usr/lib LIB= osmvendor @@ -11,9 +12,10 @@ osm_vendor_ibumad.c \ osm_vendor_ibumad_sa.c +LDADD+= -L${.OBJDIR:H}/libibumad 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 Index: share/mk/src.libnames.mk =================================================================== --- share/mk/src.libnames.mk +++ share/mk/src.libnames.mk @@ -492,18 +492,18 @@ 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 Index: usr.bin/Makefile =================================================================== --- usr.bin/Makefile +++ usr.bin/Makefile @@ -292,6 +292,7 @@ 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*) Index: usr.bin/ofed/Makefile =================================================================== --- usr.bin/ofed/Makefile +++ usr.bin/ofed/Makefile @@ -1,7 +1,10 @@ # $FreeBSD$ SUBDIR= \ -../../libibverbs + libibverbs \ + librdmacm \ + opensm \ + infiniband-diags SUBDIR_PARALLEL= Index: usr.bin/ofed/infiniband-diags/Makefile.inc =================================================================== --- usr.bin/ofed/infiniband-diags/Makefile.inc +++ 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 Index: usr.bin/ofed/libibverbs/Makefile =================================================================== --- usr.bin/ofed/libibverbs/Makefile +++ usr.bin/ofed/libibverbs/Makefile @@ -1,3 +1,5 @@ +# $FreeBSD$ + SUBDIR= \ asyncwatch \ devinfo \ Index: usr.bin/ofed/libibverbs/Makefile.inc =================================================================== --- /dev/null +++ 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} +LDFLAGS+= -libverbs -lmlx4 -lmlx5 -lcxgb4 -lpthread + Index: usr.bin/ofed/libibverbs/asyncwatch/Makefile =================================================================== --- usr.bin/ofed/libibverbs/asyncwatch/Makefile +++ usr.bin/ofed/libibverbs/asyncwatch/Makefile @@ -1,5 +1,4 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../.. ${.CURDIR}/../../../man PROG= ibv_asyncwatch MAN= ibv_asyncwatch.1 Index: usr.bin/ofed/libibverbs/devices/Makefile =================================================================== --- usr.bin/ofed/libibverbs/devices/Makefile +++ usr.bin/ofed/libibverbs/devices/Makefile @@ -1,5 +1,4 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../.. ${.CURDIR}/../../../man PROG= ibv_devices MAN= ibv_devices.1 Index: usr.bin/ofed/libibverbs/devinfo/Makefile =================================================================== --- usr.bin/ofed/libibverbs/devinfo/Makefile +++ usr.bin/ofed/libibverbs/devinfo/Makefile @@ -1,5 +1,4 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../.. ${.CURDIR}/../../../man PROG= ibv_devinfo MAN= ibv_devinfo.1 Index: usr.bin/ofed/libibverbs/rc_pingpong/Makefile =================================================================== --- usr.bin/ofed/libibverbs/rc_pingpong/Makefile +++ 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 Index: usr.bin/ofed/libibverbs/srq_pingpong/Makefile =================================================================== --- usr.bin/ofed/libibverbs/srq_pingpong/Makefile +++ 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 Index: usr.bin/ofed/libibverbs/uc_pingpong/Makefile =================================================================== --- usr.bin/ofed/libibverbs/uc_pingpong/Makefile +++ 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 Index: usr.bin/ofed/libibverbs/ud_pingpong/Makefile =================================================================== --- usr.bin/ofed/libibverbs/ud_pingpong/Makefile +++ 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 Index: usr.bin/ofed/librdmacm/Makefile.inc =================================================================== --- /dev/null +++ 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 +LDFLAGS+= -libverbs -lrdmacm -lmlx4 -lmlx5 -lcxgb4 -lpthread Index: usr.bin/ofed/librdmacm/mckey/Makefile =================================================================== --- usr.bin/ofed/librdmacm/mckey/Makefile +++ usr.bin/ofed/librdmacm/mckey/Makefile @@ -1,7 +1,5 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../.. ${.CURDIR}/../../../man - PROG= mckey MAN= mckey.1 SRCS= mckey.c Index: usr.bin/ofed/librdmacm/rping/Makefile =================================================================== --- usr.bin/ofed/librdmacm/rping/Makefile +++ 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 Index: usr.bin/ofed/librdmacm/ucmatose/Makefile =================================================================== --- usr.bin/ofed/librdmacm/ucmatose/Makefile +++ 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 Index: usr.bin/ofed/librdmacm/udaddy/Makefile =================================================================== --- usr.bin/ofed/librdmacm/udaddy/Makefile +++ 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 Index: usr.bin/ofed/opensm/Makefile =================================================================== --- usr.bin/ofed/opensm/Makefile +++ 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 @@ 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