# 
# A makefile to create executable for CASTEP
# Date generated:  Mon Dec 12 08:52:52 EET 1994
# For cypress (IRIX64 cypress 6.0 08241804 IP21 mips)
# 
SHELL=/bin/sh
PROGRAM=CASTEP
USEDLANGUAGE=F
TIMER=../../lib/timers.a
EXE=../CASTEP.exe
# The following are taken from '../../make.flags':
CPP=/lib/cpp
CPPFLAGS=-P
CC=cc
CFLAGS=-O3 -mips4
FC=f77
OPTF=-O3 -mips4 -WK,-r=3,-chs=16 -r8
FFLAGS=$(OPTF)
LD=f77
LFLAGS=
LIBS=$(TIMER)
RANLIB=touch
TIMER32=../../lib/timers32.a
# The following are specifically for the CASTEP-program:
FFLAGS=-OPT:const_copy_limit=18568 -OPT:global_limit=18568 $(OPTF) -static 
CPPFLAGS=-P -DAMAX1=MAX -DAMIN1=MIN -DAMOD=MOD -DCEXP=EXP -DAIMAG=IMAG
 
OBJS=bastr.o \
     bmdtr.o \
     cgion.o \
     chsp.o \
     clock.o \
     congra.o \
     congrabs.o \
     constr.o \
     efermi.o \
     enrlnl.o \
     ewaltr.o \
     fdirtr.o \
     feictr.o \
     felitr.o \
     fexctr.o \
     fft3d.o \
     forlnl.o \
     forsym.o \
     fstftr.o \
     fvptr.o \
     gentr.o \
     nag_s.o \
     nonloc.o \
     orsptr.o \
     reassn.o \
     rosym.o \
     serlnl.o \
     serlph.o \
     spptrd.o \
     strsym.o \
     subrot.o \
     vsinl.o \
     wfinrn.o \
     wfintr.o \
     wftri.o
 
.SUFFIXES:  $(SUFFIXES) .F .inc
 
$(EXE): $(TIMER) $(OBJS)
	$(LD) $(LFLAGS) $(OBJS) $(LIBS) -o $@
 
# rules:
 
.c.o:
	$(CC) -c $(CFLAGS) $<
.F.f:
	$(CPP) $(CPPFLAGS) $< > $*.f
.f.o:
	$(FC) -c $(FFLAGS) $<
 
# dependencies:
 
$(TIMER):
	(cd ../../lib/src ; make)
 
bastr.o: bastr.f
#	$(FC) -c -O0 -mips4 $<
bastr.f:  bastr.F 
 
bmdtr.o: bmdtr.f
bmdtr.f:  bmdtr.F 
 
cgion.o: cgion.f
	$(FC) -c -O0 -mips4 -r8 $<
cgion.f:  cgion.F param.inc
 
chsp.o: chsp.f
chsp.f:  chsp.F 
 
clock.o: clock.f
clock.f:  clock.F 
 
congra.o: congra.f
congra.f:  congra.F 
 
congrabs.o: congrabs.f
congrabs.f:  congrabs.F 
 
constr.o: constr.f
constr.f:  constr.F 
 
efermi.o: efermi.f
efermi.f:  efermi.F 
 
enrlnl.o: enrlnl.f
enrlnl.f:  enrlnl.F 
 
ewaltr.o: ewaltr.f
ewaltr.f:  ewaltr.F 
 
fdirtr.o: fdirtr.f
fdirtr.f:  fdirtr.F 
 
feictr.o: feictr.f
feictr.f:  feictr.F 
 
felitr.o: felitr.f
felitr.f:  felitr.F 
 
fexctr.o: fexctr.f
fexctr.f:  fexctr.F 
 
fft3d.o: fft3d.f
fft3d.f:  fft3d.F 
 
forlnl.o: forlnl.f
forlnl.f:  forlnl.F 
 
forsym.o: forsym.f
forsym.f:  forsym.F 
 
fstftr.o: fstftr.f
fstftr.f:  fstftr.F 
 
fvptr.o: fvptr.f
fvptr.f:  fvptr.F 
 
gentr.o: gentr.f
gentr.f:  gentr.F 
 
nag_s.o: nag_s.f
nag_s.f:  nag_s.F 
 
nonloc.o: nonloc.f
nonloc.f:  nonloc.F 
 
orsptr.o: orsptr.f
orsptr.f:  orsptr.F 
 
reassn.o: reassn.f
reassn.f:  reassn.F 
 
rosym.o: rosym.f
rosym.f:  rosym.F 
 
serlnl.o: serlnl.f
serlnl.f:  serlnl.F 
 
serlph.o: serlph.f
serlph.f:  serlph.F 
 
spptrd.o: spptrd.f
spptrd.f:  spptrd.F 
 
strsym.o: strsym.f
strsym.f:  strsym.F 
 
subrot.o: subrot.f
subrot.f:  subrot.F 
 
vsinl.o: vsinl.f
vsinl.f:  vsinl.F 
 
wfinrn.o: wfinrn.f
wfinrn.f:  wfinrn.F 
 
wfintr.o: wfintr.f
wfintr.f:  wfintr.F 
 
wftri.o: wftri.f
wftri.f:  wftri.F 
 
 
# utilities:
 
tidy:
	-/bin/rm -f a.out *~
	-/bin/rm -f *.o
 
cleanf:
	-/bin/rm -f *.f
 
clean:
	-/bin/rm -f a.out *~
	-/bin/rm -f *.o
	-/bin/rm -f *.f
	-/bin/rm -f $(EXE)
