SHELL=/bin/csh
FLNM=gonz
USER=foster
USERUC=FOSTER
NEWLIB= getgcmv1.a
CFT=	cft77
LDR=	segldr
LDFLAGS= -i /u0/$(USER)/segdir
LIBS= igrf.a	
COMMAND=$(FLNM).ymp
MSSRCPATH=/$(USERUC)/src
TARFILE=$(FLNM).tar
TDIR=/d/$(USER)/$(FLNM)
LIST = $(FLNM).list
#
SRCS= gonz.f getinp.f ixlon.f mkuvmag.f \
blkdatix.f fof2int.f gethist.f mkuvmag.f \
lnblnk.f newhts.f proclat.f assign.f lnblnk2.c \
tgcmint.f setgrid.f

OBJS= gonz.o getinp.o ixlon.o mkuvmag.o \
blkdatix.o fof2int.o gethist.o \
lnblnk.o newhts.o proclat.o assign.o lnblnk2.o \
tgcmint.o setgrid.o
#
# Header files not in cwd (for listing target)
INCH = \
	/home/sting/foster/proclib/tgcmparam.h \
	/home/sting/foster/proclib/tgcmhdr.h \
	/home/sting/foster/proclib/tgcmlab.h \
        /home/sting/foster/proclib/tigcmfld.h \
        /home/sting/foster/getgcm/input.h \
        /home/sting/foster/getgcm/tgcmrd.h
#
# Source files not in cwd (for listing target)
INCF = \
	/home/sting/foster/proclib/blkdatix.f \
        /home/sting/foster/proclib/lnblnk2.c \
        /home/sting/foster/proclib/lnblnk.f \
        /home/sting/foster/proclib/tgcmint.f \
        /home/sting/foster/proclib/ixlon.f \
        /home/sting/foster/proclib/setgrid.f \
        /home/sting/foster/getgcm/assign.f \
        /home/sting/foster/getgcm/fof2int.f \
        /home/sting/foster/getgcm/proclat.f \
        /home/sting/foster/getgcm/newhts.f \
        /home/sting/foster/getgcm/gethist.f
#
# To compile with FlowTrace turned on Comment out the next line (Put
# a '#' in front of it)
#
FFLAGS=	

#
# To compile with FlowTrace turned on unComment the next line (Take
# out the '#' in front of it) and unComment the line following it
# on Cray-2 systems
#
#FFLAGS= -e f
#LIBS=	 -lflow
#
# Lines from here on down should not need to be changed.  They are the
# actual rules which make uses to build a.out.
#
$(COMMAND):	$(OBJS)
	$(LDR) $(LDFLAGS) -o $(COMMAND) $(OBJS) $(LIBS)
tar:
	/home/sting/foster/bin/mktar \
-v -f $(TDIR)/$(TARFILE) -r -i $(INCF) $(INCH) $(FLNM).inp Makefile
#
# Make shavano object library (made from clib):
#
$(NEWLIB):  $(OBJS)
	bld -r $(NEWLIB) $(OBJS)
#
# Make backup of source code on the mass store:
# (make this target from the sun)
#
#
# Make backup of source code on the mass store:
# (make this target from the sun)
#
msbackup:
	/home/sting/foster/bin/mktar \
-v -f $(TDIR)/$(TARFILE) -r -i $(INCF) $(INCH)
	toms -ft $(TDIR)/$(TARFILE) $(MSSRCPATH)/$(TARFILE)
#
# Make master listing of header and source files:
# (make this target from the sun)
#
listing:
	cat *.h $(INCH) *.f $(INCF) > $(LIST)

clean:
	rm -f *.o *.l

clobber:	clean
	rm -f $(COMMAND)

void:	clobber
	rm -f $(SRCS) makefile
