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

令狐冲
令狐冲
Engineer of offshore wind turbine technique research

My research interests include distributed energy, wind turbine power generation technique , Computational fluid dynamic and programmable matter.

Related

本站访问量: