Compartilhar via


Preprocessing Using Cesysgen Conditionals (Windows CE 5.0)

Send Feedback

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

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.

The following code example shows the syntax you can use in Cesysgen conditional statements:

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

Parameters

  • 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.

Remarks

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.

; @CESYSGEN IF CE_MODULES_DEVICE
   ddi_gx.dll      $(_FLATRELEASEDIR)\ddi_gx.dll     NK  SH
; @CESYSGEN ENDIF CE_MODULES_DEVICE

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

See Also

Cesysgen Batch File | Windows CE Modules and Components | Utilities | Build System

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.