makefile编译fortran的module

Reading time: 0 minutes and 18 seconds with 67 words. 本文总阅读量
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

Avatar
Ye Zhaoliang
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

本站访问量: