Hi,
I am having some trouble with my Fortran makefile. I want to use a
small utility that generate dependencies file automatically for f90
programs. I created a test program which contains two files: main.f90
and modtest.f90 (main.f90 use a module defined in modtest.f90).
Following the makedepf90 manual http://www.helsinki.fi/~eedelman/makedepf90/manpage.html
, I created a Makefile that contains
---
FC = g95
FFLAGS=
LIBS=
.SUFFIXES:
SUFFIXES: .f90 .o
.f90.o:
$(FC) -c $(FFLAGS) $<
include .depend
clean:
rm -f *.o *.mod core
depend .depend:
makedepf90 -o main *.f90 > .depend
---
and, the .depend file generated contains
---
FOBJ=main.o modtest.o
main: $(FOBJ)
$(FC) -o $@ $(FFLAGS) $(LDFLAGS) $(FOBJ) $(LIBS)
main.o : main.f90 modtest.o
modtest.o : modtest.f90
---
now, when I "make depend", things work fine, but when I "make", I got
the following error message:
make: *** No rule to make target `.f90', needed by `SUFFIXES'. Stop.
Can you help me ?
thanks,
J.D.