The make command can contain several parameters: Flag, macro definition, description file name, and target file name. The standard format is:
Make [flags] [macro definitions] [targets]In UNIX, flags contains:-F file specifies the file as the description file. if the file parameter is "-", the description file points to the standard input. If there is no "-F", The makefile or makefile in the current directory is the description file by default. (PS: in Linux, GNU make searches for the default description file according to gnumakefile, makefile, and makefile)-I ignores the error message returned by command execution-s silence mode, do not output the corresponding command line information before execution-r Disable build-in rule-N non-execution mode, and output all execution commands, if-T is not executed to update the target file-Q make, 0 or non-0-p is returned based on whether the target file is updated. All macro definitions and target file descriptions are output in-d debug mode, output detailed information about the file and detection time. in Linux, some options are different from those in UNIX, as shown below: -C dir changes to the specified directory Dir-I dir before reading makefile. When other makefiles are included in the Dir-I dir directory, use the change option to specify the search directory-H help document, display All make options-W. Before and after processing makefile, the macro definition of the working directory will overwrite the macro definition of the MAKEFILE file type. target specifies the target to be compiled, and multiple compilation targets can be defined at the same time. During execution, the target Files specified in target are compiled in sequence from left to right. if no target is specified, the command defaults to the first target in the description file (such as makefile.
Makefile common variables (GNU ):$ @ Target file name $ <first item name in dependences $ ^ name of all items in dependences, separated by spaces $? The names of new items in all dependences are separated by spaces. The @ symbol prohibits the command line where the output is located. That is to say, all command lines starting with @ are only executed, the output is not printed.