Home     |     .Net Programming    |     cSharp Home    |     Sql Server Home    |     Javascript / Client Side Development     |     Ajax Programming

Ruby on Rails Development     |     Perl Programming     |     C Programming Language     |     C++ Programming     |     IT Jobs

Python Programming Language     |     Laptop Suggestions?    |     TCL Scripting     |     Fortran Programming     |     Scheme Programming Language


 
 
Cervo Technologies
The Right Source to Outsource

MS Dynamics CRM 3.0

Fortran Programming Language

f90 makefile


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.

Try

.SUFFIXES: .f90 .o

cheers,

paulv

--
Paul van Delst             Ride lots.
CIMSS @ NOAA/NCEP/EMC               Eddy Merckx

Add to del.icio.us | Digg this | Stumble it | Powered by Megasolutions Inc