Compilation and Make
Channel: ARCHER UK National Supercomputing Service
Date: 10/08/2015

"Make" is the standard Unix tool for managing multi-file programs, where the compilation instructions are encoded in a "makefile". Most large packages will come with associated makefiles, so it is important to understand how they work so code can be successfully compiled on new platforms, e.g. when porting a code to ARCHER.

Unfortunately, makefiles have a tendency to become very complicated and attain something of a mystical status. They are handed down from father to son, mother to daughter, supervisor to student, requiring magical incantations and only fully understood by a select few ...

In fact, make is fundamentally a very straightforward tool and most makefiles can be understood with some basic knowledge and a bit of practical experimentation.

In an initial 30-minute presentation, David Henty (EPCC and ARCHER CSE Support) will cover:

    the difficulties of managing multi-file codes;
    the fundamentals of make;
    simple makefiles for compiling Fortran and C codes;
    common mistakes and misconceptions.

    The aim of the presentation is to initiate online discussions between users and staff on compilation and makefiles, or any other aspects of the ARCHER service.

Links to PDF copies of the slides and the sample programs as a gzipped tar file at http://www.archer.ac.uk/training/virtual/