PSCF v1.3.1
|
Make and Makefiles (Prev) Configuration (config.mk) Files (Next)
This file briefly discusses the contents and purpose of different types of makefiles and makefile fragments that are used in the PSCF build system. All files with a filename extension .mk are makefile fragments that are included into makefiles via the make include directive.
After the configure script is run, but before any source files are compiled, the following types of makefiles and makefile fragments exist in different levels of the src directory tree:
In addition, PSCF root directory contains a makefile at this point.
Before the configure script is run, there are not any makefiles or makefile fragments in the bld directory. After the configure script is run, the following types of files will exist in the bld directory tree:
The configure script installs the config.mk files in both the src and bld directory, and installs all of the makefiles in the bld directory. The configure script also installs a bash script named "setopts" in the bld directory, by copying the corresponding script in the src directory.
Compilation leads to creation of additional intermediate object, dependency and library files in either the src directory (for in-source compilation) or the bld directory (for out-of-source) compilation, as discussed previously. Each dependency files is a short makefile fragments that can be included into makefiles.
The names and contents of different types of makefile fragments used in the build system are summarized in the table below:
Type | Filename | Contents |
---|---|---|
configuration | config.mk | configuration file, defines global variables |
source list | sources.mk | list source files and object file targets |
pattern rule | patterns.mk | pattern rules for object files targets |
dependency | *.d | list prerequisites of a single *.o target |
Each of these types of file is described in a bit more detail below, and then in greater detail in subsequent pages about different types of file:
Every makefile within a namespace-level subdirectory of the src or bld directory includes a single config.mk configuration file, a single patterns.mk pattern rule file, one or more sources.mk source list files, and multiple *.d dependency files.
Make and Makefiles (Prev) Build System (Up) Configuration (config.mk) Files (Next)