automatic generation of .mod files?
- From: Carlie Coats <carlie@xxxxxxxxxxxxxxx>
- Date: Tue, 03 May 2011 07:21:59 -0400
Tobias Burnus wrote:
[snip...]
(Another thing I was thinking about was on-the-fly generation of .mod
files: If the .mod file couldn't be found for "USE module", the
compiler searches for the "module.f90" files (e.g. in only some
directories like /usr/{local/,}include/finclude/) and automatically
compiles it to generate a .mod file (and no assembler/object file).
What about putting the following into your "makefile" (it doesn't
work for "system" sourcefiles, but does work for your own)
..SUFFIXES: .m4 .c .F .f
....
SRCDIR = <your source directory>
OBJDIR = <HW/OS/compiler/flag-dependent "build" directory>
....
%.o : %.mod # Disable "gmake"s obnoxious implicit Modula-2 rule
..f90.mod:
cd ${OBJDIR}; ${FC} ${FFLAGS} -c ${SRCDIR}/$<
.
- Follow-Ups:
- Re: automatic generation of .mod files?
- From: Ron Shepard
- Re: automatic generation of .mod files?
- From: Wolfgang Kilian
- Re: automatic generation of .mod files?
- References:
- Location of .mod files?
- From: Wolfgang Kilian
- Re: Location of .mod files?
- From: Arjen Markus
- Re: Location of .mod files?
- From: Tobias Burnus
- Location of .mod files?
- Prev by Date: Re: About the ide for fortran used by you.
- Next by Date: Re: About the ide for fortran used by you.
- Previous by thread: Re: Location of .mod files?
- Next by thread: Re: automatic generation of .mod files?
- Index(es):
Relevant Pages
|