OPTS  = -c -extend-source  
OPTSF = -extend-source 

lit: lit.f dilog.o prmts.o idx.o ydplog.o ygam.o ygam1s.o gamma.o f.o inout.o invsg.o leq1s.o hamiltonian.o
	ifort $(OPTSF) -o lit lit.f dilog.o prmts.o idx.o invsg.o leq1s.o ydplog.o ygam.o ygam1s.o gamma.o f.o inout.o hamiltonian.o

prmts.o: ./mystd/prmts.f
	ifort $(OPTS) ./mystd/prmts.f

idx.o: ./mystd/idx.f ./mystd/prmts.f
	ifort $(OPTS) ./mystd/idx.f

invsg.o: ./mystd/invsg.f90 ./mystd/prmts.f
	ifort $(OPTS) ./mystd/invsg.f90

leq1s.o: ./mystd/leq1s.f90 ./mystd/prmts.f
	ifort $(OPTS) ./mystd/leq1s.f90

ydplog.o: ./std/ydplog.f90 ./mystd/prmts.f	
	ifort $(OPTS) ./std/ydplog.f90

dilog.o: ./std/dilog.f90 ./mystd/prmts.f
	ifort $(OPTS) ./std/dilog.f90

ygam.o: ./std/ygam.f90 ./mystd/prmts.f
	ifort $(OPTS) ./std/ygam.f90

ygam1s.o: ./std/ygam1s.f90 ./mystd/prmts.f
	ifort $(OPTS) ./std/ygam1s.f90

gamma.o: ./gamma/gamma.f ./mystd/prmts.f
	ifort $(OPTS) ./gamma/gamma.f

f.o: ./f/f.f ./mystd/prmts.f
	ifort $(OPTS)  ./f/f.f

inout.o: ./inout/inout.f ./mystd/prmts.f
	ifort $(OPTS) ./inout/inout.f

hamiltonian.o: ./ham/hamiltonian.f ./mystd/prmts.f
	ifort $(OPTS) ./ham/hamiltonian.f

clean:
	rm -f *.o
	rm -f *.mod
	rm -f lit
	rm -f *~
	rm -f */*~
