flags = -Wall -O3 -fdefault-integer-8 -fdefault-double-8 -fdefault-real-8 -march=native ifdef CHECK flags += -fcheck=all endif ifdef DEBUG flags += -g endif compiler = gfortran ex : test.o ysolve.o Compact.o ${compiler} -o ex test.o ysolve.o Compact.o test.o : test.f90 ysolve.mod compact.mod ${compiler} -c ${flags} test.f90 ysolve.o ysolve.mod : ysolve.f90 compact.mod ${compiler} -c ${flags} ysolve.f90 Compact.o compact.mod : Compact.f90 ${compiler} -c ${flags} Compact.f90 test: ex sh test.sh clean: rm -f *.o *.mod ex