Mail Archives: djgpp/1999/02/12/09:11:45
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 -