Sun Studio 12:C 用户指南

B.2.105 -xM1

收集类似 -xM 的依赖性,但不包括 /usr/include 文件。例如:


more hello.c
#include<stdio.h>
main()
{
    (void)printf(“hello\n”);
}
cc– xM hello.c
hello.o: hello.c
hello.o: /usr/include/stdio.h

使用 -xM1 编译不会报告头文件的依赖性:


cc– xM1 hello.c
hello.o: hello.c

-xM1-Xs 模式下不可用。

如果指定 -xM1-xMF,编译器会将所有 makefile 依赖关系信息附加到使用-xMF 所指定的文件中。