Cesysgen Conditional Statements (Compact 2013)


You can use Cesysgen conditional statements to selectively compile source code during the Sysgen phase of the build process.


// @CESYSGEN IF [!]<Component> [[OR | || | AND | &&] [!]Component]
// @CEYSGEN ELSE IF [!]<Component> [[OR | || | AND | &&] [!]Component]
// @CESYSGEN ELSEIF [!]<Component> [[OR | || | AND | &&] [!]Component]


  • Component
    Specifies a component name, using one of the two following formats:

    • If it is a module, the format used is <OS tree name>_MODULES_<module_name>.
      For example, DCOM_MODULES_OLE32 is the OLE32 module located in %_WINCEROOT%\Public\DCOM.
    • If it is a component, the format used is <module_name>_<component_name>.
      For example, GWES_ACCESSIB is the accessib component, contained in the GWES module.


If the source file is not a C header file, replace the forward slash (/) characters with the appropriate type of comment character. For example, if the source file is a dirs file located in %_WINCEROOT%\Platform or its subdirectories, use the pound (#) character instead.

Platform Builder uses these statements, inserted as comments in the source files, to filter files from include directories in the OS tree. Cesysgen conditionals are also used to filter binary image builder (.bib) files, registry (.reg), database (.db), and file system (.dat) files in the OS tree, typically located in Oak\Files directories.

When the Sysgen tool calls Cefilter.exe for preprocessing, it processes the conditionals in these types of source files to create filtered versions of the original files.

Driver dependences that you specify in the Platform.bib file must have matching relationships specified in the DIRS file that builds the driver.

You can use Cesysgen conditional preprocessing to ensure that the driver DIRS file matches the driver dependencies defined in the Platform.bib file.

The following code example shows a segment of a Platform.bib file that specifies a dependency between the ddi_gx.dll driver for a target device and the CE_MODULES_DEVICE sysgen.

   ddi_gx.dll      $(_FLATRELEASEDIR)\ddi_gx.dll     NK  SH

The DIRS file that points to the ddi_gx.dll driver must contain the same CESYSGEN IF logic.

See Also


Cesysgen Batch File (Cesysgen.bat)
Platform Builder Command Line Tools