The makefiles that accompany code samples in the Platform SDK give good examples of build processes that rely on NMake.exe. Each of them includes WIN32.MAK, which defines many common macros you can use to build 32-bit applications for Windows NT and Windows 95.
This section describes how 32-bit applications and dynamic-link libraries (DLLs) for Windows can be built using the Platform SDK and your development tools. It describes makefile components you may need and includes information on using the C run-time libraries.
The WIN32.MAK file defines macros that can be used to simplify your own makefiles for use with Microsoft development tools. These macros help assure that you have chosen the correct options for the following tasks:
WIN32.MAK should be included in your makefile as follows:
!include <win32.mak>
You can learn a good deal by examining the contents of WIN32.MAK, located in the MSTOOLS\INCLUDE subdirectory.
The following table summarizes the steps used to build a Win32-based application or DLL:
Step | Tool |
---|---|
Compile C and C++ source-language files into object files. | C/C++ compiler included with your development tools. |
Create and edit resources. Doing so may also create include (.H) files which define useful constants. | Dialog Editor, Image Editor, and Font Editor included with the SDK or equivalent development tools. |
Compile resource scripts into linkable resource files. | Resource Compiler included with the SDK or your development tools. |
Create import libraries for each DLL. | Library manager included with your development tools. |
Link the object modules, resources, standard libraries, and import libraries (for an executable using DLLs) to produce an executable module. | Linker included with your development tools. |
Tune your application. | Performance tools and Working Set Tuner included with the SDK. |