FTN = gfortran
FFTROOT = /mnt/kaustapps/fftw/3.2.2
INCLUDE = $(FFTROOT)/include
LIB = $(FFTROOT)/lib
FLAG = -lfftw3 -mcmodel=medium

lsm2d.x : ./given_sub/lsm2d_subs.o dist_cal.o
	$(FTN) lsm2d.f90 $^ -o $@ -L$(LIB) $(FLAG)

dist_cal.o: dist_cal.f90
	$(FTN) -c dist_cal.f90

clean:
	rm -f *.x *.o *.bin *.dat *.log *.mod

run :
	./lsm2d.x
