<div> </div>
<div> </div>
<div><font size="2">
<p> I applied this patch + added mstmcra tool (will replace mread and mwrite).</p>
<p>Vlad - Please change installer to use autoconf method and take spec from this dir.</p>
<p>Thanks,<br>ORen</p>
<p> </p></font></div>
<div><br> </div>
<div>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><br>---------- Forwarded message ----------<br>From: "Ira Weiny" <<a href="mailto:weiny2@llnl.gov">
weiny2@llnl.gov</a>><br>To: "openfabrics" <<a href="mailto:general@lists.openfabrics.org">general@lists.openfabrics.org</a>><br>Date: Mon, 10 Dec 2007 23:35:54 +0200<br>Subject: [ofa-general] [PATCH] mstflint: Convert project to autoconf tools.
<br>This patch removes the makefile and converts the mstflint git tree over to<br>autoconf tools.  This works great on x86_64 but has not been tested on other<br>arch's.  (Although it is simple enough I don't see how would not work.)
<br><br>Thanks,<br>Ira<br><br><br>>From efb3a07a1f333ea95204d2a2e9462e285e29a65f Mon Sep 17 00:00:00 2001<br>From: Ira K. Weiny <<a href="mailto:weiny2@llnl.gov">weiny2@llnl.gov</a>><br>Date: Mon, 10 Dec 2007 13:30:22 -0800
<br>Subject: [PATCH] Convert project to autoconf tools.<br><br><br>Signed-off-by: Ira K. Weiny <<a href="mailto:weiny2@llnl.gov">weiny2@llnl.gov</a>><br>---<br>Makefile         |   47 -----------------------------------------------
<br><a href="http://Makefile.am">Makefile.am</a>      |   21 +++++++++++++++++++++<br>autogen.sh       |   11 +++++++++++<br><a href="http://configure.in">configure.in</a>     |   22 ++++++++++++++++++++++<br><a href="http://mstflint.spec.in">
mstflint.spec.in</a> |   45 +++++++++++++++++++++++++++++++++++++++++++++<br>5 files changed, 99 insertions(+), 47 deletions(-)<br>delete mode 100644 Makefile<br>create mode 100644 <a href="http://Makefile.am">Makefile.am
</a><br>create mode 100755 autogen.sh<br>create mode 100644 <a href="http://configure.in">configure.in</a><br>create mode 100644 <a href="http://mstflint.spec.in">mstflint.spec.in</a><br><br>diff --git a/Makefile b/Makefile
<br>deleted file mode 100644<br>index 889c97a..0000000<br>--- a/Makefile<br>+++ /dev/null<br>@@ -1,47 +0,0 @@<br>-#default options<br>-CFLAGS += -O2<br>-CFLAGS += -g<br>-CFLAGS += -Wall<br>-CXXFLAGS += -fno-exceptions<br>
-CFLAGS += -I.<br>-LD=$(CXX)<br>-EXTRA_LOADLIBES=-lz<br>-LOADLIBES+=${EXTRA_LOADLIBES}<br>-<br>-all: default<br>-bin: mstflint mstmread mstmwrite mstregdump mstvpd<br>-<br>-default: bin<br>-static: bin<br>-shared: bin<br>
-<br>-.PHONY: all bin clean static shared default<br>-.DELETE_ON_ERROR:<br>-<br>-default: EXTRA_LOADLIBES="$(shell $(CXX) ${LDFLAGS} ${CFLAGS} ${CXXFLAGS} -print-file-name=libz.a)" "$(shell $(CXX)  ${LDFLAGS} ${CFLAGS} ${CXXFLAGS} -print-file-name=libstdc++.a)"
<br>-default: LD=$(CC)<br>-static: CFLAGS+=-static<br>-<br>-mstflint: mstflint.o mflash.o<br>-       $(LD) ${LDFLAGS} ${CFLAGS} ${CXXFLAGS} mstflint.o mflash.o -o mstflint ${LOADLIBES}<br>-<br>-mstflint.o: flint.cpp mflash.h
<br>-       $(CXX) ${CFLAGS} ${CXXFLAGS} -c flint.cpp -o mstflint.o<br>-<br>-mflash.o: mtcr.h mflash.c mflash.h<br>-       $(CC) ${CFLAGS} -c mflash.c -o mflash.o<br>-<br>-mstmwrite: mwrite.c mtcr.h<br>-       $(CC) ${CFLAGS} 
mwrite.c -o mstmwrite<br>-<br>-mstmread: mread.c mtcr.h<br>-       $(CC) ${CFLAGS} mread.c -o mstmread<br>-<br>-mstregdump: mstdump.c mtcr.h<br>-       $(CC) ${CFLAGS} mstdump.c -o mstregdump<br>-<br>-mstvpd: vpd.c<br>-       $(CC) ${CFLAGS} 
vpd.c -o mstvpd<br>-<br>-clean:<br>-       rm -f mstvpd mstregdump mstflint mstmread mstmwrite mstflint.o mflash.o<br>diff --git a/Makefile.am b/Makefile.am<br>new file mode 100644<br>index 0000000..f642d9d<br>--- /dev/null
<br>+++ b/Makefile.am<br>@@ -0,0 +1,21 @@<br>+bin_PROGRAMS = mstmread \<br>+                                       mstmwrite \<br>+                                       mstflint \<br>+                                       mstregdump \
<br>+                                       mstvpd<br>+<br>+mstmread_SOURCES = mread.c mtcr.h<br>+<br>+mstmwrite_SOURCES = mwrite.c mtcr.h<br>+<br>+mstflint_SOURCES = flint.cpp mtcr.h mflash.h mflash.c<br>+mstflint_LDFLAGS = -lz
<br>+<br>+mstregdump_SOURCES = mread.c mtcr.h<br>+<br>+mstvpd_SOURCES = vpd.c<br>+<br>+<br>+EXTRA_DIST = \<br>+       mstflint.spec<br>+<br>diff --git a/autogen.sh b/autogen.sh<br>new file mode 100755<br>index 0000000..4827884
<br>--- /dev/null<br>+++ b/autogen.sh<br>@@ -0,0 +1,11 @@<br>+#! /bin/sh<br>+<br>+# create config dir if not exist<br>+test -d config || mkdir config<br>+<br>+set -x<br>+aclocal -I config<br>+libtoolize --force --copy<br>
+autoheader<br>+automake --foreign --add-missing --copy<br>+autoconf<br>diff --git a/configure.in b/configure.in<br>new file mode 100644<br>index 0000000..0924d65<br>--- /dev/null<br>+++ b/configure.in<br>@@ -0,0 +1,22 @@
<br>+dnl Process this file with autoconf to produce a configure script.<br>+<br>+AC_INIT(mstflint)<br>+<br>+AC_DEFINE_UNQUOTED([PROJECT], ["mstflint"], [Define the project name.])<br>+AC_SUBST([PROJECT])<br>+<br>
+AC_DEFINE_UNQUOTED([VERSION], ["1.3"], [Define the project version.])<br>+AC_SUBST([VERSION])<br>+<br>+AC_CONFIG_AUX_DIR(config)<br>+AC_CONFIG_SRCDIR([README])<br>+AM_INIT_AUTOMAKE(mstflint, 1.3)<br>+<br>+dnl Checks for programs
<br>+AC_PROG_CC<br>+AC_PROG_CXX<br>+AC_PROG_LIBTOOL<br>+AC_CONFIG_HEADERS<br>+<br>+AC_CONFIG_FILES([Makefile mstflint.spec])<br>+AC_OUTPUT<br>diff --git a/mstflint.spec.in b/mstflint.spec.in<br>new file mode 100644<br>index 0000000..b5937be
<br>--- /dev/null<br>+++ b/mstflint.spec.in<br>@@ -0,0 +1,45 @@<br>+Summary: Mellanox firmware burning application<br>+Name: mstflint<br>+Version: @VERSION@<br>+Release: 1<br>+License: GPL/BSD<br>+Url: <a href="http://openib.org/">
http://openib.org/</a><br>+Group: System Environment/Base<br>+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}<br>+Source: mstflint-@VERSION@.tar.gz<br>+ExclusiveArch: i386 x86_64 ia64 ppc ppc64<br>+BuildRequires: zlib-devel
<br>+Requires(post): chkconfig<br>+<br>+%description<br>+This package contains a tool for burning updated firmware on to<br>+Mellanox manufactured InfiniBand adapters.<br>+<br>+%prep<br>+%setup -q<br>+<br>+%build<br>+%configure
<br>+make<br>+<br>+%install<br>+rm -rf $RPM_BUILD_ROOT<br>+make DESTDIR=${RPM_BUILD_ROOT} install<br>+# remove unpackaged files from the buildroot<br>+rm -f $RPM_BUILD_ROOT%{_libdir}/*.la<br>+<br>+%clean<br>+rm -rf $RPM_BUILD_ROOT
<br>+<br>+%files<br>+%defattr(-,root,root)<br>+%{_bindir}/mstmread<br>+%{_bindir}/mstmwrite<br>+%{_bindir}/mstflint<br>+%{_bindir}/mstregdump<br>+%{_bindir}/mstvpd<br>+<br>+%changelog<br>+* Fri Dec 07 2007 Ira Weiny <<a href="mailto:weiny2@llnl.gov">
weiny2@llnl.gov</a>> 1.0.0<br>+   initial creation<br>+<br>--<br>1.5.1<br><br><br><br></blockquote></div><br>