WAF Spec File (*.json)

Overview

Spec Files are used to specify which modules to include in which build configuration and can be found in <SDK_DIR>/_WAF_/Specs/*.json

Those files are written in JSON (http://en.wikipedia.org/wiki/JSON) and use a nested data structure.

All settings are mandatory if not explicit stated otherwise.

Layout

{            
    "description"                  : "Small description of this spec",    
    "valid_platforms"              : [ "win", "durango", "orbis", "linux", "darwin" ],
    "valid_configuration"          : [ "debug", "profile", "performance", "release" ],
  "game_projects"                : "GameSDK",
  "visual_studio_name"           : "GameSDK",
            
    "modules" : 
    [
        "CryCommon",
        "Cry3DEngine", 
        ...    
        "CryGameSDK"
    ],
    
    "win_modules"                  : ["Windows_Specific_Module" ,... ],
    "win_debug_modules"            : ["Windows_Debug_Specific_Module" ,...],
    
    "win_release_defines"          : ["WIN_RELEASE_SPECIFIC_DEFINE" ,...],
    ...
    "linux_modules"                : ["Linux_Specific_Module" ,... ],
    ...
}

Platform Independent Entries

description

The description communicates to other developers what this Specc is for.

valid_platforms

The valid_platforms entry specifies which platforms this spec targets. See WAF Supported Platforms for a list of valid platforms.

valid_configuration

The valid_configuration entry specifies which configurations this spec targets. See WAF Supported Project Configurations for a list of valid configurations.

visual_studio_name

The visual_studio_name entry specifies which name should be given to this spec in the Configuration Manager of Visual Studio.

Example:

Platform Dependent Entries

The following entries have the ability to be adjusted on a per platform and/or configuration basis.

Each entry is a combination of the following:
<platform><architecture><configuration><entryId> = <string> ( "" ) or <string-list> ( ["", "",...] )

For <platform> and <architecture> see WAF Supported Platforms.
For <configuration> see WAF Supported Project Configurations.
For <entryId> see this chapter.

Where <platform><architecture><configuration> are optional.

Valid example combinations:

  • entryId - Global, target all platforms, all architectures and all configurations for entryId
  • win_entryId - Valid for all windows platforms, all architectures and all configurations for entryId
  • win_debug_entryId - Valid for all windows platforms, all architectures and debug configuration for entryId
  • win_x86_entryId - Valid for all windows platforms, x86 architectures and all configuration for entryId
  • win_x86_debug_entryId - Valid for all windows platforms, x86 architectures and debug configuration for entryId
  • x86_debug_entryId - Valid for all platforms, x86 architectures and debug configuration for entryId
  • x86_entryId - Valid for all platforms, x86 architectures and all configuration for entryId

Multiple occurrences of the same <entryId> with different combinations will be concatenated to one list. Hence if entryId and win_entryId were to occur in the same spec. For windows platforms the resulting list would be entryId + win_entryId. For Linux platforms the result would be just entryId.

modules

The modules entry controls which engine modules are part of this Specc's build pipleline. The module names are taken from the module file wscript's "target" entry field. See WAF Module File (wscript) for more info.

defines

The defines entry controls a list of defines that is passed to each of the modules during compilation.

monolithic_builds

The monolithic_builds options entry controls the final link result. By default all qualifying modules will emit a DLL.
If this entry is set to "True" (string), each qualifying module will emit object files which are then linked together into a single monolithic executable.