Re: question about gcc/g++ -M option

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi George,

> What is the function of gcc/g++ -M option? I have read
> through the man page but still can not understand.
> Could anyone show me an example please?

The -M option is used to create a dependency directed acyclic graph.  It is
in Makefile depedency format output of file prerequisites.

To see how that is used in conjunction with Makefiles, look here:

http://www.gnu.org/software/make/manual/html_node/Automatic-Prerequisites.ht
ml

If you don't use Makefiles, for example if you are using Xcode projects, or
if you use certain alternative make systems such as AT&T Nmake, or you
ascertain dependencies using a truss-like mechanism, then you needn't bother
with -M.

HTH,
--Eljay


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux