#
# Makefile for fldgeom5
#

AVS_PATH=/usr/avs
INC_FILE=$(AVS_PATH)/include/Makeinclude
include $(INC_FILE)

AVS_LIBS = $(AVS_PATH)/lib
INC = $(AVS_PATH)/include
BASELIBS=-lgeom -lutil -lm $(LASTFLIBS)
F77_FLOWLIBS=-L$(AVS_LIBS) -lflow_f $(BASELIBS)
F77_SIMLIBS=-L$(AVS_LIBS) -lsim_f $(BASELIBS)
F77_BIND = $(AVS_PATH)/bin/f77_binding
F77_INC = $(AVS_PATH)/include
F77FLAGS=$(AFFLAGS) -I$(INC)
FFLAGS=$(F77FLAGS)

all: avs fldgeom5

fldgeom5:	fldgeom5.o
	$(F77) $(F77FLAGS) -o fldgeom5 fldgeom5.o $(F77_SIMLIBS)

fldgeom5.o:	fldgeom5.f
	$(F77) $(F77FLAGS) -g -c fldgeom5.f

#**********************************************************************
# This target will create a link to the include directory where the
# AVS Fortran include files can be found. This permits the use of
# the Fortran include statement to access 'avs/avs.inc' etc without
# relying on an absolute pathname. 

avs:
	rm -f avs
	ln -s $(F77_INC) avs
