makefile编译fortran的module
FC = gfortran
FFLAGS = -g -Wall -O3 --free-form
modFFLAGS = --free-form
OPTFC = -O3 -funroll-loops -ftree-vectorize -fcray-pointer -cpp
#src = $(wildcard *.f90)
src = secdmo.f90 record.f90
obj = $(src:.f90=.o )
secd : $(obj)
$(FC) $(FFLAGS) -o $@ $^
%.o : %.f90
$(FC) $(modFFLAGS) $(OPTFC) -c $<
#secdmo.mod : secdmo.f
# $(FC) $(modFFLAGS) @ $<
.phony: clean
clean:
rm -rf secd secdmo.mod funct.plo accu* fort* ./errdi* *.o