diff options
author | hselasky <hselasky@FreeBSD.org> | 2014-10-28 13:38:10 +0000 |
---|---|---|
committer | hselasky <hselasky@FreeBSD.org> | 2014-10-28 13:38:10 +0000 |
commit | bac989a1efbcd982bb02c0649e784628fba8692e (patch) | |
tree | f0e92a65dd902b60993088555960a55d6c9f961a /contrib/ofed/librdmacm | |
parent | a0b8ff0c54d6b632fe766de4566cee59bd8a4898 (diff) | |
download | FreeBSD-src-bac989a1efbcd982bb02c0649e784628fba8692e.zip FreeBSD-src-bac989a1efbcd982bb02c0649e784628fba8692e.tar.gz |
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
Diffstat (limited to 'contrib/ofed/librdmacm')
-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 |
7 files changed, 55 insertions, 2 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)); |