B32 Structure of the Makefiles

The Kbuild mechanism makes use of the following components in addition to the .config file:

□ The main Makefile (/path/to/src/Makefile) that generates the kernel itself and the modules by recursively compiling the subdirectories in accordance with the configuration and by merging the compilation results into the final product.

□ The architecture-specific Makefile in arch/arch/Makefile that is responsible for the processor-specific subtleties that must be observed during compilation — special compiler optimization options, for instance. This file also implements all make targets specified in the architecture-specific help discussed previously.

□ scripts/Makefile.* that contain make rules relating to general compilation, module production, the compilation of various utilities, and the removal of object files and temporary files from the kernel tree.

□ Various kernel source subdirectories that contain Makefiles that cater to the specific needs of a driver or subsystem (and employ a standardized syntax).

Continue reading here: The Main Makefile

Was this article helpful?

0 0