Skip to content

Commit

Permalink
Commit libibverbs code from roland-uverbs branch back onto trunk
Browse files Browse the repository at this point in the history
  • Loading branch information
Roland Dreier authored and Roland Dreier committed Nov 9, 2006
1 parent bdb426a commit 91fc395
Show file tree
Hide file tree
Showing 15 changed files with 2,845 additions and 104 deletions.
31 changes: 20 additions & 11 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,41 @@ INCLUDES = -I$(srcdir)/include

lib_LTLIBRARIES = src/libibverbs.la

src_libibverbs_la_CFLAGS = -Wall -D_GNU_SOURCE -DDRIVER_PATH=\"$(libdir)/infiniband\"
AM_CFLAGS = -g -Wall -D_GNU_SOURCE

src_libibverbs_la_CFLAGS = -g -Wall -D_GNU_SOURCE -DDRIVER_PATH=\"$(libdir)/infiniband\"

if HAVE_LD_VERSION_SCRIPT
libibverbs_version_script = -Wl,--version-script=$(srcdir)/src/libibverbs.map
else
libibverbs_version_script =
endif

src_libibverbs_la_SOURCES = src/init.c src/device.c src/memory.c
src_libibverbs_la_SOURCES = src/cmd.c src/device.c src/init.c src/memory.c src/verbs.c
src_libibverbs_la_LDFLAGS = -version-info 1 -export-dynamic \
$(libibverbs_version_script)
src_libibverbs_la_DEPENDENCIES = $(srcdir)/src/libibverbs.map

bin_PROGRAMS = examples/ib_devices examples/asyncwatch examples/pingpong
examples_ib_devices_SOURCES = examples/device_list.c
examples_ib_devices_LDADD = $(top_builddir)/src/libibverbs.la
examples_pingpong_SOURCES = examples/pingpong.c
examples_pingpong_LDADD = $(top_builddir)/src/libibverbs.la
examples_asyncwatch_SOURCES = examples/asyncwatch.c
examples_asyncwatch_LDADD = $(top_builddir)/src/libibverbs.la
bin_PROGRAMS = examples/ibv_devices examples/ibv_asyncwatch \
examples/ibv_pingpong examples/ibv_ud_pingpong
examples_ibv_devices_SOURCES = examples/device_list.c
examples_ibv_devices_LDADD = $(top_builddir)/src/libibverbs.la
examples_ibv_pingpong_SOURCES = examples/pingpong.c
examples_ibv_pingpong_LDADD = $(top_builddir)/src/libibverbs.la
examples_ibv_ud_pingpong_SOURCES = examples/ud-pingpong.c
examples_ibv_ud_pingpong_LDADD = $(top_builddir)/src/libibverbs.la
examples_ibv_asyncwatch_SOURCES = examples/asyncwatch.c
examples_ibv_asyncwatch_LDADD = $(top_builddir)/src/libibverbs.la

libibverbsincludedir = $(includedir)/infiniband

libibverbsinclude_HEADERS = include/infiniband/verbs.h include/infiniband/driver.h
libibverbsinclude_HEADERS = include/infiniband/arch.h include/infiniband/driver.h \
include/infiniband/kern-abi.h include/infiniband/opcode.h include/infiniband/verbs.h

EXTRA_DIST = include/infiniband/verbs.h include/infiniband/driver.h \
EXTRA_DIST = include/infiniband/driver.h include/infiniband/kern-abi.h \
include/infiniband/opcode.h include/infiniband/verbs.h \
src/ibverbs.h \
src/libibverbs.map \
libibverbs.spec.in

dist-hook: libibverbs.spec
Expand Down
6 changes: 5 additions & 1 deletion examples/device_list.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
# include <config.h>
#endif /* HAVE_CONFIG_H */

#include <stdio.h>

#include <endian.h>
#include <byteswap.h>

Expand All @@ -60,5 +62,7 @@ int main(int argc, char *argv[])
dlist_for_each_data(dev_list, ib_dev, struct ibv_device)
printf(" %-16s\t%016llx\n",
ibv_get_device_name(ib_dev),
be64_to_cpu(ibv_get_device_guid(ib_dev)));
(unsigned long long) be64_to_cpu(ibv_get_device_guid(ib_dev)));

return 0;
}

0 comments on commit 91fc395

Please sign in to comment.