#!/bin/sh -f
# Compile each Elmer source module and install the software
# (c) Juha Vierinen, Juha Ruokolainen, Antti Pursula, CSC 2005.
#
# get the Elmer sources from ftp://ftp.funet.fi/pub/sci/physics/elmer/src
#
# replace these with your compilers:
export CC=gcc
export CXX=g++
export FC=gfortran
export F77=gfortran
#
modules="matc umfpack mathlibs elmergrid meshgen2d eio hutiter fem" 
# add front and post if you like 
# modules="matc umfpack mathlibs elmergrid meshgen2d eio hutiter fem front post" 
#
for m in $modules; do
  cd $m ; ./configure --prefix=/opt/elmer ; make ; make install ; cd .. 
done
#
# finally, run the tests
cd fem
make check
cd ..

