1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-11-29 08:08:37 +00:00

Make some infiniband example utilities easily buildable:

- Add new Makefiles.
- Add more include directories when building.
- Fixed a printf() formatting string.

MFC after:	3 days
Sponsored by:	Mellanox Technologies
This commit is contained in:
Hans Petter Selasky 2014-10-28 13:38:10 +00:00
parent 0e1152fcc2
commit 3823d5e198
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=273774
8 changed files with 69 additions and 9 deletions

View File

@ -0,0 +1,3 @@
SUBDIR= cmatose mckey rping udaddy
.include <bsd.subdir.mk>

View File

@ -0,0 +1,9 @@
IBDIR=../../../..
CFLAGS+= \
-I${IBDIR}/include/infiniband \
-I${IBDIR}/include \
-I${IBDIR}/librdmacm/include \
-I${IBDIR}/libibv/include \
-I${IBDIR}/libibverbs/include

View File

@ -0,0 +1,10 @@
#
# $FreeBSD$
#
.PATH: ${.CURDIR}/../..
PROG= cmatose
MAN=
SRCS= cmatose.c
LDADD+= -libverbs -lrdmacm -lpthread
.include <bsd.prog.mk>

View File

@ -0,0 +1,10 @@
#
# $FreeBSD$
#
.PATH: ${.CURDIR}/../..
PROG= mckey
MAN=
SRCS= mckey.c
LDADD+= -libverbs -lrdmacm -lpthread
.include <bsd.prog.mk>

View File

@ -0,0 +1,10 @@
#
# $FreeBSD$
#
.PATH: ${.CURDIR}/../..
PROG= rping
MAN=
SRCS= rping.c
LDADD+= -libverbs -lrdmacm -lpthread
.include <bsd.prog.mk>

View File

@ -0,0 +1,10 @@
#
# $FreeBSD$
#
.PATH: ${.CURDIR}/../..
PROG= udaddy
MAN=
SRCS= udaddy.c
LDADD+= -libverbs -lrdmacm -lpthread
.include <bsd.prog.mk>

View File

@ -1148,8 +1148,9 @@ int main(int argc, char *argv[])
if ((cb->size < RPING_MIN_BUFSIZE) ||
(cb->size > (RPING_BUFSIZE - 1))) {
fprintf(stderr, "Invalid size %d "
"(valid range is %Zd to %d)\n",
cb->size, RPING_MIN_BUFSIZE, RPING_BUFSIZE);
"(valid range is %d to %d)\n",
(int)cb->size, (int)(RPING_MIN_BUFSIZE),
(int)(RPING_BUFSIZE));
ret = EINVAL;
} else
DEBUG_LOG("size %d\n", (int) atoi(optarg));

View File

@ -7,11 +7,18 @@ COMPLIBDIR= ${OPENSMDIR}/complib
VENDORLIBDIR= ${OPENSMDIR}/libvendor
IBVERBSDIR= ${.CURDIR}/../../libibverbs
IBINC= ${.CURDIR}/../../include
RDMACMDIR= ${.CURDIR}/../../librdmacm
CFLAGS+= -I${.CURDIR} \
-I${IBINC}/infiniband \
-I${IBINC} \
-I${IBCOMMONDIR}/include/infiniband \
-I${IBCOMMONDIR}/include \
-I${IBMADDIR}/include/infiniband \
-I${IBMADDIR}/include \
-I${UMADDIR}/include/infiniband \
-I${UMADDIR}/include \
-I${OPENSMDIR}/include \
-I${RDMACMDIR}/include \
-I${IBVERBSDIR}/include
CFLAGS+= -I${.CURDIR} -I${IBINC}/infiniband
CFLAGS+= -I${IBCOMMONDIR}/include/infiniband
CFLAGS+= -I${IBMADDIR}/include/infiniband
CFLAGS+= -I${UMADDIR}/include/infiniband
CFLAGS+= -I${OPENSMDIR}/include
# CFLAGS+= -I${UMADDIR}/include
# CFLAGS+= -I${IBVERBSDIR}/include