ChorusOS 4.0 Production Guide

Chapter 3 Building with imake

There are two development tools available with the ChorusOS 4.0 product, mkmk and imake. The simpler of these two tools is imake and this tool is recommended to ChorusOS developers for the creation of new ChorusOS components.

Chapter 5, Creating a ChorusOS Component describes how to create your own component with imake.

Four components built with imake are the BSP, the DRV, the DRV_F and the EXAMPLES components.

This document does not describe the imake tool in detail but refers to this tool as a comparison to mkmk.

The imake Tool

The imake tool is not discussed in detail in this document. ChorusOS 4.0 Introduction provides information on:

The imake files are located in the <bin_dir>/tools/imake directory.

If you are using the imake tool, you do not use the merging operation described in Chapter 4, Building with mkmk. Instead, imake uses the VPATH variable, which is found in recent versions of make. This means that you can find the source files, regardless of where these directories are located.

Components built with imake, such as DRV, DRV_F and BSP, export their public information through packaging rules.

With the imake tool you can write applications and adapt your system to a new board by using the boot and driver code provided in the board support package.

imake files

An Imakefile is a machine-independent description of the targets you want to build. In the first step of the build process, the imake tool generates a Makefile from each Imakefile, by selecting the configuration files with dependencies appropriate to your target system. This has the advantage that the Imakefile is a machine-independent description of the targets you want to build and so it is portable.

To produce Makefiles, imake uses the top level Project.tmpl file, and the Imakefile contained in each subdirectory. It produces Makefile dependencies which are then written into the Makefile.

If files are altered they must be rebuilt. For the imake tool within the ChorusOS operating system, only dependencies between source and binary files are taken into account when altered files are rebuilt.

make Targets for imake

Table 3-1 make Targets for imake
 Target Description
 all default target, build everything
 Makefile rebuild the Makefile in the current directory
 Makefiles rebuild the Makefiles (recursively)
 clean  remove produced files (recursively)
 depend  generate dependencies (recursively)