free and open-source build automation tool for C/C++ software projects

tags:

For a project's code to run in multiple environments, adjustments often need to be made at compile-time. For instance, preprocessor macros and conditionals can be used to compile a C/C++ code into either a serial executable (to run on a workstation) or a parallel executable (to run on a computer cluster). Or maybe the system installation of a certain library on an older machine is not recent enough. A current version of the library can be compiled in the user's home directory. A compiler like GCC then needs to be told where to find the updated version.

On Linux systems, GNU Make easily facilitates such adjustments via Makefiles and command-line arguments. The programmer can control which directories are searched for libraries, which macros are defined in preprocessing, which compiler to invoke (e.g., gcc or its MPI equivalent mpicc), etc. For large, multi-part projects, Make keeps track of a tree of dependencies and saves time by only re-compiling only those parts that require it.

GNU Make and its companion programs GCC, etc. are an integral part of the open-source ecosystem.