FFLAGS= -O -bytereclen

#FC  = f90
#F77 = f90

misc = ../misc
tslib = ../tslib

install:	others scooter.out sparc.out fields.out plotts.out
	@echo "Scooter and Sparc built"
	@echo "***********************"
	@echo " "

clean:
	-rm -f *.o
	-rm -f *.out
	-rm -f *.log

others:
	(cd $(tslib); make)

# ******  scooter ******

SCOOTEROBJS =	scooter.o \
		facnp.o \
		$(misc)/readin.o  \
		$(misc)/sdrd.o    \
		$(misc)/munk.o  \
		$(misc)/twersk.o \
		$(misc)/refco.o \
		$(misc)/ircint.o \
		$(misc)/subtab.o  \
		$(misc)/sorti.o   \
		$(misc)/weight.o \
		$(misc)/splinec.o \
		$(misc)/time.o \
		$(misc)/polyz.o \
		$(misc)/xerror.o \
		$(misc)/errout.o

scooter.out:	$(SCOOTEROBJS)
	$(FC) -o scooter.out $(SCOOTEROBJS)

scooter.o:	scooter.f COMSCO.FOR

#***** sparc *****

SPARCOBJS =	sparc.o \
		facnp.o \
		$(tslib)/source.o \
		$(tslib)/cans.o \
		$(tslib)/preenv.o \
		$(tslib)/hilbert.o \
		$(tslib)/bndpasc.o \
		$(tslib)/cfft.o \
		$(misc)/errout.o \
		$(misc)/readin.o  \
		$(misc)/sdrd.o    \
		$(misc)/munk.o  \
		$(misc)/subtab.o  \
		$(misc)/sorti.o   \
		$(misc)/weight.o \
		$(misc)/splinec.o \
		$(misc)/time.o

sparc.out:	$(SPARCOBJS)
	$(FC) -o sparc.out $(SPARCOBJS)

sparc.o:	sparc.f COMSPA.FOR


# ****** fields ******

FIELDSOBJS =	fields.o \
	hts.o \
	pade.o \
	polyc.o \
	$(misc)/header.o \
        $(misc)/neigh.o \
	$(tslib)/cfft.o \
	$(misc)/errout.o

fields.out:	$(FIELDSOBJS)
	$(FC) -o fields.out $(FIELDSOBJS)

# ****** plotts ******

PLOTTSOBJS =	plotts.o \
		$(tslib)/source.o \
		$(tslib)/cans.o \
		$(tslib)/preenv.o \
		$(tslib)/hilbert.o \
		$(tslib)/bndpasc.o \
		$(tslib)/cfft.o \
		$(misc)/errout.o

plotts.out:	$(PLOTTSOBJS)
	$(FC) -o plotts.out $(PLOTTSOBJS)

