This document mainly introduces the basic usage methods of the GNU make tool, including the working principle of make, the composition and use of Makefile files, the definition and use of Makefile rules, the execution of commands and the use of variables.
This document is a Chinese translation and guide for GNU make version 3.8. It serves as a comprehensive resource for Linux programmers, detailing the usage of the make tool and the creation of Makefiles for automating build processes. The manual covers fundamental concepts, syntax rules, and advanced features necessary for managing software projects. This manual is written in Chinese.
GNU make is a command tool that interprets the rules in a Makefile to build and manage a project; with a correct Makefile, the whole project can be compiled with one command.
A Makefile describes the compilation and linking rules for the whole project, including which source files need compiling and how.
The examples use C language source programs.
The reader should understand the GNU toolchain and common Linux tools such as gcc, as, ar, ld, and yacc, and be able to understand some shell scripts when writing a Makefile.