Sun Studio 12: C User's Guide

B.2.106 -xMD

Generates makefile dependencies like -xM but includes compilation. -xMD generates an output file for the makefile-dependency information based on the input filename but with the addition of a .d suffix. If you specify -xMD and-xMF, the preprocessor appends all makefile dependency information to the file specified with -xMF.