diff --git a/Makefile.inc1 b/Makefile.inc1 index 074bdedeb67f..9a29abaca1fe 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -274,9 +274,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 @@ -2462,24 +2459,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" @@ -2490,7 +2479,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 .if ${MK_IPFILTER} != "no" _generic_libs+= sbin/ipf/libipf .endif diff --git a/contrib/ofed/Makefile b/contrib/ofed/Makefile deleted file mode 100644 index f7a1d5508718..000000000000 --- 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 6c285e06aca9..000000000000 --- 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 43b972b8f93c..000000000000 --- 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 105ad8213644..000000000000 --- 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 2f7360a32f30..000000000000 --- 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 bc865b1a4991..000000000000 --- 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 3356591594ae..000000000000 --- 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 6481b405e323..000000000000 --- 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 709ce43e223f..82e8af3b679f 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -67,7 +67,7 @@ SUBDIR= ${SUBDIR_BOOTSTRAP} \ libopie \ libpam \ libpathconv \ - ${_libpcap} \ + libpcap \ libpjdlog \ ${_libproc} \ libprocstat \ @@ -124,6 +124,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 @@ -184,14 +187,6 @@ SUBDIR.${MK_PMC}+= libipt 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 @@ -212,6 +207,7 @@ SUBDIR.${MK_TESTS_SUPPORT}+= atf SUBDIR.${MK_TESTS}+= tests SUBDIR.${MK_UNBOUND}+= libunbound SUBDIR.${MK_USB}+= libusbhid libusb +SUBDIR.${MK_OFED}+= ofed .if !make(install) SUBDIR_PARALLEL= diff --git a/lib/ofed/Makefile b/lib/ofed/Makefile new file mode 100644 index 000000000000..224222b55e24 --- /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 000000000000..e8c0da7a1d7e --- /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 f3005ff928a4..3adfdb9ee2b0 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 2941a11829bf..b40811e7e420 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 98196ea3a4ba..7611e228b839 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 c40e8202987a..8593683a0d09 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 ceef5ebc207b..fcb0508e956e 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 5bd622de3394..f66e58f4b0c0 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 af7ac3f97557..6ac9dafa8f57 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 846bad02fbfc..eb50be2f4ff5 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 d460cc2b6709..434c81caba52 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 5e54172ca49b..5d31f1428ca3 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 6e6b688b39b0..f272f58116cd 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 593315dd6118..e7234530e1e1 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 9a90fac1428e..8405bd11c3c4 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 3fcb19c4eacc..1ff6ca3ed22b 100644 --- a/share/mk/src.libnames.mk +++ b/share/mk/src.libnames.mk @@ -492,18 +492,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 4a4a5ce5ff58..cb4f056134f0 100644 --- a/usr.bin/Makefile +++ b/usr.bin/Makefile @@ -292,6 +292,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 3203cc96f9ba..3069676c9e6c 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 54b6d80cb637..76bf879f6096 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 b2b8ebe54d20..bd164751c9ce 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 000000000000..9ed20e6a94b0 --- /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 cf3eb15bde1f..c82c0024d577 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 9c981d33a546..c2440ff40a9c 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 8ecd9c745a26..83a61318faef 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 2abc22bdf94f..4145967dd0a3 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 460ec9a6cd20..ee2a6e07daca 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 8e4b61758db8..8740e7062977 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 f2f967acecf0..7a153f5395a8 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 000000000000..d407c8ff9681 --- /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 17f3b5739912..f0dd7f023fed 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 93f608ca7428..1112357558f8 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 22a88fac61e9..9f984a8a49a8 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 8bb39c16ddf2..df8f86de428f 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 a22d2fb65734..2c1f504dc191 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