News
News

\(PyMake\)

The Python3 based alternative for Makefile
It generates automagically the correct order for compiling module files in Fortran90/ff
Current version: 2026.01 (shared with CC-BY-NC license). See also all python tools
Installation: mkdir $HOME/msxc ; cd $HOME/msxc ; tar xfz $HOME/Download/PyMake2026.tgz ; export MSXC=$HOME/msxc ; export PATH=$PATH:$MSXC/bin
PyMake: a python script to compile Fortran, C, C++ files Usage: PyMake [-c Config.txt] [-d] [-e EXE] [-f] [-s] [-v] [-vvv] [-h] [--version] Options: -c Use Config.txt for compiler/build configurations (vide infra) -d Do a DryRun, i.e. go through the source code but do not compile/build anything -e EXE Make executable EXE -f Force a re-initialization. I.e. compile/build from scratch with a Clean Start -s Silent mode (less feedback) -v Verbose mode (more feedback) -vvv ExtraVerbose mode (even more feedback, mostly for debugging purposes) -h Help (this message) --version Version of PyMake

NB:
An example of the feedback received from the tool: PyMake -f -e $MSXC/exe/guessrho.exe F77 files: 0 F90 files: 10 Modules: 5 C files: 0 C++ files: 0 Ordering levels (based on modules) level 0: 0 level 1: 6 level 2: 3 Found 1 program source files ./guessrho.f90 Reinitializing the compile/build process. Progress: 10% (1/10) Progress: 30% (3/10) Progress: 50% (5/10) Progress: 70% (7/10) Progress: 90% (9/10) Progress: 100% (10/10) gfortran -Bstatic -o $MSXC/exe/guessrho.exe guessrho.o libguessrho.a Made the $MSXC/exe/guessrho.exe executable.
 
Config.txt file contents (default files for MacOSX-GFortran, Linux-GFortran and Linux-Intel are included) # ---------------------------------------------------------------- # compiler names and flags for MacOSX-GFortran # ---------------------------------------------------------------- FC = gfortran -ffixed-form FFLAGS = -O3 -std=legacy -fdefault-real-8 -ffixed-line-length-0 -ffree-line-length-none FC90 = gfortran -ffree-form F90FLAGS = -O3 -std=legacy -fdefault-real-8 -ffixed-line-length-0 -ffree-line-length-none CC = gcc CFLAGS = -O2 CPP = gpp CPPFLAGS = -O2 LD = gfortran LDFLAGS = -Bstatic BLD = ar BLDFLAGS = r RANLIB = ranlib -s -c # ------------------------------------------------------------------- # needobjs indicates if objects may be replaced by dummies (optional) # default: false # # only the object of the program source file will be kept # all others will be placed into a library # ------------------------------------------------------------------- NEEDOBJS = false # ----------------------------- # name of executable (optional) # ----------------------------- EXEC = # --------------------------------------------------------------------------- # library to be made (optional), let PyMake decide otherwise by leaving blank # --------------------------------------------------------------------------- LIBMAKE = # --------------------------------------------------------------------- # libraries to read object files from (optional), leave blank otherwise # NB. can be more than one # --------------------------------------------------------------------- LIBREAD = # ----------------------------------------------------------------- # directory where modules should be stored (optional) # default is 'ModDir' at the top level of the source code directory # ----------------------------------------------------------------- MODDIR = # ------------------------------------------------------------------- # directories with modules from other source codes # NB. can be more than one # ------------------------------------------------------------------- MODREAD =