#!/usr/local/bin/make
#makefile for fortran files...
#author: ejp, 2/20/96

#Note: if subroutine len_trim is not supplied by your compiler,
#      uncomment it from file gd_x.for

#Note: to get the Fortran to operate correctly on SGI Irix 6.2 with SGI's
#      compiler it is neccessary to add the switch -bytereclen to compile command.

#enter your fortran compiler below:
FC = g77

FLAGS = -c

all: gx_asea gx_hsea gx_tsea gx_head gx_plot gx_dl77 gx_dl93 gx_gtran gx_coast geodas-gridlist geodas-hdrecs77

clean:
	rm -f *.o
	rm -f gx_asea
	rm -f gx_hsea
	rm -f gx_tsea
	rm -f gx_head
	rm -f gx_plot
	rm -f gx_dl77
	rm -f gx_dl93
	rm -f gx_coast
	rm -f geodas-gridlist
	rm -f geodas-hdrecs77
	rm -f gx_gtran

gx_asea: gd_asea.o gd_aseaa.o gd_aseab.o gd_aseac.o gd_sea.o gd_seax.o gd_x.o
	$(FC) -o gx_asea -static gd_asea.o gd_aseaa.o gd_aseab.o gd_aseac.o gd_sea.o gd_seax.o gd_x.o

gx_hsea: gd_hsea.o gd_hseaa.o gd_hseab.o gd_hseac.o gd_sea.o gd_seax.o gd_x.o
	$(FC) -o gx_hsea -static gd_hsea.o gd_hseaa.o gd_hseab.o gd_hseac.o gd_sea.o gd_seax.o gd_x.o

gx_tsea: gd_tsea.o gd_tseaa.o gd_tseab.o gd_tseac.o gd_sea.o gd_seax.o gd_x.o
	$(FC) -o gx_tsea -static gd_tsea.o gd_tseaa.o gd_tseab.o gd_tseac.o gd_sea.o gd_seax.o gd_x.o

gx_head: gd_head.o gd_headx.o gd_x.o
	$(FC) -o gx_head -static gd_head.o gd_headx.o gd_x.o

gx_plot: gd_plot.o gd_plota.o gd_plotx.o gd_x.o
	$(FC) -o gx_plot -static gd_plot.o gd_plota.o gd_plotx.o gd_x.o

gx_dl77: gd_dl77.o gd_dlx.o gd_x.o
	$(FC) -o gx_dl77 -static gd_dl77.o gd_dlx.o gd_x.o

gx_dl93: gd_dl93.o gd_nadco.o gd_dlx.o gd_x.o
	$(FC) -o gx_dl93 -static gd_dl93.o gd_nadco.o gd_dlx.o gd_x.o

gx_gtran: gd_gtran.o gd_gtsub.o gd_gtx.o gd_x.o
	$(FC) -o gx_gtran -static gd_gtran.o gd_gtsub.o gd_gtx.o gd_x.o

gx_coast: gd_coast.o gd_csta.o gd_cstx.o gd_x.o
	$(FC) -o gx_coast -static gd_coast.o gd_csta.o gd_cstx.o gd_x.o

geodas-gridlist: gridlist.o
	$(FC) -o geodas-gridlist -static gridlist.o

geodas-hdrecs77: hdrecs77.o
	$(FC) -o geodas-hdrecs77 -static hdrecs77.o

#compile any object file I need...
%.o: %.for
	$(FC) $(FLAGS) $<
