--- hypre-1.6.0.orig/debian/libhypre1.6.0c2.files +++ hypre-1.6.0/debian/libhypre1.6.0c2.files @@ -0,0 +1 @@ +usr/lib/*.so.* --- hypre-1.6.0.orig/debian/libhypre1.6.0c2.overrides +++ hypre-1.6.0/debian/libhypre1.6.0c2.overrides @@ -0,0 +1,2 @@ +libhypre1.6.0c2: old-fsf-address-in-copyright-file +libhypre1.6.0c2: copyright-should-refer-to-common-license-file-for-gpl --- hypre-1.6.0.orig/debian/copyright +++ hypre-1.6.0/debian/copyright @@ -0,0 +1,230 @@ +This package was debianized by Adam C. Powell, IV on +August 27, 2003. + +It was downloaded from http://www.llnl.gov/CASC/hypre/ . + +Below is the contents of the COPYRIGHT_and_DISCLAIMER file distributed with +hypre, and the email sent to me by Robert Falgout of Laurence Livermore +National laboratories authorizing Debian distribution of hypre. +--------------------------------------------------------------------------- + + +NOTICE + +This work was produced at the University of California, Lawrence +Livermore National Laboratory (UC LLNL) under contract +no. W-7405-ENG-48 (Contract 48) between the U.S. Department of Energy +(DOE) and The Regents of the University of California (University) for +the operation of UC LLNL. The rights of the Federal Government are +reserved under Contract 48 subject to the restrictions agreed upon by +the DOE and University as allowed under DOE Acquisition Letter 97-1. + + + +DISCLAIMER + +This work was prepared as an account of work sponsored by an agency of +the United States Government. Neither the United States Government nor +the University of California nor any of their employees, makes any +warranty, express or implied, or assumes any liability or +responsibility for the accuracy, completeness, or usefulness of any +information, apparatus, product, or process disclosed, or represents +that its use would not infringe privately-owned rights. Reference +herein to any specific commercial products, process, or service by +trade name, trademark, manufacturer or otherwise does not necessarily +constitute or imply its endorsement, recommendation, or favoring by +the United States Government or the University of California. The +views and opinions of authors expressed herein do not necessarily +state or reflect those of the United States Government or the +University of California, and shall not be used for advertising or +product endorsement purposes. + + + +NOTIFICATION OF COMMERCIAL USE + +Commercialization of this product is prohibited without notifying the +Department of Energy (DOE) or Lawrence Livermore National Laboratory +(LLNL). + + + +From rfalgout@llnl.gov Wed Sep 17 16:13:24 2003 +Envelope-to: hazelsct@lyre.mit.edu +Received: from pacific-carrier-annex.mit.edu ([18.7.21.83]) by lyre.mit.edu + with esmtp (Exim 3.35 #1 (Debian)) id 19zig0-000647-00 for + ; Wed, 17 Sep 2003 16:13:24 -0400 +Received: from smtp-3.llnl.gov (smtp-3.llnl.gov [128.115.41.83]) by + pacific-carrier-annex.mit.edu (8.12.4/8.9.2) with ESMTP id h8HKDMqt007760 + for ; Wed, 17 Sep 2003 16:13:22 -0400 (EDT) +Received: from norm.llnl.gov (localhost [127.0.0.1]) by smtp-3.llnl.gov + (8.12.3/8.12.3/LLNL evision: 1.3 $) with ESMTP id h8HKDKhU011936; Wed, 17 + Sep 2003 13:13:20 -0700 (PDT) +X-Authentication-Warning: smtp-3.llnl.gov: iscan owned process doing -bs +Received: from BIGSAND.llnl.gov (bigsand.llnl.gov [134.9.214.23]) by + norm.llnl.gov (iPlanet Messaging Server 5.1 Patch 1 (built Jun 6 2002)) + with ESMTP id <0HLD00J4BK6855@norm.llnl.gov>; Wed, 17 Sep 2003 13:13:20 + -0700 (PDT) +Date: Wed, 17 Sep 2003 13:13:20 -0700 +From: "Robert D. Falgout" +Subject: Re: [Fwd: Distributing hypre with Debian GNU/Linux] +In-reply-to: <1063295186.1679.44.camel@doorstop> +X-Sender: falgout@mail-lc.llnl.gov +To: Adam C Powell IV , vhenson@llnl.gov, echow@llnl.gov, chtong@llnl.gov, treadway1@llnl.gov +Message-id: <5.0.2.1.2.20030917131211.00acae88@mail-lc.llnl.gov> +MIME-version: 1.0 +X-Mailer: QUALCOMM Windows Eudora Version 5.0.2 +Content-type: multipart/alternative; boundary="Boundary_(ID_lLyocIsSFNBm/icotl0FvQ)" +X-Evolution-Source: mbox:/var/mail/hazelsct +X-Evolution: 0000010b-0011 + + +--Boundary_(ID_lLyocIsSFNBm/icotl0FvQ) +Content-type: text/plain; charset=us-ascii; format=flowed +Content-transfer-encoding: 7BIT + + +Adam, + +You have my permission to distribute hypre with Debian GNU/Linux. + +In the meantime, I will continue to think about putting an open +source license on hypre, and I will let you know when/if that happens. + +-Rob + +At 11:46 AM 9/11/2003 -0400, Adam C Powell IV wrote: +>Greetings, +> +>About two weeks ago I sent the attached request to Robert Falgout, +>regarding distributing the hypre preconditioning libraries with Debian +>GNU/Linux. Since perhaps he was not the right person to ask, I am +>forwarding the request on to the four of you who are involved in the +>development and management of the hypre project. +> +>Since the initial contact, I have made a Debian package for hypre (though +>of course have not distributed it), including a patch to the makefiles to +>build shared libraries. If you like, I can share with you the shared +>library patch and/or Debian packaging itself. +> +>In the meantime, I would appreciate it if one of you could reply to me +>regarding prospects for distributing hypre with Debian. +> +>Sincerely, +>Adam C. Powell, IV http://lyre.mit.edu/~powell/ +>Thomas B. King Assistant Professor of Materials Engineering +>77 Massachusetts Ave. Rm. 4-117 Phone (617) 452-2086 +>Cambridge, MA 02139 USA Fax (617) 253-5418 +>Subject: Distributing hypre with Debian GNU/Linux +>From: Adam C Powell IV +>To: rfalgout@llnl.gov +>Content-Type: multipart/alternative; boundary="=-2CWUVmLtDC1jZP7JbojV" +>X-Mailer: Ximian Evolution 1.0.5 +>Date: 26 Aug 2003 18:25:28 -0400 +>Message-Id: <1061936728.29806.58.camel@navier> +>Mime-Version: 1.0 +> +>Greetings, +> +>I am writing to request permission to distribute hypre with Debian +>GNU/Linux. If you are not the appropriate person to authorize this, +>please let me know whom to contact. +> +>Debian (http://www.debian.org/) is an all-volunteer distribution of the +>Linux kernel with thousands of accompanying software packages, similar to +>but much larger than RedHat, SuSE, Mandrake, Lindows, etc. (in fact, +>Lindows is based on many of Debian's free packages). I am one of the +>~1100 volunteer maintainers of Debian; I maintain the PETSc and Babel +>packages among others. Because PETSc can link to hypre, I would like to +>be able to include it in the Debian distribution. +> +>Debian packages are grouped according to the "freedom" of software +>licenses. Since the hypre license is not "free" by Debian standards +>(http://www.debian.org/intro/free ; basically the same as the Open Source +>Definition), it would go into the "non-free" section of Debian, which +>would alert potential users that copying and usage are restricted, so they +>should check the copyright file included in each package. (The other two +>sections are "main", consisting entirely of free software, and "contrib", +>consisting of free software which depends on non-free software, e.g. when +>PETSc linking to hypre is uploaded, its dependency on non-free hypre will +>require moving it into contrib.) In every hypre package (static libs, +>shared libs, documentation, etc.), your copyright conditions would appear +>as the file /usr/share/doc/hypre*/copyright , and users would be bound by +>those terms just as if they downloaded hypre from your! website. +> +>When/if I receive permission, I will begin working on the Debian packaging +>for hypre, and when that packaging is complete, will inform you and upload +>it into Debian. When approved by the release manager, the hypre package +>will then be propagated to dozens of Debian mirror servers around the +>world, from which any number of users can download it. Hypre will enter +>the "unstable" distribution immediately, and when it meets several +>criteria (no build failures on any architecture, no bugs of severity +>serious or higher in this package or any of its dependencies, 10 days +>since upload into unstable), it will be moved into the "testing" +>distribution. If the package is in the "testing" distribution when a +>release is made, it will be included in that "stable" distribution +>release. I would thus become the "Debian maintainer" of the hypre +>package, in the same way as I am the maintainer of packages for PETSc, +>Babel, ! ParMETIS, Surface Evolver, and installers for the Compaq Alpha +>Linux compilers. With your permission, I might make some small changes, +>such as fixing any bugs I might find. I can inform you in advance of any +>such changes, and you will be able to exercise as much or as little +>control over these changes as you like. +> +>Debian source packaging consists of: the pristine hypre source tarball, +>together with a gzipped patch including the debian/ directory, and a third +>small file with MD5 checksums of the first two and a list of Debian +>packages required to build hypre binaries; this third file will be +>GPG-signed by me to guarantee the integrity of all three files. The +>debian/ directory contains a set of scripts and definition files for the +>building of binary Debian packages based on the source code. Taken +>together, these files serve a similar purpose to the .spec file for +>creating RedHat .rpm packages, but with considerably more +>flexibility. Binary packages could include separate packages for shared +>libraries, static libraries and other development files (headers etc.), +>documentation, etc. +> +>This packaging will make hypre and packages which depend on it +>considerably easier to use, by allowing users to download, say, a fluid +>dynamics package linked against it named "fluids" by typing "apt-get +>install fluids", which would download and install fluids, the hypre shared +>library, and all other support libraries required to run fluids. Users +>(who run Debian) will not need to compile or link anything, this work will +>all be done in advance. +> +>Independent of your decision regarding Debian, I would like to request +>that you (LLNL/UC etc.) make hypre available under a free/open source +>license of some kind. For example, the Babel SIDL compiler is released +>under the GNU Lesser General Public license, which among other things, +>eliminates the need for this sort of permission request for Debian +>redistribution (though I am in frequent contact with Babel's authors, and +>consulted them before my initial upload), and also allows me to patch it +>in various ways important to my users. In your case, LLNL might be more +>interested in the GNU General Public License, which would not allow +>linking into proprietary software packages, making it similar in a way to +>your "no commercialization" license terms. (As the copyright holder, +>LLNL/UC could also license hypre to proprietary software companies under +>separate conditions.) As another example, I have simplified linking of +>the PETSc libraries with C++ co! de without the extra disk space and build +>time required by the authors' C++ scheme, and patched a problem in PETSc's +>timestepping code; both of those patches were sent to the PETSc +>authors. Thus open source licensing adds value to PETSc, as it does for +>such well-known software as Linux, Apache, Mozilla, GNOME, OpenOffice, +>autoconf/automake/libtool, etc., and could do the same for hypre. +> +>Thank you for your time and attention. I hope that you will approve of my +>request to package and distribute hypre with Debian, and that you will +>give serious consideration to open source licensing of hypre. +> +>Sincerely, +>Adam C. Powell, IV http://lyre.mit.edu/~powell/ +>Thomas B. King Assistant Professor of Materials Engineering +>77 Massachusetts Ave. Rm. 4-117 Phone (617) 452-2086 +>Cambridge, MA 02139 USA Fax (617) 253-5418 + +--Boundary_(ID_lLyocIsSFNBm/icotl0FvQ) +Content-type: text/html; charset=iso-8859-1 +Content-transfer-encoding: quoted-printable + +[omitted to eliminate unnecessary redundancy] +--Boundary_(ID_lLyocIsSFNBm/icotl0FvQ)-- --- hypre-1.6.0.orig/debian/control +++ hypre-1.6.0/debian/control @@ -0,0 +1,40 @@ +Source: hypre +Section: non-free/math +Priority: extra +Maintainer: Ubuntu MOTU Developers +XSBC-Original-Maintainer: Adam C. Powell, IV +Standards-Version: 3.6.2.1 +Build-Depends: debhelper (>= 3.0), libmpich1.0-dev, libatlas-base-dev | libblas-3gf.so +Build-Depends-Indep: latex2html + +Package: libhypre-dev +Architecture: any +Section: non-free/libdevel +Depends: libhypre1.6.0c2 (= ${Source-Version}), libatlas-base-dev | libblas-3gf.so +Suggests: hypre-doc +Description: High Performance Matrix Preconditioners - Development Files + Hypre is a high-performance matrix preconditioning library to aid in the + solution of large systems of linear equations. + . + This package contains the static library, headers, and symlinks necessary to + develop programs which use hypre. + +Package: libhypre1.6.0c2 +Architecture: any +Section: non-free/libs +Depends: ${shlibs:Depends} +Description: High Performance Matrix Preconditioners - Shared Library + Hypre is a high-performance matrix preconditioning library to aid in the + solution of large systems of linear equations. + . + This package contains the shared library. + +Package: hypre-doc +Architecture: all +Section: non-free/doc +Suggests: libhypre-dev +Description: High Performance Matrix Preconditioners - Documentation + Hypre is a high-performance matrix preconditioning library to aid in the + solution of large systems of linear equations. + . + This package contains documentation for hypre. --- hypre-1.6.0.orig/debian/index.html +++ hypre-1.6.0/debian/index.html @@ -0,0 +1,14 @@ +Installed Hypre Documentation +

Installed Hypre Documentation

+ +The installed hypre-doc Debian package contains the following documentation: + + --- hypre-1.6.0.orig/debian/libhypre-dev.overrides +++ hypre-1.6.0/debian/libhypre-dev.overrides @@ -0,0 +1,2 @@ +libhypre-dev: old-fsf-address-in-copyright-file +libhypre-dev: copyright-should-refer-to-common-license-file-for-gpl --- hypre-1.6.0.orig/debian/hypre-doc.doc-base +++ hypre-1.6.0/debian/hypre-doc.doc-base @@ -0,0 +1,16 @@ +Document: hypre-doc +Title: Hypre High-Performance Preconditioners +Author: Thomas Treadway +Abstract: HYPRE is a software library for solving large, sparse linear systems + of equations on massively parallel computers. The library was created with + the primary goal of providing users with advanced parallel preconditioners. + Issues of robustness, ease of use, flexibility, and interoperability also play + an important role. +Section: Math + +Format: HTML +Index: /usr/share/doc/hypre-doc/index.html +Files: /usr/share/doc/hypre-doc/docs/*/*.html + +Format: postscript +Files: /usr/share/doc/hypre-doc/*/*.ps.gz --- hypre-1.6.0.orig/debian/hypre-doc.docs +++ hypre-1.6.0/debian/hypre-doc.docs @@ -0,0 +1,2 @@ +docs +debian/index.html --- hypre-1.6.0.orig/debian/rules +++ hypre-1.6.0/debian/rules @@ -0,0 +1,77 @@ +#!/usr/bin/make -f +# Made with the aid of debmake, by Christoph Lameter, +# based on the sample debian/rules file for GNU hello by Ian Jackson. + +package=hypre +export DH_COMPAT=3 + +# Override compiler settings to avoid using mpicc etc., MPI stuff to use shlibs +stamp-configure: + dh_testdir + (cd src && ./configure --with-CC=gcc --with-CXX=g++ --with-F77=g77 \ + --with-blas="-lblas-3 -llapack-3" \ + --with-mpi-include=/usr/lib/mpich/include --with-mpi-libs=mpich \ + --with-mpi-lib-dirs=/usr/lib/mpich/lib/shared) + touch $@ + +build: stamp-configure + dh_testdir + $(MAKE) -C src + touch $@ + +clean: + dh_testdir + rm -f stamp-configure build + if [ -e src/Makefile ]; then $(MAKE) -C src veryclean; fi + rm -f src/config.log src/config.status src/HYPRE_config.h + rm -f `find src -name Makefile -print` + dh_clean + +install: build + install -d `pwd`/debian/tmp/usr/include + install -d `pwd`/debian/tmp/usr/lib + $(MAKE) -C src install HYPRE_INSTALL_DIR=`pwd`/debian/tmp/usr + +binary-indep: install + dh_testdir -i + dh_testroot -i + dh_installdirs -i + # Overrides file + install -d debian/hypre-doc/usr/share/lintian/overrides + install -m 644 debian/hypre-doc.overrides debian/hypre-doc/usr/share/lintian/overrides/hypre-doc + dh_movefiles -i + dh_installdocs -i + rm `find debian/hypre-doc -empty -print` + dh_installchangelogs -i + dh_compress -i + dh_fixperms -i + dh_installdeb -i + dh_gencontrol -i + dh_md5sums -i + dh_builddeb -i + +binary-arch: install + dh_testdir -a + dh_testroot -a + dh_installdirs -a + # Overrides files + install -d debian/libhypre-dev/usr/share/lintian/overrides + install -m 644 debian/libhypre-dev.overrides debian/libhypre-dev/usr/share/lintian/overrides/libhypre-dev + install -d debian/libhypre1.6.0c2/usr/share/lintian/overrides + install -m 644 debian/libhypre1.6.0c2.overrides debian/libhypre1.6.0c2/usr/share/lintian/overrides/libhypre1.6.0c2 + dh_movefiles -a + dh_installdocs -a + dh_installchangelogs -a + dh_strip -a + dh_makeshlibs -a + dh_compress -a + dh_fixperms -a + dh_installdeb -a + dh_shlibdeps -a + dh_gencontrol -a + dh_md5sums -a + dh_builddeb -a + +binary: binary-indep binary-arch + +.PHONY: binary binary-arch binary-indep clean checkroot --- hypre-1.6.0.orig/debian/libhypre-dev.files +++ hypre-1.6.0/debian/libhypre-dev.files @@ -0,0 +1,3 @@ +usr/lib/*.a +usr/lib/*.so +usr/include/*.h --- hypre-1.6.0.orig/debian/hypre-doc.overrides +++ hypre-1.6.0/debian/hypre-doc.overrides @@ -0,0 +1,2 @@ +hypre-doc: old-fsf-address-in-copyright-file +hypre-doc: copyright-should-refer-to-common-license-file-for-gpl --- hypre-1.6.0.orig/debian/changelog +++ hypre-1.6.0/debian/changelog @@ -0,0 +1,50 @@ +hypre (1.6.0-4ubuntu1) hardy; urgency=low + + * debian/control: + Adjust Build-Depends and Depends to the gfortran transition (LP: #201962) + - change atlas3-base-dev to libatlas-base-dev + - change libblas-3.so to libblas-3gf.so + * Modify Maintainer value to match the DebianMaintainerField + specification. + + -- Cesare Tirabassi Thu, 27 Mar 2008 18:24:25 +0100 + +hypre (1.6.0-4) unstable; urgency=low + + * Rebuild with new mpich and linked against libblas-3.so. + * Fixed configure to actually use -with-blas= value. + * Fixed build-depends, replacing obsolete mpich with libmpich1.0-dev and + adding version 3 BLAS dev. + * Appended c2 to shared lib package name since it includes C++ objects. + * Massive changes to link shared libs with all of their dependent libs. + * Removed HYPRE_BuildIJMatrixFromDistributedMatrix() because it uses an + obsolete IJ_mv API. + * Got rid of a bunch of @s in Makefiles to make build more transparent. + * Added libHYPRE_Euclid to SSTRUCT_LFLAGS in test/Makefile.in so it works. + * Added Makefile removal to clean target to avoid bloated .diff.gz. + * Added installation of lintian overrides files. + + -- Adam C. Powell, IV Thu, 8 Sep 2005 23:22:43 -0400 + +hypre (1.6.0-3) unstable; urgency=low + + * Commented -DBOOL_NOT_SUPPORTED erroneous flags in + src/FEI_mv/fei-hypre/Makefile.in (closes: #249525). + * Removed gcc | c-compiler from Build-Depends. + * Added lintian overrides for GPL false positives in copyright file. + + -- Adam C. Powell, IV Wed, 11 Aug 2004 22:25:09 -0400 + +hypre (1.6.0-2) unstable; urgency=low + + * Added mpich to build-depends (closes: #220591). + + -- Adam C. Powell, IV Thu, 13 Nov 2003 10:28:17 -0500 + +hypre (1.6.0-1) unstable; urgency=low + + * First packaging attempt (closes: #207414). + * Added shared library building to each Makefile.in. + * doc-base index for user and reference manuals. + + -- Adam C. Powell, IV Thu, 2 Oct 2003 14:52:22 -0400 --- hypre-1.6.0.orig/src/configure +++ hypre-1.6.0/src/configure @@ -9195,7 +9195,9 @@ cat >> confdefs.h <<\EOF #define HYPRE_USING_HYPRE_BLAS 1 EOF - +elif test "$casc_using_blas" != "yes" +then + BLASLIBFLAGS=$casc_using_blas fi --- hypre-1.6.0.orig/src/Makefile.in +++ hypre-1.6.0/src/Makefile.in @@ -35,8 +35,8 @@ seq_mv\ parcsr_mv\ distributed_matrix\ - matrix_matrix\ IJ_mv\ + matrix_matrix\ distributed_ls\ parcsr_ls @@ -68,13 +68,11 @@ seq_ls @HYPRE_PETSCLIBDIRS@ @HYPRE_BABELLIBDIR@ @MLI_DIR@ all: krylov struct sstruct IJ fei - @ \ echo "Making test drivers ..."; \ (cd test; make veryclean; make); \ echo "" beta: all - @ \ HYPRE_INSTALL_DIR=`pwd`/hypre; \ export HYPRE_INSTALL_DIR; \ for i in ${HYPRE_EXTRA_DIRS}; \ @@ -91,7 +89,6 @@ echo "" krylov: base - @ \ HYPRE_INSTALL_DIR=`pwd`/hypre; \ export HYPRE_INSTALL_DIR; \ for i in ${HYPRE_KRYLOV_DIRS}; \ @@ -105,7 +102,6 @@ done struct: base - @ \ HYPRE_INSTALL_DIR=`pwd`/hypre; \ export HYPRE_INSTALL_DIR; \ for i in ${HYPRE_STRUCT_DIRS}; \ @@ -119,7 +115,6 @@ done sstruct: struct IJ - @ \ HYPRE_INSTALL_DIR=`pwd`/hypre; \ export HYPRE_INSTALL_DIR; \ for i in ${HYPRE_SSTRUCT_DIRS}; \ @@ -133,7 +128,6 @@ done IJ: base - @ \ HYPRE_INSTALL_DIR=`pwd`/hypre; \ export HYPRE_INSTALL_DIR; \ for i in ${HYPRE_IJ_DIRS}; \ @@ -147,7 +141,6 @@ done fei: IJ krylov - @ \ HYPRE_INSTALL_DIR=`pwd`/hypre; \ export HYPRE_INSTALL_DIR; \ for i in ${HYPRE_FEI_DIRS}; \ @@ -173,7 +166,6 @@ # special autotest target nofei: IJ krylov - @ \ HYPRE_INSTALL_DIR=`pwd`/hypre; \ export HYPRE_INSTALL_DIR; \ for i in ${HYPRE_FEI_DIRS}; \ @@ -199,7 +191,6 @@ rm -rf hypre/tmp base: - @ \ mkdir -p hypre/include; \ mkdir -p hypre/lib; \ HYPRE_INSTALL_DIR=`pwd`/hypre; \ @@ -217,7 +208,6 @@ done install: all - @ \ if [ ! "$$HYPRE_INSTALL_DIR" ]; \ then \ echo "Error: set the HYPRE_INSTALL_DIR environment variable"; \ @@ -233,7 +223,6 @@ rm -Rf hypre clean: - @ \ for i in ${HYPRE_DIRS} ${HYPRE_EXTRA_DIRS}; \ do \ if [ -d $$i ]; \ @@ -246,7 +235,6 @@ (cd test; make clean) veryclean: - @ \ rm -Rf hypre; \ for i in ${HYPRE_DIRS} ${HYPRE_EXTRA_DIRS}; \ do \ --- hypre-1.6.0.orig/src/IJ_mv/Makefile.in +++ hypre-1.6.0/src/IJ_mv/Makefile.in @@ -8,7 +8,7 @@ #EHEADER*********************************************************************** .SUFFIXES: -.SUFFIXES: .c .f .o +.SUFFIXES: .c .f .o .lo srcdir = @srcdir@ VPATH = @srcdir@ @@ -70,23 +70,24 @@ F90_HYPRE_IJVector.c OBJS = ${FILES:.c=.o} +SHLOBJS = ${FILES:.c=.lo} ################################################################## # Targets ################################################################## -all: libHYPRE_IJ_mv.a +all: libHYPRE_IJ_mv.a libHYPRE_IJ_mv.so install: all @cp -f $(srcdir)/HYPRE_*.h $$HYPRE_INSTALL_DIR/include/. @cp -f $(srcdir)/IJ_mv.h $$HYPRE_INSTALL_DIR/include/. - @cp -f libHYPRE_*.a $$HYPRE_INSTALL_DIR/lib/. + @cp -df libHYPRE_*.a libHYPRE_*.so* $$HYPRE_INSTALL_DIR/lib/. clean: - @rm -f *.o + @rm -f *.o *.lo veryclean: clean - @rm -f libHYPRE_*.a + @rm -f libHYPRE_*.a libHYPRE_*.so* @rm -f driver ################################################################## @@ -98,11 +99,18 @@ ar -rcu $@ ${OBJS} ${RANLIB} $@ -driver: driver.o libHYPRE_IJ_mv.a +libHYPRE_IJ_mv.so: ${SHLOBJS} ../utilities/libHYPRE_utilities.so ../parcsr_mv/libHYPRE_parcsr_mv.so + @echo "Building $@ ... " + ${CC} -shared $^ -Wl,-soname,$@.1.6.0 -o $@.1.6.0 \ + ${MPILIBFLAGS} -Wl,-z,defs + ln -s $@.1.6.0 $@ + +driver: driver.o libHYPRE_IJ_mv.so @echo "Linking" $@ "... " ${CC} -o driver driver.o ${LFLAGS} ${OBJS}: ${HEADERS} +${SHLOBJS}: ${HEADERS} ################################################################## # Generic rules @@ -110,3 +118,6 @@ .c.o: ${CC} -o $@ -c ${CFLAGS} $< + +.c.lo: + ${CC} -o $@ -c -fPIC -DPIC ${CFLAGS} $< --- hypre-1.6.0.orig/src/krylov/Makefile.in +++ hypre-1.6.0/src/krylov/Makefile.in @@ -8,7 +8,7 @@ #EHEADER*********************************************************************** .SUFFIXES: -.SUFFIXES: .c .f .o +.SUFFIXES: .c .f .o .lo srcdir = @srcdir@ VPATH = @srcdir@ @@ -44,23 +44,24 @@ HYPRE_pcg.c OBJS = ${FILES:.c=.o} +SHLOBJS = ${FILES:.c=.lo} ################################################################## # Targets ################################################################## -all: libkrylov.a +all: libkrylov.a libkrylov.so install: all @cp -f $(srcdir)/krylov.h $$HYPRE_INSTALL_DIR/include/. - @cp -f lib*.a $$HYPRE_INSTALL_DIR/lib/. + @cp -df lib*.a lib*.so* $$HYPRE_INSTALL_DIR/lib/. clean: - @rm -f *.o *.dxx + @rm -f *.o *.lo *.dxx @rm -f *.prj @rm -f *.kdd veryclean: clean - @rm -f lib*.a + @rm -f lib*.a lib*.so* ################################################################## @@ -72,7 +73,13 @@ ar -rcu $@ ${OBJS} ${RANLIB} $@ +libkrylov.so: ${SHLOBJS} ../utilities/libHYPRE_utilities.so + @echo "Building $@ ... " + $(CC) -shared $^ -Wl,-soname,$@.1.6.0 -o $@.1.6.0 -lm -Wl,-z,defs + ln -s $@.1.6.0 $@ + ${OBJS}: ${HEADERS} +${SHLOBJS}: ${HEADERS} @@ -83,3 +90,5 @@ .c.o: ${CC} -o $@ -c ${CFLAGS} $< +.c.lo: + $(CC) -o $@ -c -fPIC -DPIC ${CFLAGS} $< --- hypre-1.6.0.orig/src/matrix_matrix/Makefile.in +++ hypre-1.6.0/src/matrix_matrix/Makefile.in @@ -9,29 +9,30 @@ .SUFFIXES: -.SUFFIXES: .c .f .o +.SUFFIXES: .c .f .o .lo srcdir = @srcdir@ VPATH = @srcdir@ -default: lib +default: libHYPRE_MatrixMatrix.a libHYPRE_MatrixMatrix.so -all: lib +all: libHYPRE_MatrixMatrix.a libHYPRE_MatrixMatrix.so install:all @cp -f $(srcdir)/HYPRE_*.h $$HYPRE_INSTALL_DIR/include/. - @cp -f libHYPRE_*.a $$HYPRE_INSTALL_DIR/lib/. + @cp -df libHYPRE_*.a libHYPRE_*.so* $$HYPRE_INSTALL_DIR/lib/. HEADERS = HYPREFILES =\ HYPRE_ConvertPETScMatrixToDistributedMatrix.c \ - HYPRE_ConvertParCSRMatrixToDistributedMatrix.c \ - HYPRE_BuildIJMatrixFromDistributedMatrix.c + HYPRE_ConvertParCSRMatrixToDistributedMatrix.c +# HYPRE_BuildIJMatrixFromDistributedMatrix.c FILES = $(HYPREFILES) $(LOCALFILES) OBJS = ${FILES:.c=.o} +SHLOBJS = ${FILES:.c=.lo} CC = @CC@ @@ -75,10 +76,15 @@ # Main rules ################################################################## -lib: $(PROTOS) ${OBJS} +libHYPRE_MatrixMatrix.a: $(PROTOS) ${OBJS} @echo "Building $@ ... " @ar -rcu libHYPRE_MatrixMatrix.a ${OBJS} ${RANLIB} libHYPRE_MatrixMatrix.a +libHYPRE_MatrixMatrix.so: $(PROTOS) ${SHLOBJS} ../parcsr_mv/libHYPRE_parcsr_mv.so ../distributed_matrix/libHYPRE_DistributedMatrix.so ../IJ_mv/libHYPRE_IJ_mv.so + ${CC} -shared ${SHLOBJS} -Wl,-soname,libHYPRE_MatrixMatrix.so.1.6.0 -o libHYPRE_MatrixMatrix.so.1.6.0 \ + -L../parcsr_mv -lHYPRE_parcsr_mv -L../IJ_mv -lHYPRE_IJ_mv \ + -L../distributed_matrix -lHYPRE_DistributedMatrix -Wl,-z,defs + ln -s libHYPRE_MatrixMatrix.so.1.6.0 libHYPRE_MatrixMatrix.so ${OBJS}: ${HEADERS} @@ -86,10 +92,10 @@ # Targets ################################################################## clean: - @rm -f *.o *.dxx + @rm -f *.o *.lo *.dxx veryclean: clean - @rm -f lib*.a + @rm -f lib*.a lib*.so* ################################################################## @@ -105,4 +111,11 @@ .f.o: ${F77} -o $@ -c ${FFLAGS} $< +.c.lo: + ${CC} -o $@ -c -fPIC -DPIC ${CFLAGS} $< +.cc.lo: + ${CXX} -o $@ -c -fPIC -DPIC ${CFLAGS} $< + +.f.lo: + ${F77} -o $@ -c -fPIC -DPIC ${FFLAGS} $< --- hypre-1.6.0.orig/src/struct_ls/Makefile.in +++ hypre-1.6.0/src/struct_ls/Makefile.in @@ -8,7 +8,7 @@ #EHEADER*********************************************************************** .SUFFIXES: -.SUFFIXES: .c .f .o +.SUFFIXES: .c .f .o .lo srcdir = @srcdir@ VPATH = @srcdir@ @@ -93,24 +93,25 @@ F90_HYPRE_struct_smg.c OBJS = ${FILES:.c=.o} +SHLOBJS = ${FILES:.c=.lo} ################################################################## # Targets ################################################################## -all: libHYPRE_struct_ls.a +all: libHYPRE_struct_ls.a libHYPRE_struct_ls.so install: all @cp -f $(srcdir)/HYPRE_*.h $$HYPRE_INSTALL_DIR/include/. @cp -f $(srcdir)/struct_ls.h $$HYPRE_INSTALL_DIR/include/. - @cp -f libHYPRE_*.a $$HYPRE_INSTALL_DIR/lib/. + @cp -df libHYPRE_*.a libHYPRE_*.so* $$HYPRE_INSTALL_DIR/lib/. clean: - @rm -f *.o *.dxx + @rm -f *.o *.lo *.dxx @rm -f *.prj @rm -f *.kdd veryclean: clean - @rm -f libHYPRE_*.a + @rm -f libHYPRE_*.a libHYPRE_*.so* ################################################################## @@ -122,7 +123,14 @@ ar -rcu $@ ${OBJS} ${RANLIB} $@ +libHYPRE_struct_ls.so: ${SHLOBJS} ../utilities/libHYPRE_utilities.so ../krylov/libkrylov.so ../struct_mv/libHYPRE_struct_mv.so + @echo "Building $@ ... " + ${CC} -shared $^ -Wl,-soname,$@.1.6.0 -o $@.1.6.0 \ + @MPILIBDIRS@ @MPILIBS@ @MPIFLAGS@ -lm -Wl,-z,defs + ln -s $@.1.6.0 $@ + ${OBJS}: ${HEADERS} +${SHLOBJS}: ${HEADERS} @@ -133,3 +141,5 @@ .c.o: ${CC} -o $@ -c ${CFLAGS} $< +.c.lo: + ${CC} -o $@ -c -fPIC -DPIC ${CFLAGS} $< --- hypre-1.6.0.orig/src/FEI_mv/fei-hypre/Makefile.in +++ hypre-1.6.0/src/FEI_mv/fei-hypre/Makefile.in @@ -7,7 +7,7 @@ # $Revision: 2.2 $ #EHEADER*********************************************************************** -.SUFFIXES: .C .c .f .o +.SUFFIXES: .C .c .f .o .lo HYPRE_ARCH = @ARCH@ @@ -32,8 +32,8 @@ CXXINCLUDES=@INCLUDES@ @MPIINCLUDE@ #CDEFS = -DSUPERLU -DMLPACK #CXXDEFS = -DSUPERLU -DMLPACK -CDEFS = -DBOOL_NOT_SUPPORTED -CXXDEFS = -DBOOL_NOT_SUPPORTED +#CDEFS = -DBOOL_NOT_SUPPORTED +#CXXDEFS = -DBOOL_NOT_SUPPORTED CFLAGS = -w ${C_COMPILE_FLAGS} ${CDEFS}\ -I../..\ @@ -96,7 +96,7 @@ -ldxml -lm FILES = HYPRE_LinSysCore.C HYPRE_LSC_aux.C cfei_hypre.C hypre_slide_reduce.C \ - hypre_schur_reduce.C hypre_lsi_misc.c hypre_lsi_ddamg.C \ + hypre_schur_reduce.C hypre_lsi_misc.c \ HYPRE_parcsr_ml.c HYPRE_LSI_ddilut.c hypre_lsi_amge.c \ HYPRE_parcsr_bicgstabl.c bicgstabl.c fegridinfo.C \ HYPRE_LSI_poly.c HYPRE_LSI_ddict.c HYPRE_parcsr_TFQmr.c \ @@ -104,6 +104,7 @@ TEMP = ${FILES:.c=.o} OBJS = ${TEMP:.C=.o} +SHLOBJS = ${OBJS:.o=.lo} FILESV12 = HYPRE_LinSysCore.C HYPRE_LSC_aux.C hypre_slide_reduce.C \ hypre_schur_reduce.C hypre_lsi_misc.c hypre_lsi_ddamg.C \ @@ -114,12 +115,13 @@ TEMPV12 = ${FILESV12:.c=.o} OBJSV12 = ${TEMPV12:.C=.o} +SHLOBJSV12 = ${OBJSV12:.o=.lo} ################################################################## # Main rules ################################################################## -all: libHYPRE_FEI.a +all: libHYPRE_FEI.a libHYPRE_FEI.so lib: all @@ -127,9 +129,9 @@ @cp -f $(srcdir)/HYPRE_LinSysCore.h $$HYPRE_INSTALL_DIR/include @cp -f $(srcdir)/cfei_hypre.h $$HYPRE_INSTALL_DIR/include @cp -f $(srcdir)/cfei-hypre.h $$HYPRE_INSTALL_DIR/include - @cp -f libHYPRE_FEI.a $$HYPRE_INSTALL_DIR/lib + @cp -df libHYPRE_FEI.a libHYPRE_FEI.so* $$HYPRE_INSTALL_DIR/lib -driver: driver.o libHYPRE_FEI.a +driver: driver.o libHYPRE_FEI.so @echo "Linking" $@ "... " ${CXX} -o $@ driver.o ${LFLAGS} @@ -138,23 +140,35 @@ @ar -rcu libHYPRE_FEI.a ${OBJS} ${RANLIB} $@ +libHYPRE_FEI.so: ${SHLOBJS} ../../utilities/libHYPRE_utilities.so ../../krylov/libkrylov.so ../../parcsr_mv/libHYPRE_parcsr_mv.so ../../IJ_mv/libHYPRE_IJ_mv.so ../../parcsr_ls/libHYPRE_parcsr_ls.so + @echo "Building $@ ... " + ${CC} -shared $^ -Wl,-soname,$@.1.6.0 -o $@.1.6.0 \ + @MPILIBDIRS@ @MPILIBS@ @MPIFLAGS@ -lstdc++ -lm -Wl,-z,defs + ln -s $@.1.6.0 $@ + libHYPRE_FEI_V12.a: ${OBJSV12} @echo "Building $@ ... " ${CXX} -o $@ -c ${CXXFLAGS} -DFEI_V1.2 HYPRE_LinSysCore.C @ar -rcu libHYPRE_FEI_V12.a ${OBJSV12} ${RANLIB} $@ +libHYPRE_FEI_V12.so: ${SHLOBJSV12} + @echo "Building $@ ... " + ${CXX} -o $@ -c ${CXXFLAGS} -fPIC -DPIC -DFEI_V1.2 HYPRE_LinSysCore.C + ${CC} -shared $^ -Wl,-soname,$@.1.6.0 -o $@.1.6.0 -Wl,-z,defs + ln -s $@.1.6.0 $@ + ################################################################## # Targets ################################################################## clean: @touch erase.tmp - @rm -rf erase.tmp *.o ti_files driver + @rm -rf erase.tmp *.o *.lo ti_files driver veryclean: clean @touch erase.tmp - @rm -rf erase.tmp *.o *.a ti_files driver + @rm -rf erase.tmp *.o *.lo *.a *.so* ti_files driver ################################################################## @@ -167,3 +181,8 @@ .c.o: ${CC} -o $@ ${DEFINES} -c ${CFLAGS} $< +.C.lo: + ${CXX} -o $@ ${DEFINES} -c -fPIC -DPIC ${CXXFLAGS} $< + +.c.lo: + ${CC} -o $@ ${DEFINES} -c -fPIC -DPIC ${CFLAGS} $< --- hypre-1.6.0.orig/src/FEI_mv/SuperLU/Makefile.in +++ hypre-1.6.0/src/FEI_mv/SuperLU/Makefile.in @@ -8,7 +8,7 @@ #EHEADER*********************************************************************** .SUFFIXES: -.SUFFIXES: .c .f .o +.SUFFIXES: .c .f .o .lo srcdir = @srcdir@ VPATH = @srcdir@ @@ -54,6 +54,7 @@ dlangs.c \ dlaqgs.c \ dmemory.c \ + dmyblas2.c \ dpanel_bmod.c \ dpanel_dfs.c \ dpivotL.c \ @@ -76,22 +77,23 @@ util.c OBJS = ${FILES:.c=.o} +SHLOBJS = ${FILES:.c=.lo} ################################################################## # Targets ################################################################## -all: libHYPRE_superlu.a +all: libHYPRE_superlu.a libHYPRE_superlu.so install: all @cp -f *.h $$HYPRE_INSTALL_DIR/include/. - @cp -f libHYPRE_*.a $$HYPRE_INSTALL_DIR/lib/. + @cp -df libHYPRE_*.a *.so* $$HYPRE_INSTALL_DIR/lib/. clean: - @rm -f *.o + @rm -f *.o *.lo veryclean: clean - @rm -f libHYPRE_*.a + @rm -f libHYPRE_*.a libHYPRE_*.so* ################################################################## # Rules @@ -102,7 +104,14 @@ ar -rcu $@ ${OBJS} ${RANLIB} $@ +libHYPRE_superlu.so: ${SHLOBJS} + @echo "Building $@ ... " + ${CC} -shared $^ -Wl,-soname,$@.1.6.0 -o $@.1.6.0 \ + @BLASLIBFLAGS@ -Wl,-z,defs + ln -s $@.1.6.0 $@ + ${OBJS}: ${HEADERS} +${SHLOBJS}: ${HEADERS} ################################################################## # Generic rules @@ -114,3 +123,9 @@ .f.o: ${F77} -o $@ -c ${FFLAGS} $< +.c.lo: + ${CC} -o $@ -c ${CFLAGS} -fPIC -DPIC $< + +.f.lo: + ${F77} -o $@ -c ${FFLAGS} -fPIC -DPIC $< + --- hypre-1.6.0.orig/src/FEI_mv/SuperLU/dmyblas2.c +++ hypre-1.6.0/src/FEI_mv/SuperLU/dmyblas2.c @@ -0,0 +1,225 @@ + + +/* + * -- SuperLU routine (version 2.0) -- + * Univ. of California Berkeley, Xerox Palo Alto Research Center, + * and Lawrence Berkeley National Lab. + * November 15, 1997 + * + */ +/* + * File name: dmyblas2.c + * Purpose: + * Level 2 BLAS operations: solves and matvec, written in C. + * Note: + * This is only used when the system lacks an efficient BLAS library. + */ + +/* + * Solves a dense UNIT lower triangular system. The unit lower + * triangular matrix is stored in a 2D array M(1:nrow,1:ncol). + * The solution will be returned in the rhs vector. + */ +void dlsolve ( int ldm, int ncol, double *M, double *rhs ) +{ + int k; + double x0, x1, x2, x3, x4, x5, x6, x7; + double *M0; + register double *Mki0, *Mki1, *Mki2, *Mki3, *Mki4, *Mki5, *Mki6, *Mki7; + register int firstcol = 0; + + M0 = &M[0]; + + while ( firstcol < ncol - 7 ) { /* Do 8 columns */ + Mki0 = M0 + 1; + Mki1 = Mki0 + ldm + 1; + Mki2 = Mki1 + ldm + 1; + Mki3 = Mki2 + ldm + 1; + Mki4 = Mki3 + ldm + 1; + Mki5 = Mki4 + ldm + 1; + Mki6 = Mki5 + ldm + 1; + Mki7 = Mki6 + ldm + 1; + + x0 = rhs[firstcol]; + x1 = rhs[firstcol+1] - x0 * *Mki0++; + x2 = rhs[firstcol+2] - x0 * *Mki0++ - x1 * *Mki1++; + x3 = rhs[firstcol+3] - x0 * *Mki0++ - x1 * *Mki1++ - x2 * *Mki2++; + x4 = rhs[firstcol+4] - x0 * *Mki0++ - x1 * *Mki1++ - x2 * *Mki2++ + - x3 * *Mki3++; + x5 = rhs[firstcol+5] - x0 * *Mki0++ - x1 * *Mki1++ - x2 * *Mki2++ + - x3 * *Mki3++ - x4 * *Mki4++; + x6 = rhs[firstcol+6] - x0 * *Mki0++ - x1 * *Mki1++ - x2 * *Mki2++ + - x3 * *Mki3++ - x4 * *Mki4++ - x5 * *Mki5++; + x7 = rhs[firstcol+7] - x0 * *Mki0++ - x1 * *Mki1++ - x2 * *Mki2++ + - x3 * *Mki3++ - x4 * *Mki4++ - x5 * *Mki5++ + - x6 * *Mki6++; + + rhs[++firstcol] = x1; + rhs[++firstcol] = x2; + rhs[++firstcol] = x3; + rhs[++firstcol] = x4; + rhs[++firstcol] = x5; + rhs[++firstcol] = x6; + rhs[++firstcol] = x7; + ++firstcol; + + for (k = firstcol; k < ncol; k++) + rhs[k] = rhs[k] - x0 * *Mki0++ - x1 * *Mki1++ + - x2 * *Mki2++ - x3 * *Mki3++ + - x4 * *Mki4++ - x5 * *Mki5++ + - x6 * *Mki6++ - x7 * *Mki7++; + + M0 += 8 * ldm + 8; + } + + while ( firstcol < ncol - 3 ) { /* Do 4 columns */ + Mki0 = M0 + 1; + Mki1 = Mki0 + ldm + 1; + Mki2 = Mki1 + ldm + 1; + Mki3 = Mki2 + ldm + 1; + + x0 = rhs[firstcol]; + x1 = rhs[firstcol+1] - x0 * *Mki0++; + x2 = rhs[firstcol+2] - x0 * *Mki0++ - x1 * *Mki1++; + x3 = rhs[firstcol+3] - x0 * *Mki0++ - x1 * *Mki1++ - x2 * *Mki2++; + + rhs[++firstcol] = x1; + rhs[++firstcol] = x2; + rhs[++firstcol] = x3; + ++firstcol; + + for (k = firstcol; k < ncol; k++) + rhs[k] = rhs[k] - x0 * *Mki0++ - x1 * *Mki1++ + - x2 * *Mki2++ - x3 * *Mki3++; + + M0 += 4 * ldm + 4; + } + + if ( firstcol < ncol - 1 ) { /* Do 2 columns */ + Mki0 = M0 + 1; + Mki1 = Mki0 + ldm + 1; + + x0 = rhs[firstcol]; + x1 = rhs[firstcol+1] - x0 * *Mki0++; + + rhs[++firstcol] = x1; + ++firstcol; + + for (k = firstcol; k < ncol; k++) + rhs[k] = rhs[k] - x0 * *Mki0++ - x1 * *Mki1++; + + } + +} + +/* + * Solves a dense upper triangular system. The upper triangular matrix is + * stored in a 2-dim array M(1:ldm,1:ncol). The solution will be returned + * in the rhs vector. + */ +void +dusolve ( ldm, ncol, M, rhs ) +int ldm; /* in */ +int ncol; /* in */ +double *M; /* in */ +double *rhs; /* modified */ +{ + double xj; + int jcol, j, irow; + + jcol = ncol - 1; + + for (j = 0; j < ncol; j++) { + + xj = rhs[jcol] / M[jcol + jcol*ldm]; /* M(jcol, jcol) */ + rhs[jcol] = xj; + + for (irow = 0; irow < jcol; irow++) + rhs[irow] -= xj * M[irow + jcol*ldm]; /* M(irow, jcol) */ + + jcol--; + + } +} + + +/* + * Performs a dense matrix-vector multiply: Mxvec = Mxvec + M * vec. + * The input matrix is M(1:nrow,1:ncol); The product is returned in Mxvec[]. + */ +void dmatvec ( ldm, nrow, ncol, M, vec, Mxvec ) + +int ldm; /* in -- leading dimension of M */ +int nrow; /* in */ +int ncol; /* in */ +double *M; /* in */ +double *vec; /* in */ +double *Mxvec; /* in/out */ + +{ + double vi0, vi1, vi2, vi3, vi4, vi5, vi6, vi7; + double *M0; + register double *Mki0, *Mki1, *Mki2, *Mki3, *Mki4, *Mki5, *Mki6, *Mki7; + register int firstcol = 0; + int k; + + M0 = &M[0]; + while ( firstcol < ncol - 7 ) { /* Do 8 columns */ + + Mki0 = M0; + Mki1 = Mki0 + ldm; + Mki2 = Mki1 + ldm; + Mki3 = Mki2 + ldm; + Mki4 = Mki3 + ldm; + Mki5 = Mki4 + ldm; + Mki6 = Mki5 + ldm; + Mki7 = Mki6 + ldm; + + vi0 = vec[firstcol++]; + vi1 = vec[firstcol++]; + vi2 = vec[firstcol++]; + vi3 = vec[firstcol++]; + vi4 = vec[firstcol++]; + vi5 = vec[firstcol++]; + vi6 = vec[firstcol++]; + vi7 = vec[firstcol++]; + + for (k = 0; k < nrow; k++) + Mxvec[k] += vi0 * *Mki0++ + vi1 * *Mki1++ + + vi2 * *Mki2++ + vi3 * *Mki3++ + + vi4 * *Mki4++ + vi5 * *Mki5++ + + vi6 * *Mki6++ + vi7 * *Mki7++; + + M0 += 8 * ldm; + } + + while ( firstcol < ncol - 3 ) { /* Do 4 columns */ + + Mki0 = M0; + Mki1 = Mki0 + ldm; + Mki2 = Mki1 + ldm; + Mki3 = Mki2 + ldm; + + vi0 = vec[firstcol++]; + vi1 = vec[firstcol++]; + vi2 = vec[firstcol++]; + vi3 = vec[firstcol++]; + for (k = 0; k < nrow; k++) + Mxvec[k] += vi0 * *Mki0++ + vi1 * *Mki1++ + + vi2 * *Mki2++ + vi3 * *Mki3++ ; + + M0 += 4 * ldm; + } + + while ( firstcol < ncol ) { /* Do 1 column */ + + Mki0 = M0; + vi0 = vec[firstcol++]; + for (k = 0; k < nrow; k++) + Mxvec[k] += vi0 * *Mki0++; + + M0 += ldm; + } + +} + --- hypre-1.6.0.orig/src/distributed_ls/Makefile.in +++ hypre-1.6.0/src/distributed_ls/Makefile.in @@ -19,7 +19,6 @@ Euclid all: - @ \ for i in ${HYPRE_IJ_DIRS}; \ do \ if [ -d $$i ]; \ @@ -32,7 +31,6 @@ install: all clean: - @ \ for i in ${HYPRE_IJ_DIRS}; \ do \ if [ -d $$i ]; \ @@ -42,7 +40,6 @@ done veryclean: - @ \ for i in ${HYPRE_IJ_DIRS}; \ do \ if [ -d $$i ]; \ --- hypre-1.6.0.orig/src/distributed_ls/ParaSails/Makefile.in +++ hypre-1.6.0/src/distributed_ls/ParaSails/Makefile.in @@ -7,7 +7,7 @@ # $Revision: 2.1 $ #EHEADER*********************************************************************** -.SUFFIXES: .c .f .o +.SUFFIXES: .c .f .o .lo srcdir = @srcdir@ VPATH = @srcdir@ @@ -80,14 +80,15 @@ StoredRows.c OBJS = ${FILES:.c=.o} +SHLOBJS = ${FILES:.c=.lo} ################################################################## # Targets ################################################################## -all: libHYPRE_ParaSails.a +all: libHYPRE_ParaSails.a libHYPRE_ParaSails.so -driver: driver.o libHYPRE_ParaSails.a +driver: driver.o libHYPRE_ParaSails.so @echo "Linking" $@ "... " ${CC} -o $@ driver.o ${LFLAGS} @@ -99,13 +100,13 @@ # @cp -f libHYPRE_*.a $$HYPRE_INSTALL_DIR/lib/. install: all - @cp -f libHYPRE_*.a $$HYPRE_INSTALL_DIR/lib/. + cp -df libHYPRE_*.a libHYPRE_*.so* $$HYPRE_INSTALL_DIR/lib/. clean: - @rm -f *.o + rm -f *.o *.lo veryclean: clean - @rm -f libHYPRE_*.a + rm -f libHYPRE_*.a libHYPRE_*.so* ################################################################## @@ -117,7 +118,16 @@ ar -rcu $@ ${OBJS} ${RANLIB} $@ +libHYPRE_ParaSails.so: ${SHLOBJS} ../../utilities/libHYPRE_utilities.so ../../distributed_matrix/libHYPRE_DistributedMatrix.so + @echo "Building $@ ... " + ${CC} -shared $^ -Wl,-soname,$@.1.6.0 -o $@.1.6.0 \ + -L../../utilities -lHYPRE_utilities \ + -L../../distributed_matrix -lHYPRE_DistributedMatrix \ + @MPILIBDIRS@ @MPILIBS@ @MPIFLAGS@ @BLASLIBFLAGS@ -lm -Wl,-z,defs + ln -s $@.1.6.0 $@ + ${OBJS}: ${HEADERS} +${SHLOBJS}: ${HEADERS} @@ -131,4 +141,8 @@ .f.o: ${F77} -o $@ -c ${FFLAGS} $< +.c.lo: + ${CC} -o $@ -c -fPIC -DPIC ${CFLAGS} $< +.f.lo: + ${F77} -o $@ -c -fPIC -DPIC ${FFLAGS} $< --- hypre-1.6.0.orig/src/distributed_ls/Euclid/Makefile.in +++ hypre-1.6.0/src/distributed_ls/Euclid/Makefile.in @@ -7,7 +7,7 @@ # $Revision: 2.3 $ #EHEADER*********************************************************************** -.SUFFIXES: .c .f .o +.SUFFIXES: .c .f .o .lo srcdir = @srcdir@ VPATH = @srcdir@ @@ -97,25 +97,26 @@ sig_dh.c OBJS = ${FILES:.c=.o} +SHLOBJS = ${FILES:.c=.lo} ################################################################## # Targets ################################################################## -all: libHYPRE_Euclid.a +all: libHYPRE_Euclid.a libHYPRE_Euclid.so -driver: driver.o libHYPRE_Euclid.a +driver: driver.o libHYPRE_Euclid.so @echo "Linking" $@ "... " ${CC} -o $@ driver.o ./libHYPRE_Euclid.a ${LFLAGS} install: all - @cp -f libHYPRE_*.a $$HYPRE_INSTALL_DIR/lib/. + cp -df libHYPRE_*.a libHYPRE_*.so* $$HYPRE_INSTALL_DIR/lib/. clean: - @rm -f *.o driver + rm -f *.o *.lo driver veryclean: clean - @rm -f libHYPRE_*.a + rm -f libHYPRE_*.a libHYPRE_*.so* ################################################################## @@ -127,8 +128,14 @@ ar -rcu $@ ${OBJS} ${RANLIB} $@ +libHYPRE_Euclid.so: ${SHLOBJS} ../../parcsr_mv/libHYPRE_parcsr_mv.so + @echo "Building $@ ... " + ${CC} -shared $^ -Wl,-soname,$@.1.6.0 -o $@.1.6.0 \ + -L../../parcsr_mv -lHYPRE_parcsr_mv ${MPILIBFLAGS} -lm -Wl,-z,defs + ln -s $@.1.6.0 $@ ${OBJS}: ${HEADERS} +${SHLOBJS}: ${HEADERS} ################################################################## @@ -140,3 +147,9 @@ .f.o: ${F77} -c -o $@ ${FFLAGS} $< + +.c.lo: + ${CC} -c -fPIC -DPIC -o $@ ${CFLAGS} $< + +.f.lo: + ${F77} -c -fPIC -DPIC -o $@ ${FFLAGS} $< --- hypre-1.6.0.orig/src/distributed_ls/pilut/Makefile.in +++ hypre-1.6.0/src/distributed_ls/pilut/Makefile.in @@ -8,16 +8,16 @@ #EHEADER*********************************************************************** .SUFFIXES: -.SUFFIXES: .c .f .o +.SUFFIXES: .c .f .o .lo srcdir = @srcdir@ VPATH = @srcdir@ -all: libHYPRE_DistributedMatrixPilutSolver.a +all: libHYPRE_DistributedMatrixPilutSolver.a libHYPRE_DistributedMatrixPilutSolver.so install:all - @cp -f $(srcdir)/HYPRE_*.h $$HYPRE_INSTALL_DIR/include/. - @cp -f libHYPRE_*.a $$HYPRE_INSTALL_DIR/lib/. + cp -f $(srcdir)/HYPRE_*.h $$HYPRE_INSTALL_DIR/include/. + cp -df libHYPRE_*.a libHYPRE_*.so* $$HYPRE_INSTALL_DIR/lib/. MPI_INCLUDES = -I/usr/local/mpi/mpich/include MPI_LIBDIR = -L/usr/local/mpi/mpich/lib/solaris/ch_p4/ @@ -54,8 +54,10 @@ DistributedMatrixPilutSolver.h const.h ilu.h macros.h struct.h OBJS = ${FILES:.c=.o} +SHLOBJS = ${FILES:.c=.lo} ${OBJS}: ${HEADERS} +${SHLOBJS}: ${HEADERS} CC = @CC@ CXX = @CXX@ @@ -96,14 +98,20 @@ ar -rcu $@ ${OBJS} @RANLIB@ $@ +libHYPRE_DistributedMatrixPilutSolver.so: ${PROTOS} ${SHLOBJS} ../../utilities/libHYPRE_utilities.so ../../distributed_matrix/libHYPRE_DistributedMatrix.so + @echo "Building $@ ... " + ${CC} -shared $^ -Wl,-soname,$@.1.6.0 -o $@.1.6.0 \ + @MPILIBDIRS@ @MPILIBS@ @MPIFLAGS@ @BLASLIBFLAGS@ -lm -Wl,-z,defs + ln -s $@.1.6.0 $@ + ################################################################## # Targets ################################################################## clean: - @rm -f *.o *.dxx + rm -f *.o *.lo *.dxx veryclean: clean - @rm -f lib*.a + rm -f lib*.a lib*.so* ################################################################## @@ -120,4 +128,11 @@ .f.o: ${F77} -o $@ -c ${FFLAGS} $< +.c.lo: + ${CC} -o $@ -c -fPIC -DPIC ${CFLAGS} $< + +.cc.lo: + ${CXX} -o $@ -c -fPIC -DPIC ${CFLAGS} $< +.f.lo: + ${F77} -o $@ -c -fPIC -DPIC ${FFLAGS} $< --- hypre-1.6.0.orig/src/utilities/Makefile.in +++ hypre-1.6.0/src/utilities/Makefile.in @@ -7,7 +7,7 @@ #EHEADER*********************************************************************** .SUFFIXES: -.SUFFIXES: .c .f .o +.SUFFIXES: .c .f .o .lo srcdir = @srcdir@ VPATH = @srcdir@ @@ -34,20 +34,20 @@ # Targets ################################################################## -all: libHYPRE_utilities.a +all: libHYPRE_utilities.a libHYPRE_utilities.so install: all @cp -f $(srcdir)/HYPRE_*.h $$HYPRE_INSTALL_DIR/include/. @cp -f $(srcdir)/utilities.h $$HYPRE_INSTALL_DIR/include/. - @cp -f libHYPRE_*.a $$HYPRE_INSTALL_DIR/lib/. + @cp -df libHYPRE_*.a libHYPRE_*.so* $$HYPRE_INSTALL_DIR/lib/. clean: - @rm -f *.o + @rm -f *.o *.lo @rm -f *.prj @rm -f *.kdd veryclean: clean - @rm -f libHYPRE_*.a + @rm -f libHYPRE_*.a libHYPRE_*.so* ################################################################## # Utilities rules @@ -81,13 +81,21 @@ random.c UTILITIES_OBJS = ${UTILITIES_FILES:.c=.o} +UTILITIES_SHLOBJS = ${UTILITIES_FILES:.c=.lo} libHYPRE_utilities.a: ${UTILITIES_OBJS} @echo "Building $@ ... " ar -rcu $@ ${UTILITIES_OBJS} ${RANLIB} $@ +libHYPRE_utilities.so: ${UTILITIES_SHLOBJS} + @echo "Building $@ ... " + ${CC} -shared $^ -Wl,-soname,$@.1.6.0 -o $@.1.6.0 \ + @MPILIBDIRS@ @MPILIBS@ @MPIFLAGS@ -Wl,-z,defs + ln -s $@.1.6.0 $@ + ${UTILITIES_OBJS}: ${UTILITIES_HEADERS} +${UTILITIES_SHLOBJS}: ${UTILITIES_HEADERS} timer.o: timer.c ${CC} -D_POSIX_SOURCE -o $@ -c ${CFLAGS} $< @@ -99,3 +107,5 @@ .c.o: ${CC} -o $@ -c ${CFLAGS} $< +.c.lo: + ${CC} -o $@ -c -fPIC -DPIC ${CFLAGS} $< --- hypre-1.6.0.orig/src/utilities/fortran.h +++ hypre-1.6.0/src/utilities/fortran.h @@ -26,11 +26,6 @@ # define hypre_NAME_C_CALLING_FORT(name,NAME) NAME # define hypre_NAME_FORT_CALLING_C(name,NAME) NAME -#elif defined(HYPRE_LINUX) - -# define hypre_NAME_C_CALLING_FORT(name,NAME) name##__ -# define hypre_NAME_FORT_CALLING_C(name,NAME) name##__ - #else # define hypre_NAME_C_CALLING_FORT(name,NAME) name##_ --- hypre-1.6.0.orig/src/seq_mv/Makefile.in +++ hypre-1.6.0/src/seq_mv/Makefile.in @@ -8,7 +8,7 @@ #EHEADER*********************************************************************** .SUFFIXES: -.SUFFIXES: .c .f .o +.SUFFIXES: .c .f .o .lo srcdir = @srcdir@ VPATH = @srcdir@ @@ -66,23 +66,24 @@ vector.c OBJS = ${FILES:.c=.o} +SHLOBJS = ${FILES:.c=.lo} ################################################################## # Targets ################################################################## -all: libHYPRE_seq_mv.a +all: libHYPRE_seq_mv.a libHYPRE_seq_mv.so install: all @cp -f $(srcdir)/HYPRE_*.h $$HYPRE_INSTALL_DIR/include/. @cp -f $(srcdir)/seq_mv.h $$HYPRE_INSTALL_DIR/include/. - @cp -f libHYPRE_*.a $$HYPRE_INSTALL_DIR/lib/. + @cp -df libHYPRE_*.a libHYPRE_*.so* $$HYPRE_INSTALL_DIR/lib/. clean: - @rm -f *.o + @rm -f *.o *.lo veryclean: clean - @rm -f libHYPRE_seq_mv.a + @rm -f libHYPRE_seq_mv.a libHYPRE_*.so* ################################################################## @@ -94,7 +95,13 @@ ar -rcu $@ ${OBJS} ${RANLIB} $@ +libHYPRE_seq_mv.so: ${SHLOBJS} ../utilities/libHYPRE_utilities.so + @echo "Building $@ ... " + ${CC} -shared $^ -Wl,-soname,$@.1.6.0 -o $@.1.6.0 -Wl,-z,defs + ln -s $@.1.6.0 $@ + ${OBJS}: ${HEADERS} +${SHLOBJS}: ${HEADERS} ################################################################## # Generic rules @@ -103,3 +110,5 @@ .c.o: ${CC} -o $@ -c ${CFLAGS} $< +.c.lo: + ${CC} -o $@ -c -fPIC -DPIC ${CFLAGS} $< --- hypre-1.6.0.orig/src/sstruct_ls/Makefile.in +++ hypre-1.6.0/src/sstruct_ls/Makefile.in @@ -8,7 +8,7 @@ #EHEADER*********************************************************************** .SUFFIXES: -.SUFFIXES: .c .f .o +.SUFFIXES: .c .f .o .lo srcdir = @srcdir@ VPATH = @srcdir@ @@ -62,25 +62,26 @@ krylov_sstruct.c OBJS = ${FILES:.c=.o} +SHLOBJS = ${FILES:.c=.lo} ################################################################## # Targets ################################################################## -all: libHYPRE_sstruct_ls.a +all: libHYPRE_sstruct_ls.a libHYPRE_sstruct_ls.so install: all @cp -f $(srcdir)/HYPRE_*.h $$HYPRE_INSTALL_DIR/include/. @cp -f $(srcdir)/sstruct_ls.h $$HYPRE_INSTALL_DIR/include/. - @cp -f libHYPRE_*.a $$HYPRE_INSTALL_DIR/lib/. + @cp -df libHYPRE_*.a libHYPRE_*.so* $$HYPRE_INSTALL_DIR/lib/. clean: - @rm -f *.o + @rm -f *.o *.lo @rm -f *.prj @rm -f *.kdd veryclean: clean - @rm -f libHYPRE_*.a + @rm -f libHYPRE_*.a libHYPRE_*.so* ################################################################## # Rules @@ -91,6 +92,12 @@ ar -rcu $@ ${OBJS} ${RANLIB} $@ +libHYPRE_sstruct_ls.so: ${SHLOBJS} ../utilities/libHYPRE_utilities.so ../krylov/libkrylov.so ../struct_mv/libHYPRE_struct_mv.so ../struct_ls/libHYPRE_struct_ls.so ../parcsr_mv/libHYPRE_parcsr_mv.so ../parcsr_ls/libHYPRE_parcsr_ls.so ../sstruct_mv/libHYPRE_sstruct_mv.so + @echo "Building $@ ... " + ${CC} -shared $^ -Wl,-soname,$@.1.6.0 -o $@.1.6.0 \ + @MPILIBDIRS@ @MPILIBS@ @MPIFLAGS@ -lm -Wl,-z,defs + ln -s $@.1.6.0 $@ + ${OBJS}: ${HEADERS} ################################################################## @@ -100,3 +107,5 @@ .c.o: ${CC} -o $@ -c ${CFLAGS} $< +.c.lo: + ${CC} -o $@ -c -fPIC -DPIC ${CFLAGS} $< --- hypre-1.6.0.orig/src/parcsr_mv/Makefile.in +++ hypre-1.6.0/src/parcsr_mv/Makefile.in @@ -8,7 +8,7 @@ #EHEADER*********************************************************************** .SUFFIXES: -.SUFFIXES: .c .f .o +.SUFFIXES: .c .f .o .lo srcdir = @srcdir@ VPATH = @srcdir@ @@ -81,48 +81,49 @@ driver_boolaat.c OBJS = ${FILES:.c=.o} +SHLOBJS = ${FILES:.c=.lo} DRIVER_OBJS = ${DRIVER_FILES:.c=.o} ################################################################## # Targets ################################################################## -all: libHYPRE_parcsr_mv.a +all: libHYPRE_parcsr_mv.a libHYPRE_parcsr_mv.so -driver: driver.o libHYPRE_parcsr_mv.a +driver: driver.o libHYPRE_parcsr_mv.so @echo "Linking" $@ "... " ${CC} -o driver driver.o ${LFLAGS} -driver_matvec: driver_matvec.o libHYPRE_parcsr_mv.a +driver_matvec: driver_matvec.o libHYPRE_parcsr_mv.so @echo "Linking" $@ "... " ${CC} -o driver_matvec driver_matvec.o ${LFLAGS} -driver_matmul: driver_matmul.o libHYPRE_parcsr_mv.a +driver_matmul: driver_matmul.o libHYPRE_parcsr_mv.so @echo "Linking" $@ "... " ${CC} -o driver_matmul driver_matmul.o ${LFLAGS} -driver_boolmatmul: driver_boolmatmul.o libHYPRE_parcsr_mv.a +driver_boolmatmul: driver_boolmatmul.o libHYPRE_parcsr_mv.so @echo "Linking" $@ "... " ${CC} -o driver_boolmatmul driver_boolmatmul.o ${LFLAGS} -driver_aat: driver_aat.o libHYPRE_parcsr_mv.a +driver_aat: driver_aat.o libHYPRE_parcsr_mv.so @echo "Linking" $@ "... " ${CC} -o driver_aat driver_aat.o ${LFLAGS} -driver_boolaat: driver_boolaat.o libHYPRE_parcsr_mv.a +driver_boolaat: driver_boolaat.o libHYPRE_parcsr_mv.so @echo "Linking" $@ "... " ${CC} -o driver_boolaat driver_boolaat.o ${LFLAGS} install: all @cp -f $(srcdir)/HYPRE_*.h $$HYPRE_INSTALL_DIR/include/. @cp -f $(srcdir)/parcsr_mv.h $$HYPRE_INSTALL_DIR/include/. - @cp -f libHYPRE_*.a $$HYPRE_INSTALL_DIR/lib/. + @cp -df libHYPRE_*.a libHYPRE_*.so* $$HYPRE_INSTALL_DIR/lib/. clean: - @rm -f *.o + @rm -f *.o *.lo veryclean: clean - @rm -f libHYPRE_parcsr_mv.a + @rm -f libHYPRE_parcsr_mv.a libHYPRE_parcsr_mv.so* @rm -f driver driver_matvec driver_matmul ################################################################## @@ -134,7 +135,14 @@ ar -rcu $@ ${OBJS} @RANLIB@ $@ +libHYPRE_parcsr_mv.so: ${SHLOBJS} ../utilities/libHYPRE_utilities.so ../seq_mv/libHYPRE_seq_mv.so + @echo "Building $@ ... " + ${CC} -shared $^ -Wl,-soname,$@.1.6.0 -o $@.1.6.0 \ + ${MPILIBFLAGS} -Wl,-z,defs + ln -s $@.1.6.0 $@ + ${OBJS}: ${HEADERS} +${SHLOBJS}: ${HEADERS} ${DRIVER_OBJS}: ${HEADERS} @@ -145,3 +153,5 @@ .c.o: ${CC} -o $@ -c ${CFLAGS} $< +.c.lo: + ${CC} -o $@ -c -fPIC -DPIC ${CFLAGS} $< --- hypre-1.6.0.orig/src/test/Makefile.in +++ hypre-1.6.0/src/test/Makefile.in @@ -135,6 +135,7 @@ -lHYPRE_parcsr_ls\ -lHYPRE_DistributedMatrixPilutSolver \ -lHYPRE_ParaSails \ + -lHYPRE_Euclid \ -lHYPRE_MatrixMatrix \ -lHYPRE_DistributedMatrix \ -lHYPRE_IJ_mv\ --- hypre-1.6.0.orig/src/sstruct_mv/Makefile.in +++ hypre-1.6.0/src/sstruct_mv/Makefile.in @@ -8,7 +8,7 @@ #EHEADER*********************************************************************** .SUFFIXES: -.SUFFIXES: .c .f .o +.SUFFIXES: .c .f .o .lo srcdir = @srcdir@ VPATH = @srcdir@ @@ -63,25 +63,26 @@ box_map.c OBJS = ${FILES:.c=.o} +SHLOBJS = ${FILES:.c=.lo} ################################################################## # Targets ################################################################## -all: libHYPRE_sstruct_mv.a +all: libHYPRE_sstruct_mv.a libHYPRE_sstruct_mv.so install: all @cp -f $(srcdir)/HYPRE_*.h $$HYPRE_INSTALL_DIR/include/. @cp -f $(srcdir)/sstruct_mv.h $$HYPRE_INSTALL_DIR/include/. - @cp -f libHYPRE_*.a $$HYPRE_INSTALL_DIR/lib/. + @cp -df libHYPRE_*.a libHYPRE_*.so* $$HYPRE_INSTALL_DIR/lib/. clean: - @rm -f *.o + @rm -f *.o *.lo @rm -f *.prj @rm -f *.kdd veryclean: clean - @rm -f libHYPRE_*.a + @rm -f libHYPRE_*.a libHYPRE_*.so* ################################################################## # Rules @@ -92,6 +93,12 @@ ar -rcu $@ ${OBJS} ${RANLIB} $@ +libHYPRE_sstruct_mv.so: ${SHLOBJS} ../utilities/libHYPRE_utilities.so ../struct_mv/libHYPRE_struct_mv.so ../parcsr_mv/libHYPRE_parcsr_mv.so ../IJ_mv/libHYPRE_IJ_mv.so + @echo "Building $@ ... " + ${CC} -shared $^ -Wl,-soname,$@.1.6.0 -o $@.1.6.0 \ + @MPILIBDIRS@ @MPILIBS@ @MPIFLAGS@ -Wl,-z,defs + ln -s $@.1.6.0 $@ + ${OBJS}: ${HEADERS} ################################################################## @@ -101,3 +108,5 @@ .c.o: ${CC} -o $@ -c ${CFLAGS} $< +.c.lo: + ${CC} -o $@ -c -fPIC -DPIC ${CFLAGS} $< --- hypre-1.6.0.orig/src/parcsr_ls/Makefile.in +++ hypre-1.6.0/src/parcsr_ls/Makefile.in @@ -8,7 +8,7 @@ #EHEADER*********************************************************************** .SUFFIXES: -.SUFFIXES: .c .f .o +.SUFFIXES: .c .f .o .lo srcdir = @srcdir@ VPATH = @srcdir@ @@ -129,24 +129,25 @@ driver.c OBJS = ${FILES:.c=.o} +SHLOBJS = ${FILES:.c=.lo} DRIVER_OBJS = ${FILES:.c=.o} ################################################################## # Targets ################################################################## -all: libHYPRE_parcsr_ls.a +all: libHYPRE_parcsr_ls.a libHYPRE_parcsr_ls.so install: all @cp -f $(srcdir)/HYPRE_*.h $$HYPRE_INSTALL_DIR/include/. @cp -f $(srcdir)/parcsr_ls.h $$HYPRE_INSTALL_DIR/include/. - @cp -f libHYPRE_*.a $$HYPRE_INSTALL_DIR/lib/. + @cp -df libHYPRE_*.a libHYPRE_*.so* $$HYPRE_INSTALL_DIR/lib/. clean: - @rm -f *.o + @rm -f *.o *.lo veryclean: clean - @rm -f libHYPRE_parcsr_ls.a + @rm -f libHYPRE_parcsr_ls.a libHYPRE_parcsr_ls.so* @rm -f driver ################################################################## @@ -177,7 +178,7 @@ # Rules ################################################################## -driver: driver.o libHYPRE_parcsr_ls.a +driver: driver.o libHYPRE_parcsr_ls.so @echo "Linking" $@ "... " ${CC} -o $@ driver.o ${LFLAGS} @@ -186,7 +187,14 @@ ar -rcu $@ ${OBJS} @RANLIB@ $@ +libHYPRE_parcsr_ls.so: ${SHLOBJS} ../utilities/libHYPRE_utilities.so ../krylov/libkrylov.so ../seq_mv/libHYPRE_seq_mv.so ../parcsr_mv/libHYPRE_parcsr_mv.so ../distributed_matrix/libHYPRE_DistributedMatrix.so ../matrix_matrix/libHYPRE_MatrixMatrix.so ../distributed_ls/pilut/libHYPRE_DistributedMatrixPilutSolver.so ../distributed_ls/ParaSails/libHYPRE_ParaSails.so ../distributed_ls/Euclid/libHYPRE_Euclid.so + @echo "Building $@ ... " + ${CC} -shared $^ -Wl,-soname,$@.1.6.0 -o $@.1.6.0 \ + @MPILIBDIRS@ @MPILIBS@ @MPIFLAGS@ @BLASLIBFLAGS@ -lm -Wl,-z,defs + ln -s $@.1.6.0 $@ + ${OBJS}: ${HEADERS} +${SHLOBJS}: ${HEADERS} ${DRIVER_OBJS}: ${HEADERS} @@ -197,3 +205,5 @@ .c.o: ${CC} -o $@ -c ${CFLAGS} $< +.c.lo: + ${CC} -o $@ -c -fPIC -DPIC ${CFLAGS} $< --- hypre-1.6.0.orig/src/distributed_matrix/Makefile.in +++ hypre-1.6.0/src/distributed_matrix/Makefile.in @@ -8,17 +8,17 @@ #EHEADER*********************************************************************** -.SUFFIXES: .cc .c .f .o +.SUFFIXES: .cc .c .f .o .lo srcdir = @srcdir@ VPATH = @srcdir@ -all: lib +all: libHYPRE_DistributedMatrix.a libHYPRE_DistributedMatrix.so install:all @cp -f $(srcdir)/HYPRE_*.h $$HYPRE_INSTALL_DIR/include/. @cp -f $(srcdir)/distributed_matrix.h $$HYPRE_INSTALL_DIR/include/. - @cp -f libHYPRE_*.a $$HYPRE_INSTALL_DIR/lib/. + @cp -df libHYPRE_*.a libHYPRE_*.so* $$HYPRE_INSTALL_DIR/lib/. #Headers HEADERS =\ @@ -43,8 +43,10 @@ distributed_matrix_PETSc.o\ distributed_matrix_parcsr.o\ distributed_matrix_ISIS.o +SHLOBJS = ${OBJS:.o=.lo} ${OBJS}: ${HEADERS} +${SHLOBJS}: ${HEADERS} CC = @CC@ CXX = @CXX@ @@ -86,7 +88,7 @@ # Main rules ################################################################## -driver: driver.o lib_HYPRE.a +driver: driver.o lib_HYPRE.so @echo "Linking" $@ "... " ${CC} -o driver driver.o ${LFLAGS} @@ -94,20 +96,24 @@ rm driver make driver -lib: $(PROTOS) ${OBJS} +libHYPRE_DistributedMatrix.a: $(PROTOS) ${OBJS} @echo "Building $@ ... " @echo "Building ${OBJS} ... " @ar -rcu libHYPRE_DistributedMatrix.a ${OBJS} ${RANLIB} libHYPRE_DistributedMatrix.a +libHYPRE_DistributedMatrix.so: $(PROTOS) ${SHLOBJS} ../utilities/libHYPRE_utilities.so ../parcsr_mv/libHYPRE_parcsr_mv.so + ${CC} -shared ${SHLOBJS} ../utilities/libHYPRE_utilities.so ../parcsr_mv/libHYPRE_parcsr_mv.so -Wl,-soname,libHYPRE_DistributedMatrix.so.1.6.0 -o libHYPRE_DistributedMatrix.so.1.6.0 -Wl,-z,defs + ln -s libHYPRE_DistributedMatrix.so.1.6.0 libHYPRE_DistributedMatrix.so + ################################################################## # Targets ################################################################## clean: - @rm -f *.o *.dxx + @rm -f *.o *.lo *.dxx veryclean: clean - @rm -f lib*.a + @rm -f lib*.a lib*.so* ################################################################## @@ -123,5 +129,11 @@ .f.o: ${F77} -o $@ -c ${FFLAGS} $< +.c.lo: + ${CC} -o $@ -c -fPIC -DPIC ${CFLAGS} $< +.cc.lo: + ${CXX} -o $@ -c -fPIC -DPIC ${CFLAGS} $< +.f.lo: + ${F77} -o $@ -c -fPIC -DPIC ${FFLAGS} $< --- hypre-1.6.0.orig/src/struct_mv/Makefile.in +++ hypre-1.6.0/src/struct_mv/Makefile.in @@ -8,7 +8,7 @@ #EHEADER*********************************************************************** .SUFFIXES: -.SUFFIXES: .c .f .o +.SUFFIXES: .c .f .o .lo srcdir = @srcdir@ VPATH = @srcdir@ @@ -74,25 +74,26 @@ F90_HYPRE_struct_vector.c OBJS = ${FILES:.c=.o} +SHLOBJS = ${FILES:.c=.lo} ################################################################## # Targets ################################################################## -all: libHYPRE_struct_mv.a +all: libHYPRE_struct_mv.a libHYPRE_struct_mv.so install: all @cp -f $(srcdir)/HYPRE_*.h $$HYPRE_INSTALL_DIR/include/. @cp -f $(srcdir)/struct_mv.h $$HYPRE_INSTALL_DIR/include/. - @cp -f libHYPRE_*.a $$HYPRE_INSTALL_DIR/lib/. + @cp -df libHYPRE_*.a libHYPRE_*.so* $$HYPRE_INSTALL_DIR/lib/. clean: - @rm -f *.o + @rm -f *.o *.lo @rm -f *.prj @rm -f *.kdd veryclean: clean - @rm -f libHYPRE_*.a + @rm -f libHYPRE_*.a libHYPRE_*.so* ################################################################## # Rules @@ -103,7 +104,14 @@ ar -rcu $@ ${OBJS} ${RANLIB} $@ +libHYPRE_struct_mv.so: ${SHLOBJS} ../utilities/libHYPRE_utilities.so + @echo "Building $@ ... " + $(CC) -shared $^ -Wl,-soname,$@.1.6.0 -o $@.1.6.0 \ + @MPILIBDIRS@ @MPILIBS@ @MPIFLAGS@ -Wl,-z,defs + ln -s $@.1.6.0 $@ + ${OBJS}: ${HEADERS} +${SHLOBJS}: ${HEADERS} ################################################################## # Generic rules @@ -112,3 +120,5 @@ .c.o: ${CC} -o $@ -c ${CFLAGS} $< +.c.lo: + ${CC} -o $@ -c -fPIC -DPIC ${CFLAGS} $<