diff options
author | hselasky <hselasky@FreeBSD.org> | 2014-11-26 09:37:35 +0000 |
---|---|---|
committer | hselasky <hselasky@FreeBSD.org> | 2014-11-26 09:37:35 +0000 |
commit | f188d6b61cc7faa406660e967e799d8465151847 (patch) | |
tree | e6b591985146d5afc86564246668ddad9ab2eb61 /contrib/ofed | |
parent | bed3ddc44207cd1b879a8caff544720a11a21746 (diff) | |
download | FreeBSD-src-f188d6b61cc7faa406660e967e799d8465151847.zip FreeBSD-src-f188d6b61cc7faa406660e967e799d8465151847.tar.gz |
MFC r273774:
Make some infiniband example utilities easily buildable:
- Add new Makefiles.
- Add more include directories when building.
- Fixed a printf() formatting string.
Sponsored by: Mellanox Technologies
Diffstat (limited to 'contrib/ofed')
-rw-r--r-- | contrib/ofed/librdmacm/examples/build/Makefile | 3 | ||||
-rw-r--r-- | contrib/ofed/librdmacm/examples/build/Makefile.inc | 9 | ||||
-rw-r--r-- | contrib/ofed/librdmacm/examples/build/cmatose/Makefile | 10 | ||||
-rw-r--r-- | contrib/ofed/librdmacm/examples/build/mckey/Makefile | 10 | ||||
-rw-r--r-- | contrib/ofed/librdmacm/examples/build/rping/Makefile | 10 | ||||
-rw-r--r-- | contrib/ofed/librdmacm/examples/build/udaddy/Makefile | 10 | ||||
-rw-r--r-- | contrib/ofed/librdmacm/examples/rping.c | 5 | ||||
-rw-r--r-- | contrib/ofed/usr.lib/Makefile.inc | 21 |
8 files changed, 69 insertions, 9 deletions
diff --git a/contrib/ofed/librdmacm/examples/build/Makefile b/contrib/ofed/librdmacm/examples/build/Makefile new file mode 100644 index 0000000..c949c05 --- /dev/null +++ b/contrib/ofed/librdmacm/examples/build/Makefile @@ -0,0 +1,3 @@ +SUBDIR= cmatose mckey rping udaddy + +.include <bsd.subdir.mk> diff --git a/contrib/ofed/librdmacm/examples/build/Makefile.inc b/contrib/ofed/librdmacm/examples/build/Makefile.inc new file mode 100644 index 0000000..6eacbad --- /dev/null +++ b/contrib/ofed/librdmacm/examples/build/Makefile.inc @@ -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 + diff --git a/contrib/ofed/librdmacm/examples/build/cmatose/Makefile b/contrib/ofed/librdmacm/examples/build/cmatose/Makefile new file mode 100644 index 0000000..c4515ac --- /dev/null +++ b/contrib/ofed/librdmacm/examples/build/cmatose/Makefile @@ -0,0 +1,10 @@ +# +# $FreeBSD$ +# +.PATH: ${.CURDIR}/../.. +PROG= cmatose +MAN= +SRCS= cmatose.c +LDADD+= -libverbs -lrdmacm -lpthread + +.include <bsd.prog.mk> diff --git a/contrib/ofed/librdmacm/examples/build/mckey/Makefile b/contrib/ofed/librdmacm/examples/build/mckey/Makefile new file mode 100644 index 0000000..d4ad295 --- /dev/null +++ b/contrib/ofed/librdmacm/examples/build/mckey/Makefile @@ -0,0 +1,10 @@ +# +# $FreeBSD$ +# +.PATH: ${.CURDIR}/../.. +PROG= mckey +MAN= +SRCS= mckey.c +LDADD+= -libverbs -lrdmacm -lpthread + +.include <bsd.prog.mk> diff --git a/contrib/ofed/librdmacm/examples/build/rping/Makefile b/contrib/ofed/librdmacm/examples/build/rping/Makefile new file mode 100644 index 0000000..05ef562 --- /dev/null +++ b/contrib/ofed/librdmacm/examples/build/rping/Makefile @@ -0,0 +1,10 @@ +# +# $FreeBSD$ +# +.PATH: ${.CURDIR}/../.. +PROG= rping +MAN= +SRCS= rping.c +LDADD+= -libverbs -lrdmacm -lpthread + +.include <bsd.prog.mk> diff --git a/contrib/ofed/librdmacm/examples/build/udaddy/Makefile b/contrib/ofed/librdmacm/examples/build/udaddy/Makefile new file mode 100644 index 0000000..16d9419 --- /dev/null +++ b/contrib/ofed/librdmacm/examples/build/udaddy/Makefile @@ -0,0 +1,10 @@ +# +# $FreeBSD$ +# +.PATH: ${.CURDIR}/../.. +PROG= udaddy +MAN= +SRCS= udaddy.c +LDADD+= -libverbs -lrdmacm -lpthread + +.include <bsd.prog.mk> diff --git a/contrib/ofed/librdmacm/examples/rping.c b/contrib/ofed/librdmacm/examples/rping.c index 985f642..40e6bf4 100644 --- a/contrib/ofed/librdmacm/examples/rping.c +++ b/contrib/ofed/librdmacm/examples/rping.c @@ -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)); diff --git a/contrib/ofed/usr.lib/Makefile.inc b/contrib/ofed/usr.lib/Makefile.inc index 67ef39f..e48285dc 100644 --- a/contrib/ofed/usr.lib/Makefile.inc +++ b/contrib/ofed/usr.lib/Makefile.inc @@ -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 |