IBM
Contents Index Previous Next



Compile and Link an Application


Integration types

Cextreme comes with two different kind of integrations, Light and Threaded.

For a more in depth discussion of the different integration types, please refer to the Cadvanced documentation on the matter, Different Integration Models, since they are very similar.

Essential files

The essential files used for compilation and linking of an Cextreme Code Generator application are

comp.opt

The comp.opt file can be used to control the complete build process from a custom build script. The comp.opt file consists of five important lines (plus lines counted as comments). The syntax for the file is described in Creating a New Library, where a more detailed description of the complete make process can also be found. Below an overview for Cextreme Code Generator can be found.

systemname.m

When the code generator has finished the process of generating code it will execute the command defined in compt.opt at line 4. This usually is some\x7f thing like:

make -f systemname.m sctdir=<a directory>

This will invoke the make facility with the generated makefile.

makeoptions (make.opt)

In the beginning of the generated makefile is an include statement, including the file makeoptions (make.opt) can be found. The variable sctdir, passed to make at the command line, is used to point out the directory where to find makeoptions.

The make program will process the makeoptions file, where it finds a number of settings for compiler, linker, and options for the compilation com\x7f mands for the kernel files. In the generated makefile it will then find the com\x7f pilation commands for the generated files and a command to link the object file to an executable.

system name_env.tpm

The template makefile mentioned above, is used to compile the files that are not directly under the control of the code generator. Such a file is generated if a file with template environment functions is generated. This file will have the name system name_env.tpm and handles compilation of the file with template environment functions. Targeting Expert lets you specify what template makefile to use. This can either be the generated one (use the file name *), or a user defined file. The contents of the specified template makefile is copied last into the generated makefile.

Adopting a compiler

If you need to adopt e.g. a cross compiler, you should do that by creating a new directory where a comp.opt and a makeoptions (or make.opt) file are placed. The easiest way is usually to copy existing comp.opt and makeoptions (or make.opt) files to a new directory and modify them.


http://www.ibm.com/rational
Contents Index Previous Next