Compartir a través de


Makefile File (Windows CE 5.0)

Each subdirectory in a source code tree that includes a sources file also includes a makefile file. The following code example shows a directory structure and the placement of the makefile file.

\MyProj
  Dirs
  \Proj1
    Dirs
    Sources
    Makefile

In an application development environment, such as Microsoft® Visual Studio® .NET, a makefile file contains all commands, macro definitions, and options that specify how to build a project.

In contrast, in Platform Builder, the sources files contain this type of information; the makefile file contains only the common makefile file, Makefile.def.

You should not edit the makefile file or alter Makefile.def.

After Build.exe locates the dirs and sources files, it sets an internal environment variable. Nmake.exe uses this variable to append the Sources.cmn file to sources files in applicable subdirectories.

Using the linking rules contained in Makefile.def, Nmake.exe compiles the source code specified in the sources files or it links object modules.

Nmake.exe uses Makefile.def to transform the current set of environment variables into calls to a compiler, linker, or other tool. For example, if _TGTCPUFAMILY is set to SHx, Nmake.exe selects the Shcl.exe compiler.

Nmake.exe uses other environment variables to determine the options that it passes to Shcl.exe.

See Also

Source Code Configuration Files | Module-Definition File

Last updated on Thursday, February 02, 2006

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.