-M
Unless specified explicitly (with -MT or -MQ), the object file name consists of the name of the source file with any suffix replaced with object file suffix and with any leading directory parts removed. If there are many included files then the rule is split into several lines using `\'-newline. The rule has no commands.
This option does not suppress the preprocessor's debug output, such as -dM. To avoid mixing such debug output with the dependency rules you should explicitly specify the dependency output file with -MF, or use an environment variable like DEPENDENCIES_OUTPUT (see Environment Variables). Debug output will still be sent to the regular output stream as normal.
Passing -M to the driver implies -E, and suppresses warnings with an implicit -w.
-MM
This implies that the choice of angle brackets or double quotes in an `#include' directive does not in itself determine whether that header will appear in -MM dependency output. This is a slight change in semantics from GCC versions 3.0 and earlier.
-MF
file
When used with the driver options -MD or -MMD, -MF overrides the default dependency output file.
-MG
#include
directive without prepending any path. -MG also suppresses preprocessed output, as a missing header file renders this useless.
This feature is used in automatic updating of makefiles.
-
MP
This is typical output:
test.o: test.c test.h test.h:
-MT
target
An -MT option will set the target to be exactly the string you specify. If you want multiple targets, you can specify them as a single argument to -MT, or use multiple -MT options.
For example, -MT '$(objpfx)foo.o' might give
$(objpfx)foo.o: foo.c
-MQ
target
$$(objpfx)foo.o: foo.c
The default target is automatically quoted, as if it were given with -MQ.
-MD
If -MD is used in conjunction with -E, any -o switch is understood to specify the dependency output file (see -MF), but if used without -E, each -o is understood to specify a target object file.
Since -E is not implied, -MD can be used to generate a dependency output file as a side-effect of the compilation process.
-MMD
'Resources > Documents' 카테고리의 다른 글
coord-0.4 tutorial (0) | 2009.12.21 |
---|---|
병렬 컴파일이 가능하기 위한 Makefile 작성 규칙에 대한 고찰 (0) | 2009.12.19 |
[gcc 옵션 분석: 사용 예시] -MD, -MT, -MF, -MP (0) | 2009.12.09 |