diff options
author | schnetter <schnetter@fc86f234-e40e-4302-a95b-5e02f8c343c9> | 2006-04-01 18:24:49 +0000 |
---|---|---|
committer | schnetter <schnetter@fc86f234-e40e-4302-a95b-5e02f8c343c9> | 2006-04-01 18:24:49 +0000 |
commit | 0a36b5f67cf9d10f2d72f98dcb94eee3110aab3a (patch) | |
tree | a8b032f8bc8888b9d67bd0ac88b89325481a6736 | |
parent | 57728aa4a31603a561cc3fdf5b510565d96a8d3b (diff) |
Add some tests to make it work with PETSc 2.2.x and 2.3.x as well.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusExternal/PETSc/trunk@21 fc86f234-e40e-4302-a95b-5e02f8c343c9
-rwxr-xr-x | PETSc.sh | 20 |
1 files changed, 18 insertions, 2 deletions
@@ -96,10 +96,26 @@ if [ -z "$PETSC_ARCH_LIBS" ]; then esac fi +# Set version-specific library directory +# (version 2.3.0 and newer use different library directories) +if [ -e "$PETSC_DIR/lib/$PETSC_ARCH" ]; then + PETSC_LIB_INFIX='' +else + PETSC_LIB_INFIX='/libO' +fi + +# Set version-specific libraries +# (version 2.2.0 and newer do not have libpetscsles.a any more) +if [ -e "$PETSC_DIR/lib$PETSC_LIB_INFIX/$PETSC_ARCH/libpetscksp.a" ]; then + PETSC_SLES_LIBS="petscksp" +else + PETSC_SLES_LIBS="petscsles" +fi + # Set the PETSc libs, libdirs and includedirs PETSC_INC_DIRS='$(PETSC_DIR)/include $(PETSC_DIR)/bmake/$(PETSC_ARCH)' -PETSC_LIB_DIRS='$(PETSC_DIR)/lib/libO/$(PETSC_ARCH)' -PETSC_LIBS="petscts petscsnes petscsles petscdm petscmat petscvec petsc $PETSC_ARCH_LIBS" +PETSC_LIB_DIRS='$(PETSC_DIR)/lib'$PETSC_LIB_INFIX'/$(PETSC_ARCH)' +PETSC_LIBS="petscts petscsnes $PETSC_SLES_LIBS petscdm petscmat petscvec petsc $PETSC_ARCH_LIBS" echo 'BEGIN MAKE_DEFINITION' echo "PETSC_DIR = $PETSC_DIR" |