INFO: Platform Builder 3.0 Documentation of Sources.cmn and Sources.gen (303433)



The information in this article applies to:

  • Microsoft Windows CE Platform Builder 3.0

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 "Dirs" 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: "CDEFINES=$(CDEFINES) -DAnotherDef", or you can ignore existing settings with this syntax: "CDEFINES=-DOnlyDef".

INCLUDES=<SomePath>;<AnotherPath>;: You can add "INCLUDES=$(INCLUDES) -<AnotherPath>" to append or "INCLUDES=-<OnlyPath> to overwrite.

REFERENCES

Platform Builder 3.0 Help

Modification Type:MinorLast Reviewed:8/18/2005
Keywords:kbinfo KB303433