Chapter V makefile Makefile rules

Before telling the makefile, let us first take a cursory look at the rules of the makefile.

target ... : prerequisites ...
	command
	...
	...
target can be an object file (object files), it can be an executable file, it can also be a label (label). For this feature tag in the subsequent "pseudo target" section will be described. 

prerequisites is to generate the target file or target need. 

make command is a command to be executed. (Arbitrary shell commands)

 

This is a file dependencies, that is, target one or more of the target file depends on the file prerequisites of its generation rules defined in the command. Plainly that is to say, prerequisites if there is more than one file is newer than the target file, then the defined command command is executed. This is the rule of the makefile. That is the core content of the makefile.

After all, makefile is such a little thing, like my also the end of this document. Ha ha. Not always the case, which is the main line and the core makefile, but not enough to write a makefile, I will combine my work experience to give a little bit behind you slowly come. Content still living. :)

Guess you like

Origin www.cnblogs.com/vx-cg248805770/p/11647488.html