[openib-general] [PATCH v1 2/2] AMSO1100 Makefiles.

Steve Wise swise at opengridcomputing.com
Tue Jun 20 13:04:39 PDT 2006



---

 libamso/Makefile.am     |   27 +++++++++++++++++++++++
 libamso/autogen.sh      |    8 +++++++
 libamso/configure.in    |   41 ++++++++++++++++++++++++++++++++++
 libamso/libamso.spec.in |   56 +++++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 132 insertions(+), 0 deletions(-)

diff --git a/libamso/Makefile.am b/libamso/Makefile.am
new file mode 100644
index 0000000..9e2cbc1
--- /dev/null
+++ b/libamso/Makefile.am
@@ -0,0 +1,27 @@
+# $Id: $
+
+amsolibdir = $(libdir)/infiniband
+
+amsolib_LTLIBRARIES = src/amso.la
+
+src_amso_la_CFLAGS = -g -Wall -D_GNU_SOURCE
+
+if HAVE_LD_VERSION_SCRIPT
+    amso_version_script = -Wl,--version-script=$(srcdir)/src/amso.map
+else
+    amso_version_script =
+endif
+
+src_amso_la_SOURCES = src/cq.c src/amso.c src/qp.c \
+    src/verbs.c
+src_amso_la_LDFLAGS = -avoid-version -module \
+    $(amso_version_script)
+
+#DEBIAN = debian/changelog debian/compat debian/control debian/copyright \
+#    debian/libamso1.install debian/libamso-dev.install debian/rules
+
+EXTRA_DIST = src/amso.h src/amso-abi.h \
+    src/amso.map libamso.spec.in $(DEBIAN)
+
+dist-hook: libamso.spec
+	cp libamso.spec $(distdir)
diff --git a/libamso/autogen.sh b/libamso/autogen.sh
new file mode 100755
index 0000000..fd47839
--- /dev/null
+++ b/libamso/autogen.sh
@@ -0,0 +1,8 @@
+#! /bin/sh
+
+set -x
+aclocal -I config
+libtoolize --force --copy
+autoheader
+automake --foreign --add-missing --copy
+autoconf
diff --git a/libamso/configure.in b/libamso/configure.in
new file mode 100644
index 0000000..4a920c4
--- /dev/null
+++ b/libamso/configure.in
@@ -0,0 +1,41 @@
+dnl Process this file with autoconf to produce a configure script.
+
+AC_PREREQ(2.57)
+AC_INIT(libamso, 1.0-rc4, openib-general at openib.org)
+AC_CONFIG_SRCDIR([src/amso.h])
+AC_CONFIG_AUX_DIR(config)
+AM_CONFIG_HEADER(config.h)
+AM_INIT_AUTOMAKE(libamso, 1.0-rc4)
+AM_PROG_LIBTOOL
+
+dnl Checks for programs
+AC_PROG_CC
+
+dnl Checks for libraries
+AC_CHECK_LIB(ibverbs, ibv_get_device_list, [],
+    AC_MSG_ERROR([ibv_get_device_list() not found.  libmthca requires libibverbs.]))
+
+dnl Checks for header files.
+AC_CHECK_HEADERS(sysfs/libsysfs.h)
+AC_CHECK_HEADER(infiniband/driver.h, [],
+    AC_MSG_ERROR([<infiniband/driver.h> not found.  Is libibverbs installed?]))
+AC_HEADER_STDC
+
+dnl Checks for typedefs, structures, and compiler characteristics.
+AC_C_CONST
+AC_CHECK_SIZEOF(long)
+
+dnl Checks for library functions
+AC_CHECK_FUNCS(ibv_read_sysfs_file)
+
+AC_CACHE_CHECK(whether ld accepts --version-script, ac_cv_version_script,
+    if test -n "`$LD --help < /dev/null 2>/dev/null | grep version-script`"; then
+        ac_cv_version_script=yes
+    else
+        ac_cv_version_script=no
+    fi)
+
+AM_CONDITIONAL(HAVE_LD_VERSION_SCRIPT, test "$ac_cv_version_script" = "yes")
+
+AC_CONFIG_FILES([Makefile libamso.spec])
+AC_OUTPUT
diff --git a/libamso/libamso.spec.in b/libamso/libamso.spec.in
new file mode 100644
index 0000000..1bbb9cb
--- /dev/null
+++ b/libamso/libamso.spec.in
@@ -0,0 +1,56 @@
+# $Id: $
+
+%define ver      @VERSION@
+
+Name: libamso
+Version: 1.0
+Release: 0.2.rc4%{?dist}
+Summary: AMSO1100 Userspace Library
+
+Group: System Environment/Libraries
+License: GPL/BSD
+Url: http://openib.org/
+Source: http://openib.org/downloads/%{name}-%{ver}.tar.gz
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+BuildRequires: libibverbs-devel
+
+%description
+libamso provides a device-specific userspace driver for Chelsio RNICs
+for use with the libibverbs library.
+
+%package devel
+Summary: Development files for the libamso driver
+Group: System Environment/Libraries
+Requires: %{name} = %{version}-%{release}
+
+%description devel
+Static version of libamso that may be linked directly to an
+application, which may be useful for debugging.
+
+%prep
+%setup -q -n %{name}-%{ver}
+
+%build
+%configure
+make %{?_smp_mflags}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+%makeinstall
+# remove unpackaged files from the buildroot
+rm -f $RPM_BUILD_ROOT%{_libdir}/infiniband/*.la
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(-,root,root,-)
+%{_libdir}/infiniband/amso.so
+%doc AUTHORS COPYING ChangeLog README
+
+%files devel
+%defattr(-,root,root,-)
+%{_libdir}/infiniband/amso.a
+
+%changelog




More information about the general mailing list