Microsoft KB Archive/303433

= INFO: Platform Builder 3.0 Documentation of Sources.cmn and Sources.gen =

Article ID: 303433

Article Last Modified on 2/12/2007

-

APPLIES TO


 * Microsoft Encarta Reference Suite 2001

-



This article was previously published under Q303433



SUMMARY
This article describes Sources.gen and Sources.cmn and the use of these files for Platform Builder 3.0.



MORE INFORMATION
Sources.gen is a generated file. This file is built as part of the operating system build process and includes the calculated independent software vendor (ISV) and OEM include paths. It is basically a holding file that exists so that the system does not need to regenerate these multiple times. Do not make changes to this file because these changes will be overwritten.

Sources.cmn provides a place to store common settings that apply to the entire source tree. When a build starts in a particular folder, it recurses through the path looking for the topmost folder with a &quot;Dirs&quot; file. For example, if you are building in Public\Common\Oak\Drivers\Pcmcia, the build process will detect that there are Dirs files in Public\Common\Oak\Drivers, Public\Common\Oak, and Public\Common but not in Public itself. The process will then look for a Sources.cmn file in Public\Common (the topmost folder with a Dirs file) and use any settings from that file.

Useful settings for Sources.cmn:

WINCEOEM=1: This causes some OEM-only header files in the Oak\Inc folder to be added. Use this setting if a majority of your sources require those header files. If only a few folders need the Oak\Inc files, then you will improve the speed of your compiles by leaving this unset.

WARNISERROR=1: This causes any warning in the build to generate a build error, which will stop the build. In general you should investigate all of the warnings that the build process generates, even those known to be unimportant. Use of this setting is a good safeguard against skipping serious warnings accidentally, since warnings may be difficult to find in the build output log.

CDEFINES=-DSomeDef : This sets one or more preprocessor definitions. You must include the -D switch on each define you add. You can add new defines by using this syntax: &quot;CDEFINES=$(CDEFINES) -DAnotherDef&quot;, or you can ignore existing settings with this syntax: &quot;CDEFINES=-DOnlyDef&quot;.

INCLUDES=;;: You can add &quot;INCLUDES=$(INCLUDES) -&quot; to append or &quot;INCLUDES=- to overwrite.

