#
#  Support files for the RS eigenvalue finding routine from EISPACK.
#  This Makefile includes the minimum set of routines needed to implement
#  ES using EISPACK routines.  
#
SOURCES = pythag.f rs.f tql1.f tql2.f tred1.f tred2.f
OBJECTS = pythag.o rs.o tql1.o tql2.o tred1.o tred2.o
SUPPORTDIR = $$HOME/lekf/support
LIB = $(SUPPORTDIR)/libev.a

#
#  SGI
#
#DEBUG = -g -c -DEBUG:trap_uninitialized -DEBUG:conform_check=YES \
   #-DEBUG:verbose_runtime=YES -DEBUG:subscript_check=YES \
   #-ansi -fullwarn -woff 878,1438,1584 -Dsgi
#OPT = -O -c -OPT:swp=ON -g3 -Dsgi -ansi -fullwarn -woff 878,1438,1584
#F95 = f90

#
#  Sun
#
#DEBUG = -g -c -C -ansi -ftrap=invalid -stackvar -u -w4
#OPT = -O4 -c -ftrap=invalid -stackvar -u
#F95 = f95

#
# Lahey - add --trap for f.p. trapping (but not with these e.v. routines)
#
#  --f95 adds extra checking for nonstandard constructs.  There should be
#  none in this code, except for "call exit" statements (which are de facto
#  standard).
#  Use --info for more details on code optimizations
#  Use --lst for a listing (mostly useful with --lst)
#
DEBUG = -g -c --trace --chk a,e,s
OPT = -O -c --trace
F95 = lf95

FFLAGS = $(OPT) 
#FFLAGS = $(DEBUG) 

.SUFFIXES: .o .mod .f .f90 .f95 .F90 .F95
.F90.o:
	$(F95)  $(FFLAGS) $<
.f90.mod:
	$(F95)  $(FFLAGS) $<
.f95.mod:
	$(F95)  $(FFLAGS) $<
.f.o:
	$(F95)  $(FFLAGS) $<
.f90.o:
	$(F95)  $(FFLAGS) $<
.f95.o:
	$(F95)  $(FFLAGS) $<

all:	$(OBJECTS)
	ar r $(LIB) $(OBJECTS)

pythag.o:
rs.o:
tql1.o:
tql2.o:
tred1.o:
tred2.o:


(%.o): %.f

clean:
	rm -f $(OBJECTS) core a.out

