# --------------------------------------------------------------
#
# gnu makefile for crystal_{ml,pp,...}
#
# MSR Jan 1997
#
# Works automatically for Sun4Sun5,hp700 and Linux systems
#
# Usage:
#	gmake            [to create the executable crystal_ml]
#	gmake install	 [to install  it in the correct directory]
#	gmake clean	 [to clean the source directory]
#
#
# --------------------------------------------------------------
#
# System definition (architecture)
#
ARCH := $(shell /users/srio/bin/uname1)
CPP = cpp
#*******************************************************
# libraries for sun5 (expgh) 
#
ifeq ($(ARCH),sun5)
FC = f77
FFLAGS =  -Bstatic
endif
#*******************************************************
# libraries for sun4 (expgd) 
#
ifeq ($(ARCH),sun4)
FC = f77
FFLAGS =  -Bstatic
endif
#*******************************************************
# libraries for hp700 (expga) 
#
ifeq ($(ARCH),hp700)
FC = f77
FFLAGS =  -K +E4  
CPP = /lib/cpp
endif
#*******************************************************
# libraries for hp800 (expga) 
#
ifeq ($(ARCH),hp800)
FC = /opt/fortran/bin/f77
FFLAGS =  -K +E4  
endif
#*******************************************************
# libraries for linux (expglin) 
#
ifeq ($(ARCH),linux)
FC = g77
FFLAGS = -O 
endif
#*******************************************************
# libraries for sgi (lindsga) 
#
ifeq ($(ARCH),irix)
FC = f77
FFLAGS = -O 
endif


all: cryst_fh

cryst_fh:  cryst_fh.F
	$(FC) $(FFLAGS) -o cryst_fh cryst_fh.F

clean: 
	/bin/rm -f *.trace *.o cryst_fh.dat \
	cryst_fh.inf 
