[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 |
Hi,
I am trying to write a automake file for fortran. The project contains
module. So, a output of makedepf90
(http://personal.inet.fi/private/erikedelmann/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 Makefile.am
manually each time I include a new module/subroutine etc, which is bit
of pain. My current Makefile.am looks like:
bin_PROGRAMS = kkr
kkr_SOURCES = src/constants.f90 src/init.f90 src/util.f90
src/main.f90
src/mainmodule.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 =
EXTRA_DIST= autogen.sh
CLEANFILES =*.mod
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?
- automake for fortran with modules,
Rudra Banerjee <=