프로그램 사용/gcc2015. 12. 17. 17:13

-E는 프리프로세서를 거친 결과를 뽑아준다면..

-M은 확장된 헤더의 목록만 빼준다.


-E

Stop after the preprocessing stage; do not run the compiler proper. The output is in the form of preprocessed source code, which is sent to the standard output.


-M

Instead of outputting the result of preprocessing, output a rule suitable for make describing the dependencies of the main source file. The preprocessor outputs one make rule containing the object file name for that source file, a colon, and the names of all the included files, including those coming from -include or -imacros command line options.


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 . 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

Like -M but do not mention header files that are found in system header directories, nor header files that are included, directly or indirectly, from such a header.


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.


[링크 : http://linux.die.net/man/1/gcc]

'프로그램 사용 > gcc' 카테고리의 다른 글

gcc -fPIC  (0) 2016.06.22
gcc dependency .d 파일?  (0) 2016.03.28
gcc 초기화 관련  (0) 2015.10.21
precompiled header on GCC (라즈베리로 테스트)  (2) 2015.07.30
gcc에서 precompiled header 사용하기  (0) 2015.07.29
Posted by 구차니