Share via


MAKEDLL

The MAKEDLL macro controls whether any actual linking occurs.

Generally, the build process occurs through three passes:

  • In the first pass (Pass 0), the Build utility starts the NMAKE utility (Nmake.exe) to create source code that is required for the project. NMAKE might call the following tools during Pass 0:

    • Microsoft interface description language (MIDL) compiler (Midl.exe).
    • The resources compiler (Rc.exe).
    • The Managed Object Format (MOF) compiler (Mofcomp.exe).
    • The BinPlace utility (Binplace.exe).
  • In the second pass (Pass 1), the Build utility compiles all the source files, and creates import libraries and component libraries.

  • In the third pass (Pass 2), the Build utility links everything against those libraries.

The default, which directs the Build utility to make the third pass, is as follows:

MAKEDLL=1

Typically, you do not set this value. You might do a test in your make file to instruct the Build utility:

IF MAKEDLL=1
do things that you want to do on the second pass of the build 

A more frequent use of this macro is to run NMAKE from the command-line to run the compile and to link without running the Build utility:

nmake MAKEDLL=1

The Build utility will complete the compile operation and the link in one step without running the Build utility. This works because the Build utility is only required to determine the dependencies and call NMAKE. This method works when:

  • You know the dependencies

  • The source file has changed and you do not care about the header file dependency generation

  • You are in a leaf node subdirectory

See Also

BinPlace, NOLINK, Pass 0, Pass 1, Pass 2

 

 

Send comments about this topic to Microsoft

Build date: 5/3/2011