cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/1999/02/12/09:11:45

Message-Id: <3.0.6.32.19990212090935.00843740@pop.netaddress.com>
X-Sender: pderbysh AT pop DOT netaddress DOT com
X-Mailer: QUALCOMM Windows Eudora Light Version 3.0.6 (32)
Date: Fri, 12 Feb 1999 09:09:35 -0500
To: djgpp AT delorie DOT com
From: Paul Derbyshire <pderbysh AT usa DOT net>
Subject: Re: djgpp equivalent of makedepend
In-Reply-To: <Pine.SV4.3.93.990212174019.25256A-100000@tagore>
Mime-Version: 1.0
Reply-To: djgpp AT delorie DOT com

At 05:41 PM 2/12/99 +0530, you wrote:
>hi all,
>
>i need the djgpp equivalent of mkdep or makedepend. can anyone tell me the
>site from where i can download it?

You already have it -- this functionality is built into the preprocessor.
Given foo.cc, you can get the dependencies for foo.cc output when compiling
it, using

gcc -MMD foo.cc -o foo.o

The dependencies for foo.cc will end up in a file named foo.d.

The dependencies for your whole project should be: your exe depends on all
the .cc files and on any libraries that compile as part of the project; and
each of the .cc files depends on the dependencies in the corresponding .d
file. Any of the libraries compiled in the project depend on any other
libraries they use and on its .cc files, etc.

The dependency information will be based on #include "foo.h" directives but
excluding #include <foosystem> directives including standard system headers.
It works the same for plain .c files as for C++ files.

-- 
   .*.  "Clouds are not spheres, mountains are not cones, coastlines are not
-()  <  circles, and bark is not smooth, nor does lightning travel in a
   `*'  straight line."    -------------------------------------------------
        -- B. Mandelbrot  |http://surf.to/pgd.net
_____________________ ____|________     Paul Derbyshire     pderbysh AT usa DOT net
Programmer & Humanist|ICQ: 10423848|

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019