Sun Studio 12 Update 1: C User's Guide

B.2.114 -xMMD

Use this option to generate makefile dependencies excluding system header files. This is the same functionality as -xM1, but includes compilation. -xMMD 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 -xMF, the compiler uses the filename you provide instead.