Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Makefile File
Collapse the table of content
Expand the table of content

Makefile File (Compact 2013)

3/26/2014

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 2013, a makefile file contains all commands, macro definitions, and options that specify how to build a project.

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

You should not edit the makefile file or alter Makefile.def. When creating your own projects in the OS tree, create a makefile file that simply includes makefile.def or copy an existing makefile file from another project. The following is a sample makefile file.

!include $(_MAKEENVROOT)\makefile.def

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.

Show:
© 2015 Microsoft