The Cafe SDK build system is based upon a sophisticated hierarchy of makefiles and supports several types of executables. Integrating an application into this build system can be a daunting task.
Simplemake demonstrates how to build an external application for the Cafe platform with minimum dependence on the SDK environment.
Simplemake is a set of three demos. The first example, the dynload demo, has a set of makefiles and sample code that produce an RPX and a pair of RPLs. The makefile for the RPX application binary can be found here:
The makefiles that create the RPL modules can be found here:
The other demo, helloworld has a single makefile and sample code that produce an RPX.
The makefiles that create the RPX modules can be found here:
These makefiles capture SDK dependencies into a set of environment variables that are customizable.
The goals of Simplemake:
The simplemake demos must be executed from a Cygwin shell. However, simplemake does not require a Cafe Cygwin shell.
The following variables must be defined in each simplemake makefile or shell environment:
||The installation path of the Cafe SDK.|
||The installation path of the Green Hills Software MULTI tool chain.|
The makefiles for these demos define key environment variables for adaptation into your application's build system. Refer to the makefiles for more information. Common customizations are discussed below.
The simplemake demos can be moved to any location on the host PC. However, ensure
GHS_ROOT variables are set correctly
in each makefile.
All RPX and RPL files must be located in the same directory when executing. The
RPL_TARGET variable indicates the directory to which executables will be installed.
The following variables may also be useful when adapting your build process for Cafe.
||Destination directory for object files.||Default is
||Destination directory for linked files.||Default is
||Destination directory for final RPX and RPL files.||Default is
||Name of the main RPX file.||Used in primary RPX makefile only.|
||Name of the RPL module file.||Used in sub-makefile only.|
||Used in conjunction with PrepRPL tool.||
By default retrieves export list from a text file ('
||Names of all source files necessary for build.|
||Directives needed by both the compiler and linker.|
||Specifies how to exploit the small data area (as described by the PowerPPC EABI).||This is an optimization for global variable address look-up.|
||Points to the dependent RPL files for the application.||This demonstrates a new option of
For more information and additional variables, refer to the makefiles directly.
For information, see the "Build Products" section of the Building the SDK MAN page.
Large applications may encounter link failures if the Small Data Area optimization is enabled, due to a known issue in the compiler/linker tool chain.
The simplemake demo illustrates how to work around this problem by disabling SDA optimizations.
For RPLs, the
For RPXs, the
-sda=none flag is used.
For more information, refer to the simplemake makefiles .
The build system and application structure continue to evolve as the platform matures. We hope to concisely capture these changes in the simplemake demo.
caferun -l option enables you to have RPLs in different directories from the RPX. The
-l option specifies the highest level directory above all the RPLs to be included and/or the specific RPL file. For further details, see the
caferun MAN page.
2013/08/06 Removed references to older SDKs.
2013/05/08 Automated cleanup pass.
2011/08/03 Add helloworld examples.
2011/07/21 Caferun -l option added.
2011/02/21 Initial version.