4.6.7.3 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 dependencies is printed to a file with a .d extension and compilation will terminate after preprocessing.