[LCA2015-Chat] FORTRAN Makefile and USE-MODULE dependency script

Andrew Buckeridge andrewb at zagam.net
Tue Jan 27 13:09:08 AEDT 2015


Some one asked about a Cygwin build of a FORTRAN app. Cygwin is free
GPL only if used with free GPL software or not free if you pay for a
special license to make non-GPL software. Cygwin allows you to run GNU
software on MicroSoft Windoze.

Fortran SUBROUTINEs and FUNCTIONs in a FORTRAN program can be resolved
at link time from the resulting .o files. However, with modular
programming USE and MODULE you need to first make .mod files after first
finding their dependencies. This is a good reason for _not_ using USE or
MODULE.

Old FØRTRAN up to F77+MIL-STD-1753+IEEE-1003.9 and C do not have this
problem.

These public domain scripts I have used to make a FORTRAN program on
Debian. I have thermal simulation FORTRAN under a MPL style license,
but have not had time to hack it or package it. This thermal simulation
FORTRAN and (Microsoft Visual) C++ is also available under a non-free
license. The FORTRAN version builds on GNU with the attached scripts
using gfortran. As it does not use OS it may also be built with
gfortran on MinGW. (MinGW runtime is public domain so can be used with
GPL and non-GPL software. I.e. run your DoS box crap from the 70s and
80s.)

UWIN also allows you to run POSIX (Standard rather than Visual C)
software on MicroSoft Windoze, but it is _not_ GPL.
http://gcc.gnu.org/ml/gcc-announce/2001/msg00000.html
http://www2.research.att.com/~astopen/download/uwin/faq.html

I avoid these and other difficulties by not using MicroSoft. I don't
have to run a single user fake OS under a fake OS to emulate an OS.

The usemod.awk script depends on mawk or gawk, sort, cut and join from
coreutils. I assume that you are using GNU make.

I am a Unix command line junkie, not a DBA. I also use look -b from
bsdmainutils and know how to use umask and chmod. I prefer C to FORTRAN.
However, as there is a steam punk theme then FØRTRAN is appropriate.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Makefile.free
URL: <http://lists.lca2015.linux.org.au/pipermail/chat/attachments/20150127/147b7744/attachment-0002.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: usemod.awk
URL: <http://lists.lca2015.linux.org.au/pipermail/chat/attachments/20150127/147b7744/attachment-0003.ksh>


More information about the Chat mailing list