Simplify the build dependencies when building the OFED libraries.

Suggested by:	bdrewery@
Sponsored by:	Mellanox Technologies
This commit is contained in:
Hans Petter Selasky 2017-11-24 09:01:08 +00:00
parent 82725ba9bf
commit e833305789
8 changed files with 76 additions and 67 deletions

View File

@ -2410,33 +2410,20 @@ _lib_libradius= lib/libradius
.endif .endif
.if ${MK_OFED} != "no" .if ${MK_OFED} != "no"
#
# The OFED libraries are built in four steps
# as reflected below, due to interdependencies.
#
_ofed_lib= \ _ofed_lib= \
contrib/ofed/include \ contrib/ofed/usr.lib/0 \
contrib/ofed/libcxgb4 \ contrib/ofed/usr.lib/1 \
contrib/ofed/libibcm \ contrib/ofed/usr.lib/2 \
contrib/ofed/libibmad \ contrib/ofed/usr.lib/3
contrib/ofed/libibnetdisc \
contrib/ofed/libibumad \
contrib/ofed/libibverbs \
contrib/ofed/libmlx4 \
contrib/ofed/libmlx5 \
contrib/ofed/librdmacm \
contrib/ofed/opensm/complib \
contrib/ofed/opensm/libopensm \
contrib/ofed/opensm/libvendor
contrib/ofed/libcxgb4__L: contrib/ofed/libibverbs__L lib/libthr__L contrib/ofed/include__L contrib/ofed/usr.lib/0__L: lib/libthr__L
contrib/ofed/libibcm__L: contrib/ofed/libibverbs__L contrib/ofed/include__L contrib/ofed/usr.lib/1__L: contrib/ofed/usr.lib/0__L
contrib/ofed/libibmad__L: contrib/ofed/libibumad__L contrib/ofed/include__L contrib/ofed/usr.lib/2__L: contrib/ofed/usr.lib/1__L
contrib/ofed/libibnetdisc__L: contrib/ofed/opensm/complib__L contrib/ofed/libibmad__L contrib/ofed/libibumad__L contrib/ofed/include__L contrib/ofed/usr.lib/3__L: contrib/ofed/usr.lib/2__L
contrib/ofed/libibumad__L: contrib/ofed/include__L
contrib/ofed/libibverbs__L: contrib/ofed/include__L
contrib/ofed/libmlx4__L: contrib/ofed/libibverbs__L lib/libthr__L contrib/ofed/include__L
contrib/ofed/libmlx5__L: contrib/ofed/libibverbs__L lib/libthr__L contrib/ofed/include__L
contrib/ofed/librdmacm__L: contrib/ofed/libibverbs__L contrib/ofed/include__L
contrib/ofed/opensm/complib__L: lib/libthr__L contrib/ofed/include__L
contrib/ofed/opensm/libopensm__L: lib/libthr__L contrib/ofed/include__L
contrib/ofed/opensm/libvendor__L: contrib/ofed/libibumad__L lib/libthr__L contrib/ofed/include__L
.endif .endif
.if ${MK_CASPER} != "no" .if ${MK_CASPER} != "no"

View File

@ -1,47 +1,10 @@
# $FreeBSD$ # $FreeBSD$
SUBDIR_A_DEPEND= # NOTE: Make sure WITH_OFED=YES is set when building this top-level directory.
SUBDIR_A= \
include
SUBDIR_B_DEPEND= ${SUBDIR_A} SUBDIR= \
SUBDIR_B= \ include \
libibverbs usr.lib \
usr.bin
SUBDIR_C_DEPEND= ${SUBDIR_B}
SUBDIR_C= \
libibcm \
libibumad
SUBDIR_D_DEPEND= ${SUBDIR_C}
SUBDIR_D= \
librdmacm \
libibmad \
opensm/complib \
opensm/libvendor \
libcxgb4 \
libmlx4 \
libmlx5
SUBDIR_E_DEPEND= ${SUBDIR_D}
SUBDIR_E= \
libibverbs/examples/build \
librdmacm/examples/build \
libibnetdisc \
opensm/libopensm
SUBDIR_F_DEPEND= ${SUBDIR_E}
SUBDIR_F= \
opensm/opensm \
infiniband-diags/build
.for L in A B C D E F
.for S in ${SUBDIR_${L}}
SUBDIR_DEPEND_${S}+= ${SUBDIR_${L}_DEPEND}
.endfor
SUBDIR+= ${SUBDIR_${L}}
.endfor
SUBDIR_PARALLEL=
.include <bsd.subdir.mk> .include <bsd.subdir.mk>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -0,0 +1,8 @@
# $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>