
if [ ! "$ZMP_TARG" -a "`eval echo '$'$#`" != "compile" -o \
     ! "$ZMP_TARG" -a $# -eq 0 ]
then
  cat << EOF

#======================================================================
#
#                            Developed by
#                Laboratory of Computational Astrophysics
#               University of Illinois at Urbana-Champaign
#
# This script writes and then executes the master makefile for ZEUS-PP.
#
# Written by Robert Fiedler
# Last modifed: 11/21/96.
#
# SYNOPSIS
#
#   Make_zmp_pp [-v] [-m ZMP_MACH] [ZMP_TARG]
#
# OPTIONS
#
#   -v          Verify interactively compilers, loaders, options, ... .
#   -m ZMP_MACH Machine :convex, cray, sgi, sun, ibm, hp, dec, exemplar.
#               Prompts for ZMP_MACH if not specified, and sets -v flag.
#      ZMP_TARG Targets for 'make' (e.g. compile, help).
#               ZMP_TARG is set to help if unspecified.
#
# DISCUSSION
#
#   The command line:
#
#   "Make_zmp_pp -v -m cray compile"
#
#   creates a makefile for cray (UNICOS) computers to compile the
#   ZEUS-PP source code for the problem set up in ../${ZMP_SRC}.  The
#   user is prompted to optionally reset the compiler flags, etc.
#   The "make" utility is then run to produce the executable 
#   zmp_pp.x in directory ../${ZMP_EXE}/.
#
#   After the makefile has been created by this script, it can also be 
#   invoked directly to perform some useful operations.  For example,
#   the command line:
#
#   "make clean"
#
#     removes files *.f *.o
#
#   "make compile"
#
#     compiles any altered *.F or *.c files and creates executable
#
# Environment Variables
#
#   The following variables may optionally be set to make 
#   repetitive use of this script more convenient.
#
#   ZMP_MACH    machine: cray, convex, sgi, sun, ibm, hp, dec, exemplar
#   ZMP_TARG    "help" (default), "compile" to make executable, etc.
#   ZMP_VFY     set to "y" fo rinteractive verification of compiler
#               and loader options (default: "n").
#   ZMP_EXE     directory to hold the zmp_pp.x executable and the
#               input/output files (default: "../exe/").
#   ZMP_SRC     directory to search for the zeusmp.def macro
#               definition file.
#
#   By default, the variables below are determined by ZMP_MACH:
#
#   ZMP_SYS         operating system macro   
#   ZMP_FC          fortran compiler
#   ZMP_OPTS        fortran compiler options
#   ZMP_CC          C compiler (plus options)
#   ZMP_LDR         loader
#   ZMP_LIB         libraries (use -L with your personal HDF library)
#   ZMP_CPP         C preprocessor (plus options)
#
#  Example .login segment to customize makefile automatically:
#
#   setenv ZMP_MACH    sgi
#   setenv ZMP_TARG    compile
#   setenv ZMP_OPTS    "-c -O3"
#   setenv ZMP_LIB     "-L../../hdf/lib -ldf"
#.....................................................................

EOF
  exit
fi
#
# Set defaults
#
ZMP_VFY=${ZMP_VFY-"n"}
ZMP_TARG=${ZMP_TARG-"help"}
#
ZMP_MFL=${ZMP_MFL-"Makefile"}
ZMP_SRC=${ZMP_SRC-"../src/"}
ZMP_EXE=${ZMP_EXE-"../exe/"}
#
SCRIPT="$0"
ECHO=echo
test -f /usr/5bin/echo && ECHO=/usr/5bin/echo
#
# Examine command line for options.  If no args, give usage info.
#
$ECHO ""
while [ $# -ne 0 ]
do
  case $1 in
    -m)
       shift
       ZMP_MACH="$1" 
       shift ;;
    -v)
       ZMP_VFY="y"
       shift ;;
   -?*)
       $ECHO "ERROR: invalid option: $1"
       $ECHO ""
       exit 1 ;;
     *)
       ZMP_TARG="$@" 
       until [ $# -eq 0 ]
       do
         shift
       done ;;
  esac
done
#
# See if this machine can be identified by its name
#
ZMP_HOST=${ZMP_HOST-"`hostname | sed -e 's/\..*//'`"}
case $ZMP_HOST in
  sif|loki|zeus|magna|freya|odin|bragi|thor|vidar|vali|picasso|inferno|modi?)
    ZMP_MACH=${ZMP_MACH-"sgi"} ;;
  lena|ella|tuvok|billie)
    ZMP_MACH=${ZMP_MACH-"exemplar"} ;;
  pecos|sangamon)
    ZMP_MACH=${ZMP_MACH-"solaris"} ;;
  athena)
    ZMP_MACH=${ZMP_MACH-"hp"} ;;
  mario)
    ZMP_MACH=${ZMP_MACH-"cray"} ;;
  *)
    ZMP_MACH=${ZMP_MACH-""} ;;
esac
#
# Set machine-specific macros (break out of infinite loop):
#
while [ 1 ]
do
  case $ZMP_MACH in
    sgi|SGI|IRIX)
      ZMP_SYS=${ZMP_SYS-"SGI"}
      ZMP_FC=${ZMP_FC-"f77"}
      ZMP_CC=${ZMP_CC-"cc -c -g3 -64 -mips4"}
      ZMP_CPP=${ZMP_CPP-"/lib/cpp"}
      case $ZMP_HOST in
        modi?)
#       SGI Origin 2000 with R10000 chips, IRIX 6.4, at NCSA
          ZMP_OPTS=${ZMP_OPTS-"-c -O3 -g3 -64 -mips4 -r10000"}
          ZMP_LDR=${ZMP_LDR-"f77 -64 -mips4 -r10000"}
          ZMP_LIB=${ZMP_LIB-"-L/afs/ncsa/packages/hdf/4.1r4-irix64-64/lib -ldf -ljpeg -lz"} ;;
        inferno)
#       SGI O2 with R10000 chips, IRIX 6.3, at NCSA
          ZMP_OPTS=${ZMP_OPTS-"-c -O3 -g3 -n32 -mips4 -r10000"}
          ZMP_LDR=${ZMP_LDR-"f77 -n32 -mips4 -r10000"}
          ZMP_LIB=${ZMP_LIB-"-L/afs/ncsa.uiuc.edu/packages/hdf/IRIX_6.2/4.1r1_n32/lib -ldf -ljpeg -lz"} ;;
        magna|sif|freya|vidar|vali|picasso)
          ZMP_OPTS=${ZMP_OPTS-"-c -O3 -g3 -64 -mips4 -r10000"}
          ZMP_LDR=${ZMP_LDR-"f77 -64 -mips4 -r10000"}
          ZMP_LIB=${ZMP_LIB-"-L/afs/ncsa/packages/hdf/IRIX_6.2/lib -ldf -ljpeg -lz"} ;;
        odin|thor|bragi|idun)
          ZMP_OPTS=${ZMP_OPTS-"-c -O3 -g3 -64 -mips4 -r8000"}
          ZMP_LDR=${ZMP_LDR-"f77 -64 -mips4 -r8000"}
          ZMP_LIB=${ZMP_LIB-"-L/afs/ncsa/packages/hdf/IRIX_6.2/lib -ldf -ljpeg -lz"} ;;
        loki)
#          ZMP_OPTS=${ZMP_OPTS-"-c -O2 -g3 -w"}
          ZMP_OPTS=${ZMP_OPTS-"-c -O2 -g3 -w -32 -mips2"}
          ZMP_LDR=${ZMP_LDR-"f77"}
          ZMP_LIB=${ZMP_LIB-"-L/afs/ncsa/packages/hdf/IRIX_5.2/lib -ldf -ljpeg -lz"} ;;
        zeus)
          ZMP_OPTS=${ZMP_OPTS-"-c -O2 -g3 -w"}
          ZMP_MINC=${ZMP_MINC-"/lcaloc2/mpich/include"}
          ZMP_OPTS="$ZMP_OPTS -Wf,-I${ZMP_MINC}"
          ZMP_LDR=${ZMP_LDR-"f77"}
          ZMP_LIB=${ZMP_LIB-"-L/lcaloc1/lib -ldf"} ;;
        *)
          ZMP_OPTS=${ZMP_OPTS-"-c -O2 -g3 -w"}
          ZMP_LIB=${ZMP_LIB-"-ldf"} ;;
      esac
      break ;;
    sun|SUN|SUNOS)
      ZMP_SYS=${ZMP_SYS-"SUN"}
      ZMP_FC=${ZMP_FC-"f77"}
      ZMP_OPTS=${ZMP_OPTS-"-c -w -fast"}
      ZMP_CC=${ZMP_CC-"cc -c"}
      ZMP_LDR=${ZMP_LDR-"f77 -fast"}
      ZMP_LIB=${ZMP_LIB-"-ldf"}
      ZMP_CPP=${ZMP_CPP-"/lib/cpp"}
      break ;;
    convex|CONVEX|CONVEXOS)
      ZMP_SYS=${ZMP_SYS-"CONVEX"}
      ZMP_FC=${ZMP_FC-"fc"}
      ZMP_OPTS=${ZMP_OPTS-"-c -O2 -nw -or none"}
      ZMP_CC=${ZMP_CC-"cc -c"}
      ZMP_LDR=${ZMP_LDR-"fc -O2"}
      ZMP_LIB=${ZMP_LIB-"-ldf"}
      ZMP_CPP=${ZMP_CPP-"/lib/cpp"}
      break ;;
    exemplar|EXEMPLAR)
      ZMP_SYS=${ZMP_SYS-"EXEMPLAR"}
      case $ZMP_HOST in
        lena)
#       SPP-1200 at NCSA
          ZMP_FC=${ZMP_FC-"f77"}
          ZMP_CC=${ZMP_CC-"/usr/convex/bin/cc -c"}
          ZMP_LDR=${ZMP_LDR-"/usr/convex/bin/fc"}
          ZMP_CPP=${ZMP_CPP-"/lib/cpp"}
          ZMP_OPTS=${ZMP_OPTS-"-c +O3"}
          ZMP_HINC=${ZMP_HINC-"/afs/ncsa/packages/hdf/exemplar/4.0b2/include"}
          ZMP_OPTS="$ZMP_OPTS -I${ZMP_HINC}"
          ZMP_LIB=${ZMP_LIB-"-L/afs/ncsa/packages/hdf/exemplar/4.0b2/lib -ldf -ljpeg -lz"} ;;
        ella|tuvok)
#       SPP-2000 at NCSA or NRL
          ZMP_FC=${ZMP_FC-"/opt/fortran/bin/f77"}
          ZMP_CC=${ZMP_CC-"/opt/ansic/bin/cc -c"}
          ZMP_LDR=${ZMP_LDR-"/opt/fortran/bin/f77 +O2 +Olibcalls +Onolimit +Odataprefetch -Wl,-a,archive_shared -Wl,+FPD"}
          ZMP_CPP=${ZMP_CPP-"/opt/langtools/lbin/cpp"}
          ZMP_OPTS=${ZMP_OPTS-"-c +O2 +Olibcalls +Onolimit +Odataprefetch +U77"}
          ZMP_HINC=${ZMP_HINC-"/afs/ncsa/packages/hdf/exemplar/4.0b2/include"}
          ZMP_OPTS="$ZMP_OPTS -I${ZMP_HINC}"
          ZMP_LIB=${ZMP_LIB-"-lU77 -ldld -lcps -lail -lcnx_syscall -lpthread -Wl,-L/afs/ncsa/packages/hdf/exemplar/4.0b2/lib -ldf -ljpeg -lz"}
;;
	billie)
	ZMP_FC=${ZMP_FC-"/opt/fortran/bin/f77"}
	ZMP_CC=${ZMP_CC-"/opt/ansic/bin/cc -c"}
	ZMP_LDR=${ZMP_LDR-"/opt/mpi/bin/mpif77 +O2 +Olibcalls +Onolimit +Odataprefetch -Wl,-a,archive_shared -Wl,+FPD"}
	ZMP_CPP=${ZMP_CPP-"/opt/langtools/lbin/cpp"}
	ZMP_OPTS=${ZMP_OPTS-"-c +O2 +Olibcalls +Onolimit +Odataprefetch +DA2.0 +DS2.0 +U77"}
	ZMP_HINC=${ZMP_HINC-"/afs/ncsa/packages/hdf/exemplar/include"}
	ZMP_OPTS="$ZMP_OPTS -I${ZMP_HINC}"
	ZMP_LIB=${ZMP_LIB-"-ldld -lcps -lail -lcnx_syscall -lpthread -Wl,-L/afs/ncsa/packages/hdf/exemplar/lib -ldf -ljpeg -lz -Wl,-L/opt/fortran/lib -lU77"} ;;
        *)
#       Exemplar Generic
          ZMP_FC=${ZMP_FC-"f77"}
          ZMP_CC=${ZMP_CC-"/usr/convex/bin/cc -c"}
          ZMP_LDR=${ZMP_LDR-"/usr/convex/bin/fc"}
          ZMP_CPP=${ZMP_CPP-"/lib/cpp"}
          ZMP_OPTS=${ZMP_OPTS-"-c +O3"}
          ZMP_LIB=${ZMP_LIB-"-ldf"} ;;
      esac
      break ;;
    cray|CRAY|UNICOS)
      ZMP_SYS=${ZMP_SYS-"UNICOS"}
      ZMP_FC=${ZMP_FC-"cft77"}
      ZMP_OPTS=${ZMP_OPTS-"-ez"}
      ZMP_CC=${ZMP_CC-"cc -c"}
      ZMP_LDR=${ZMP_LDR-"segldr"}
      ZMP_LIB=${ZMP_LIB-"-ldf"}
      ZMP_CPP=${ZMP_CPP-"/lib/cpp -N"}
      break ;;
    ibm|IBM|RS6000)
      ZMP_SYS=${ZMP_SYS-"IBM"}
      ZMP_FC=${ZMP_FC-"xlf"}
      ZMP_OPTS=${ZMP_OPTS-"-c -O3"}
      ZMP_CC=${ZMP_CC-"cc -c"}
      ZMP_LDR=${ZMP_LDR-"xlf"}
      ZMP_LIB=${ZMP_LIB-"-L/usr/local/lib -ldf"}
      ZMP_CPP=${ZMP_CPP-"/lib/cpp"}
      break ;;
    hp|HP|HP-UX)
      ZMP_SYS=${ZMP_SYS-"HP"}
      ZMP_FC=${ZMP_FC-"f77"}
      ZMP_OPTS=${ZMP_OPTS-"-c +O3"}
      ZMP_CC=${ZMP_CC-"cc -c"}
      ZMP_LDR=${ZMP_LDR-"f77"}
      ZMP_LIB=${ZMP_LIB-"+U77 -ldf"}
      ZMP_CPP=${ZMP_CPP-"/lib/cpp"}
      break ;;
    dec|alpha|DEC|ALPHA)
      ZMP_SYS=${ZMP_SYS-"DEC"}
      ZMP_FC=${ZMP_FC-"f77"}
      ZMP_OPTS=${ZMP_OPTS-"-c -C -O4"}
      ZMP_CC=${ZMP_CC-"cc -c"}
      ZMP_LDR=${ZMP_LDR-"f77"}
      ZMP_LIB=${ZMP_LIB-"-ldf"}
      ZMP_CPP=${ZMP_CPP-"/lib/cpp"}
      break ;;
    solaris|SOLARIS)
      ZMP_SYS=${ZMP_SYS-"SOLARIS"}
      ZMP_FC=${ZMP_FC-"f77"}
      ZMP_OPTS=${ZMP_OPTS-"-c -O3 -native"}
      ZMP_CC=${ZMP_CC-"cc -c"}
      ZMP_LDR=${ZMP_LDR-"f77 -O3 -native"}
      ZMP_LIB=${ZMP_LIB-"-L/afs/ncsa/packages/hdf/SunOS_5.4/lib -ldf -ljpeg -lz"}
      ZMP_CPP=${ZMP_CPP-"/lib/cpp"}
      break ;;
    *)
#
# Machine type not one of the ones this script knows.  Prompt for best 
# match, set -v flag, and loop through again.
#
      if [ "$ZMP_TARG" != "help" ]
      then
        $ECHO "WARNING: Machine type unspecified or unanticipated.  Will"
        $ECHO "WARNING: set the -v option to allow change of compilers, etc."
        $ECHO "Enter most similar machine type (sun sgi convex cray ibm hp dec exemplar): \c"
        read ZMP_MACH
        if [ "$ZMP_MACH" = "" ]
        then
          ZMP_MACH=sun
        fi
        $ECHO "Machine type set to $ZMP_MACH"
        $ECHO ""
        ZMP_VFY=y
      else
#
# Play it safe -- assume SUN and attempt no optimization.
#
        ZMP_MACH="sun"
        ZMP_SYS=${ZMP_SYS-"SUN"}
        ZMP_FC=${ZMP_FC-"f77"}
        ZMP_OPTS=${ZMP_OPTS-"-c"}
        ZMP_CC=${ZMP_CC-"cc -c"}
        ZMP_LDR=${ZMP_LDR-"f77"}
        ZMP_LIB=${ZMP_LIB-"-ldf"}
        ZMP_CPP=${ZMP_CPP-"/lib/cpp"}
        break
      fi ;;
  esac
done
#
if [ "$ZMP_TARG" != "help" ]
then
#
# Verify Machine-specific macros
#
  if [ "$ZMP_VFY" = "y" ]
  then
    $ECHO "Item No.     Description                 Value"
    $ECHO "--------     -----------                 -----"
    $ECHO "   1         Fortran Compiler            $ZMP_FC"
    $ECHO "   2         Fortran Compiler Options    $ZMP_OPTS"
    $ECHO "   3         C Compiler                  $ZMP_CC"
    $ECHO "   4         C Preprocessor              $ZMP_CPP"
    $ECHO "   5         Loader                      $ZMP_LDR"
    $ECHO "   6         Libraries                   $ZMP_LIB"
    $ECHO ""
#
    ITEM="1"
    until [ "$ITEM" = "" ]
    do
      $ECHO 'To change an item, enter its number (hit return to go on): \c'
      read ITEM
      case $ITEM in
        1)
          $ECHO "Enter Fortran Compiler: \c"
          read ZMP_FC
          $ECHO "Fortran Compiler set to $ZMP_FC" ;;
        2)
          $ECHO "Enter Fortran Compiler Options: \c"
          read ZMP_OPTS
          $ECHO "Fortran Compiler Options set to $ZMP_OPTS" ;;
        3)
          $ECHO "Enter C Compiler: \c"
          read ZMP_CC
          $ECHO "C Compiler set to $ZMP_CC" ;;
        4)
          $ECHO "Enter C Preprocessor: \c"
          read ZMP_CPP
          $ECHO "C Preprocessor set to $ZMP_CPP" ;;
        5)
          $ECHO "Enter Loader: \c"
          read ZMP_LDR
          $ECHO "Loader set to $ZMP_LDR" ;;
        6)
          $ECHO "Enter Libraries: \c"
          read ZMP_LIB
          $ECHO "Libraries set to $ZMP_LIB" ;;
       ?*)
          $ECHO 'Please enter a digit (1 to 6) at the prompt.' ;;
      esac
    done
    $ECHO ""
  fi
  if [ -f $ZMP_MFL ]
  then
#
# Edit MAKEFILE --------------------------------------------------------
#
    $ECHO ""
    $ECHO 'Using existing makefile "'"$ZMP_MFL"'", editing macros...'
    $ECHO ""
    ex - $ZMP_MFL << EOF
/macro definitions
.+2,.+8d
a
ZMP_EXE    = $ZMP_EXE
ZMP_FC     = $ZMP_FC
ZMP_OPTS   = $ZMP_OPTS
ZMP_CC     = $ZMP_CC
ZMP_LDR    = $ZMP_LDR
ZMP_LIB    = $ZMP_LIB
ZMP_CPP    = $ZMP_CPP
.
wq
EOF
  else
    $ECHO ""
    $ECHO "Creating makefile "'"'"$ZMP_MFL"'"'"..."
    $ECHO ""
#
# Write MAKEFILE -------------------------------------------------------
#
# List the basic ZEUS-PP Fortran object codes (foo.o from foo.F).
#
    FOBJ="zmp_pp.o diff.o hsplice.o splice.o"
#
#    if [ "$ZMP_SYS" != UNICOS ]
#    then
##
## UNICOS has optimized LINPACK routines in a default library.
## On other machines use the ones supplied with ZEUS-MP.
##
#      FOBJ="$FOBJ linpck.o"
#    fi
#
# List the basic C object codes (foo.o from foo.c).
#
#    COBJ="bcdflt.o checkin.o"
    COBJ=""
#    if [ "$ZMP_SYS" = EXEMPLAR ]
#    then
##
## Need RAF's Thread Timer Fortran Interface only on the Exemplar.
##
#      COBJ="$COBJ ttimer.o"
#    fi
    cat > $ZMP_MFL << EOF
#=======================================================================
#
#
#  MAKEFILE FOR ZEUS-PP
#
#
#-------------------  macro definitions  -------------------------------
#
ZMP_EXE    = $ZMP_EXE
ZMP_FC     = $ZMP_FC
ZMP_OPTS   = $ZMP_OPTS
ZMP_CC     = $ZMP_CC
ZMP_LDR    = $ZMP_LDR
ZMP_LIB    = $ZMP_LIB
ZMP_CPP    = $ZMP_CPP
#
#--------------------  implicit rules  ---------------------------------
#
EOF
    if [ "$ZMP_CPP" = "" ]
    then
#
# No separate preprocessor, so do not generate .f files.
#
      cat >> $ZMP_MFL << EOF
.SUFFIXES: .F .c .o

.F.o:
	\${ZMP_FC} \${ZMP_OPTS} -I${ZMP_SRC} \$<

EOF
    else
#
# Use preprocessor to generate foo.f, strip blank lines with
# tr, and compile it.
#
      cat >> $ZMP_MFL << EOF
.SUFFIXES: .F .f .c .o

.f.o:
	\${ZMP_CPP} -P -I${ZMP_SRC} \$*.F | tr -s "" "\012" > \$<
	\${ZMP_FC} \${ZMP_OPTS} \$<

.F.o:
	\${ZMP_CPP} -P -I${ZMP_SRC} \$< | tr -s "" "\012" > \$*.f
	\${ZMP_FC} \${ZMP_OPTS} \$*.f

EOF
    fi
    cat >> $ZMP_MFL << EOF
.c.o:
	\${ZMP_CC} -I${ZMP_SRC} \$<
#
#-------------------  Fortran object files  ----------------------------
#
FOBJ = $FOBJ
#
#-------------------  C object files  ----------------------------------
#
COBJ = $COBJ
#
#---------------------  targets  ---------------------------------------
#
help:
	@$ECHO Type "'make help'             to see this menu"
	@$ECHO Type "'make compile           to create executable
	@$ECHO Type "'make clean'            to remove '*.f' and '*.o' files"
#
#-----------------------------------------------------------------------
#
clean:
	echo "\\rm -f *.o *.f"
	\\rm -f *.o *.f
#
#-----------------------------------------------------------------------
#
compile: \${ZMP_EXE}zmp_pp.x

\${ZMP_EXE}zmp_pp.x: \${FOBJ} \${COBJ}
EOF
    if [ "$ZMP_SYS" = EXEMPLAR ]
    then
#
# On the Exemplar, you need permission to overwrite an existing
# executable, so forcibly remove it first.
#
      cat >> $ZMP_MFL << EOF
	if [ -f \${ZMP_EXE}zmp_pp.x ] ; then \rm -f \${ZMP_EXE}zmp_pp.x ; fi
EOF
    fi
    cat >> $ZMP_MFL << EOF
	\${ZMP_LDR} -o \${ZMP_EXE}zmp_pp.x \${FOBJ} \${COBJ} \${ZMP_LIB}

#
#----------------------  dependencies  ---------------------------------
#
EOF
#
# Write out the dependencies for each  module.  Search source codes 
# for references to header files.
#
    ZMP_SRCS=`echo $ZMP_SRC | sed -e 's/\//+/g'`
    for FILEO in $FOBJ
    do
      FILER=`echo "$FILEO" | sed -e 's/\.o$//'`
      FILEH=`grep '^#include \"' ${FILER}.F | sort -u | sed -e 's/#include \"//' | sed -e 's/\"//' | sed -e "s/^/${ZMP_SRCS}/" | sed -e 's/+/\//g' | tr '\012' ' '`
      $ECHO "${FILEO}: ${FILER}.F $FILEH" 1>&5
      $ECHO "" 1>&5
    done 5>>$ZMP_MFL
    for FILEO in $COBJ
    do
      FILER=`echo "$FILEO" | sed -e 's/\.o$//'`
      FILEH=`grep '^#include \"' ${FILER}.c | sort -u | sed -e 's/#include \"//' | sed -e 's/\"//' | sed -e "s/^/${ZMP_SRCS}" | sed -e 's/+/\//g' | tr '\012' ' '`
      $ECHO "${FILEO}: ${FILER}.c $FILEH" 1>&7
      $ECHO "" 1>&7
    done 7>>$ZMP_MFL
  fi
#
# The makefile is finished ---------------------------------------------
#
# Invoke make to create the ZEUS-PP executable
#
  $ECHO "make -f $ZMP_MFL ${ZMP_TARG}"
  $ECHO ""
  if [ "$ZMP_SYS" = "SGI" ]
  then
    smake -f $ZMP_MFL ${ZMP_TARG}
  else
    make -f $ZMP_MFL ${ZMP_TARG}
  fi
  $ECHO ""
  $ECHO "Finished make"
  $ECHO ""
#
  $ECHO "Finished $SCRIPT"
  $ECHO ""
fi
exit
