3.6.7.7 M: Generate Make Rule

The -M option tells the preprocessor to output a rule suitable for make that describes the dependencies of each object file.

For each source file, the preprocessor outputs one make-rule whose target is the object file name for that source file and whose dependencies are all the header files it includes. This rule may be a single line or may be continued with a backslash-newline sequence if it is lengthy.

The list of rules is printed on standard output instead of the preprocessed C program.

The -M option implies -E.