Windows Driver Kit: Driver Development Tools
Sources File

You describe Build utility products in a file that is named "Sources" that is located in each source code subdirectory.

The Sources file contains a series of macro definitions that are recognized by the Build utility. For more information, see Using Macros and Environment Variables.

Each Sources file must contain the following macro definitions:

The !include Directive and the SOURCES_USED Macro

If you use the !include preprocessing directive to include some file in a Sources file or in Makefile.inc, you must use the SOURCES_USED macro to list the included files.

The files that are listed in SOURCES_USED are treated as a dependency for regenerating the _objects.mac file. This file is in the root of the dependency tree, and contains all the dependencies for building the current directory. Adding these file names to the SOURCES_USED macro guarantees that the Build utility will correctly detect whether _objects.mac has to be updated.

There are several preprocessing directives available, such as !include, !if, and !endif. For more information, see ms792123.internet_link_sm(en-us,MSDN.10).gifMakefile Preprocessing Directives on MSDN.

For information about how to create a Sources file, see Utilizing a Sources file Template.


Send feedback on this topic
Built on November 19, 2009
Page view tracker