The structure of a project file Foundation
The structure of a project file is divided into sections. The first section [PROJECT] contains definitions which are valid for the whole project and refers to the second section. The second section [project.xpj] refers to further sections that maintain the definitions of the targets.
Sources for a target can be program source files (PRG) or resource files (ARC) for example. The source files are compiled with the compiler (xpp.exe) or resource compiler (arc.exe) and linked to the executable file.
When a target file is to be created as a dynamic library (DLL file), the corresponding file name must have the the DLL extension. The ProjectBuilder automatically creates all necessary files for creating a DLL. This includes the export definition file (DEF file) and the import library (LIB file). The latter must be linked to an EXE that uses functions contained in a DLL.
When setting up the project file it is sufficient to list the source files (PRG files and resource files if necessary) in the Target sections. The project file can then be extended with standard definitions by calling pbuild.exe with the command line parameter /g.
The ProjectBuilder supports definitions which are described in the next chapter. A definition has the syntax "DEFINITION_NAME = DEFINITION_VALUE". On the right side of the name/value tuple, the macro operator can be used to insert the value of a definition. The macro operator has the syntax "$(DEFINITION_NAME)". Also supported is a set of macros which can be used instead of the definition name in the form "$(MACRO_NAME)". These macros are expanded as shown in the following table.
Macro | Expansion |
---|---|
ASSETS_PATH | The full qualified path of the assets directory |
DEBUG_PATH | The full qualified path of the directory for debug intermediates |
RELEASE_PATH | The full qualified path of the directory for release intermediates |
TARGET_PATH | The full qualified path of the directory where the binary is deployed |
ASSETS_PATH:
The ASSETS_PATH references the asset repository of your project. A project's asset repository is typically located in the sub-folder ".assets" in the folder containing your project file.
DEBUG_PATH:
The DEBUG_PATH is the full qualified directory where the intermediate files are created for a debug build. The DEBUG_PATH depends on the definition INTERMEDIATE_DEBUG.
RELEASE_PATH:
The RELEASE_PATH is the full qualified directory where the intermediate files are created for a non-debug build. The RELEASE_PATH depends on the definition INTERMEDIATE_RELEASE.
TARGET_PATH:
The TARGET_PATH is the full qualified directory where the binary is deployed and depends on the definition TARGET_DIR.
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.