fc = ifort

lflags = /usr/lib/liblapack.a /usr/lib/libblas.a /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/libg2c.a # standard BLAS/LAPACK

#lflags = -L/opt/intel/mkl/8.0/lib/32 -lmkl -lmkl_lapack64 # MKL

#lflags = -L/scratch/cortner/atlas/lib -llapack -lf77blas -lcblas -latlas /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/libg2c.a # atlas linking, however ATLAS is not a full implementation of LAPACK, so only the dense linear system demo will link with ATLAS


lapack_benchmarks: lapack_benchmarks.f90 utils.f90
	@$(fc) -o lapack_benchmarks lapack_benchmarks.f90 utils.f90 $(lflags)

lapack_spectral: lapack_spectral.f90 utils.f90 sorthalf.f
	@$(fc) -o lapack_spectral lapack_spectral.f90 utils.f90 sorthalf.f $(lflags)

.PHONY: clean

clean:
	@rm -f lapack_benchmarks lapack_spectral *~ *.o 
