F90=gfortran
F77=gfortran
CC=gcc

# standard flags
FFLAGS= -O3

SIDATE=vec3ctf.o vec3rot.o rotzxz.o polint.o date_routines.o deltat.o n2char.o sidate.o

.SUFFIXES: .f90 .F90 .f .F .f77 .F77
.f90.o:
	$(F90) $(FFLAGS) -c $<
.F90.o:
	$(F90) $(FFLAGS) $(CFLAGS) -c $<
.f.o:
	$(F77) $(FFLAGS) -c $<
.F.o:
	$(F77) $(FFLAGS) -c $<
.f77.o:
	$(F77) $(FFLAGS) -c $<
.F77.o:
	$(F77) $(FFLAGS) -c $<

sidate: $(SIDATE)
	$(F90) $(FFLAGS) -o sidate.x $(SIDATE)

clean:
	\rm *.o

purge:
	\rm *.o *.x

ppurge:
	\rm *.o *.x sidate.aux sidate.tab sidate.xyz sidate.uvw npole.dat globe*.dat
