[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

automake for fortran with modules

From: Rudra Banerjee
Subject: automake for fortran with modules
Date: Tue, 27 Jan 2015 13:08:58 +0000

I am trying to write a automake file for fortran. The project contains
module. So, a output of makedepf90
( gives:
$ makedepf90 *.f90
constants.o : constants.f90 
init.o : init.f90 util.o constants.o mainmodule.o 
main.o : main.f90 constants.o init.o 
mainmodule.o : mainmodule.f90 constants.o 
util.o : util.f90 constants.o

So, with my current knowledge of Makefile, I need to update
manually each time I include a new module/subroutine etc, which is bit
of pain. My current looks like:
bin_PROGRAMS = kkr
kkr_SOURCES =   src/constants.f90 src/init.f90  src/util.f90
src/constants.o : src/constants.f90 
src/init.o : src/init.f90 src/util.o src/constants.o src/mainmodule.o
src/main.o : src/main.f90 src/constants.o src/init.o 
src/mainmodule.o : src/mainmodule.f90 src/constants.o 
src/util.o : src/util.f90 src/constants.o 
kkr_LDADD = 

I am looking for something more automatic, like if I directly create a
makefile, I will probably do something like:
%.o: %.f90
        $(F90) $(COMPFLAGS) $*.f90

Is this possible to do something like this for automake as well?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]