FFLAGS = -O -bytereclen
# note: SGI, use -trapuv, -lfpe in link to trap overflows

#FC  = f90
#F77 = f90

misc = ../misc

install: others bellhop.out angles.out beam3d.out plotray.out tabssp.out
	@echo "Bellhop built"
	@echo "*************"
	@echo " "

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

others:
	(cd $(misc);  make)

# ******  bellhop ******

BELLHOPOBJS =	bellhop.o \
		readin.o  \
		spliner.o \
		munk.o \
		$(misc)/header.o \
		$(misc)/sdrd.o    \
		$(misc)/ranges.o \
		$(misc)/refco.o \
		$(misc)/subtab.o  \
		$(misc)/errout.o  \
		$(misc)/sorti.o   \
		$(misc)/time.o

bellhop.out:	$(BELLHOPOBJS)
	$(FC) -o bellhop.out $(BELLHOPOBJS)

bellhop.o:	bellhop.f COMBM.FOR

# ******

angles.out:	angles.f
	$(FC) -o angles.out angles.f

beam3d.out:	beam3d.o \
		munk3d.o \
		$(misc)/header.o \
		$(misc)/time.o
	$(FC)  -o beam3d.out \
		beam3d.o \
		munk3d.o \
		$(misc)/header.o \
		$(misc)/time.o

plotray.out: plotray.o 
	$(FC) -o plotray.out plotray.o

tabssp.out: tabssp.o munk.o
	$(FC) -o tabssp.out tabssp.o munk.o

