#!/bin/sh -f

if test "$ELMER_LIB" = ""; then
  if  test "$ELMER_HOME" = ""; then
     LIBDIR=/opt/elmerfem-9.0/lib
  else
     LIBDIR=$ELMER_HOME/lib
  fi
else
  LIBDIR=$ELMER_LIB
fi

LD=/usr/bin/gfortran
cmd="$LD -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -g -DNDEBUG -fPIC -shared $* -L/opt/elmerfem-9.0/lib/elmersolver -L$LIBDIR -lelmersolver"
printf "%s " $cmd
printf "\n"
$LD -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -g -DNDEBUG -fPIC -shared $* -L/opt/elmerfem-9.0/lib/elmersolver -L$LIBDIR -lelmersolver
#      $* -L$LIBDIR -lelmersolver
#      $*
