summaryrefslogtreecommitdiffstats
path: root/contrib/ofed
diff options
context:
space:
mode:
authorhselasky <hselasky@FreeBSD.org>2015-01-08 14:45:54 +0000
committerhselasky <hselasky@FreeBSD.org>2015-01-08 14:45:54 +0000
commit9117e0288e7b96f5d8fa611520dcb8379f67e421 (patch)
treebbfdc508478ecfabae122cd867a2dc47f00583d1 /contrib/ofed
parentedd49ae3631a2e37942cefc8f25c57612ba7973d (diff)
downloadFreeBSD-src-9117e0288e7b96f5d8fa611520dcb8379f67e421.zip
FreeBSD-src-9117e0288e7b96f5d8fa611520dcb8379f67e421.tar.gz
Add makefile for the "osmtest" utility. While at it:
- Fix depend target by removing a space after an "-I" inclusion option. - Fix some minor compile issues in the "osmtest" utility. MFC after: 3 days PR: 196580 Sponsored by: Mellanox Technologies
Diffstat (limited to 'contrib/ofed')
-rw-r--r--contrib/ofed/management/opensm/osmtest/osmt_multicast.c1
-rw-r--r--contrib/ofed/management/opensm/osmtest/osmtest.c2
-rw-r--r--contrib/ofed/usr.bin/Makefile12
-rw-r--r--contrib/ofed/usr.bin/osmtest/Makefile34
-rw-r--r--contrib/ofed/usr.lib/Makefile4
5 files changed, 47 insertions, 6 deletions
diff --git a/contrib/ofed/management/opensm/osmtest/osmt_multicast.c b/contrib/ofed/management/opensm/osmtest/osmt_multicast.c
index 165457c..8329a2b 100644
--- a/contrib/ofed/management/opensm/osmtest/osmt_multicast.c
+++ b/contrib/ofed/management/opensm/osmtest/osmt_multicast.c
@@ -42,6 +42,7 @@
#ifndef __WIN__
#include <unistd.h>
#endif
+#include <sys/socket.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --git a/contrib/ofed/management/opensm/osmtest/osmtest.c b/contrib/ofed/management/opensm/osmtest/osmtest.c
index 243d0b2..57476a5 100644
--- a/contrib/ofed/management/opensm/osmtest/osmtest.c
+++ b/contrib/ofed/management/opensm/osmtest/osmtest.c
@@ -3013,7 +3013,7 @@ Exit:
/**********************************************************************
**********************************************************************/
-inline uint32_t osmtest_path_rec_key_get(IN const ib_path_rec_t * const p_rec)
+static inline uint32_t osmtest_path_rec_key_get(IN const ib_path_rec_t * const p_rec)
{
return (p_rec->dlid << 16 | p_rec->slid);
}
diff --git a/contrib/ofed/usr.bin/Makefile b/contrib/ofed/usr.bin/Makefile
index 9ae1427..2e133739 100644
--- a/contrib/ofed/usr.bin/Makefile
+++ b/contrib/ofed/usr.bin/Makefile
@@ -1,6 +1,12 @@
-SUBDIR = ibaddr ibnetdiscover ibping ibportstate ibroute ibsendtrap ibstat
-SUBDIR += ibsysstat ibtracert opensm perfquery saquery
-SUBDIR += sminfo smpdump smpquery vendstat
+.include <src.opts.mk>
+
+SUBDIR= ibaddr ibnetdiscover ibping ibportstate ibroute ibsendtrap ibstat \
+ ibsysstat ibtracert opensm perfquery saquery \
+ sminfo smpdump smpquery vendstat
+
+.if ${MK_TESTS} != "no"
+SUBDIR+= osmtest
+.endif
SUBDIR_PARALLEL=
diff --git a/contrib/ofed/usr.bin/osmtest/Makefile b/contrib/ofed/usr.bin/osmtest/Makefile
new file mode 100644
index 0000000..fef67a0
--- /dev/null
+++ b/contrib/ofed/usr.bin/osmtest/Makefile
@@ -0,0 +1,34 @@
+# $FreeBSD$
+
+.include "../Makefile.inc"
+
+OPENSM= ${.CURDIR}/../../management/opensm
+.PATH: ${OPENSM}/osmtest ${OPENSM}/man
+
+BINDIR= ${TESTSBASE}/usr.bin/opensm
+PROG= osmtest
+
+SRCS= main.c \
+ osmt_inform.c \
+ osmt_mtl_regular_qp.c \
+ osmt_multicast.c \
+ osmt_service.c \
+ osmt_slvl_vl_arb.c \
+ osmtest.c
+
+LDADD= -libcommon \
+ -libmad \
+ -libumad \
+ -losmvendor \
+ -losmcomp \
+ -lopensm \
+ -lpthread
+
+CFLAGS= -DVENDOR_RMPP_SUPPORT -DDUAL_SIDED_RMPP \
+ -I${OPENSM}/osmtest/include
+
+MAN= osmtest.8
+
+WARNS?= 1
+
+.include <bsd.prog.mk>
diff --git a/contrib/ofed/usr.lib/Makefile b/contrib/ofed/usr.lib/Makefile
index 38d5e16..b9c249e 100644
--- a/contrib/ofed/usr.lib/Makefile
+++ b/contrib/ofed/usr.lib/Makefile
@@ -1,5 +1,5 @@
-SUBDIR = libibcommon libibmad libibumad libibverbs libmlx4 libmthca
-SUBDIR += libopensm libosmcomp libosmvendor libibcm librdmacm libsdp libcxgb4
+SUBDIR= libibcommon libibmad libibumad libibverbs libmlx4 libmthca \
+ libopensm libosmcomp libosmvendor libibcm librdmacm libsdp libcxgb4
SUBDIR_PARALLEL=
OpenPOWER on IntegriCloud