digitalmars.com                        
Last update Sun Sep 8 21:42:02 2013

MAKEDEP: Producing dependency lists

The makedep utility produces dependency lists that to use in makefiles. makedep commands have the following form:

makedep [-d] {-ipath} [-m] [-s] [-t] {-xexclude} filenames ...

where:

Makedep Arguments
Argument Description
-d Prints debugging output
-ipath Specifies a search path for header files
-m Include files that are referenced in #include statements, but do not actually exist. By default, makedep only includes files that exist
-s Doesn't list system include files as dependencies (that is, header files enclosed in less-than and greater-than signs, such as #include <stdio.h>)
-t Do not include path names in generated targets
-xexclude Specifies a directory to exclude from the search path. Any path of which this directory is a part will be excluded
filenames ... A list of filenames, separated by spaces, for which dependency lists are to be created

Redirecting the output of makedep to a file can be used as the starting point for a makefile:

makedep -s menu.cpp wbase.cpp > makefile 

The makefile looks like this:

menu.obj : wbase.h menu.h menu.cpp
wbase.obj : wbase.h wbase.cpp 

Home | Runtime Library | IDDE Reference | STL | Search | Download | Forums