ChorusOS 4.0 Production Guide

Makefile

The Makefile produced by the configure command includes all the Makefiles for each component. View the Makefile.

all::DEVTOOLS.all
    
    PROFILE =  -f <src_dir>/nucleus/sys/ppc60x/ppc60x
    
    include Paths
    include <src_dir>/nucleus/bsp/drv/src/Makefile.bin
    include <src_dir>/nucleus/bsp/drv/src/Makefile.src
    include <src_dir>/nucleus/bsp/powerpc/Makefile.bin
    include <src_dir>nucleus/bsp/powerpc/Makefile.src
    include <src_dir>/nucleus/bsp/powerpc/genesis2/Makefile.bin
    include <src_dir>/nucleus/bsp/powerpc/genesis2/Makefile.src
    include <src_dir>/os/Makefile.bin
    include <src_dir>/os/Makefile.src
    include <src_dir>/iom/Makefile.bin
    include <src_dir>/iom/Makefile.src
    include <bin_dir>/tools/Makefile.bin
    include <bin_dir>/tools/Makefile.CDS.bin
    include <src_dir>/nucleus/sys/common/Makefile.bin
    include <src_dir>/nucleus/sys/common/Makefile.src
    include <bin_dir>/tools/Makefile.CHSERVER.bin
    include <bin_dir>/tools/Makefile.CHTOOLS.bin
    
    COMPONENTS =  DRV DRV_F BSP OS IOM DEVTOOLS NUCLEUS  CDS CHSERVER CHTOOLS
    
    CLEAN =  $(DRV_DIR) $(DRV_F_DIR) $(BSP_DIR) $(OS_DIR) $(IOM_DIR) $(NUCLEUS_DIR)
    clean:; rm -rf $(CLEAN)
    dist: DRV.dist DRV_F.dist BSP.dist OS.dist IOM.dist NUCLEUS.dist
    
    reconfigure: ; cd /<work_dir>; \
    sh <bin_dir>/tools/host/bin/configure \
    -f /<src_dir>/nucleus/ppc60x/ppc60x \
    -s /<src_dir>/nucleus/bsp/drv /<src_dir>/nucleus/bsp/powerpc \
    /<src_dir>/nucleus/bsp/powerpc/genesis2 /<src_dir>/os /<src_dir>/iom $(NEWCONF)

The clean, dist, reconfigure, all and root make targets may be present in Makefiles. They are discussed at the end of this Chapter in relation to the generation of the ChorusOS system image.

In the Makefile shown above, the all target is followed by :: which means you can have multiple update rules. You must use :: if the make command is to work. Note, also, the clean, dist and reconfigure targets in the Makefile shown here.

The top level Makefile of the work directory includes a Makefile.bin and a Makefile.src for each source component. You receive these files with your source delivery. This ensures the compatibility of components even if they are built using different development tools.

Makefile.bin

View the IOM Makefile.bin file for the IOM component, found in the <src_dir>/iom directory.

The output states that the component is the IOM component and gives a list of the components that must be present in the operating system if the IOM component is to work. In this case the OS and NUCLEUS components must be present.

Makefile.src

The Makefile.src file is more complex than the Makefile.bin file, as it describes how the IOM component is compiled. The IOM component is compiled using the mkmk tool.

View the contents of the Makefile.src file for the IOM component, found in the <src_dir>/iom directory.

You are given the information:

This DONE file will be discussed in further detail in the section "Specific Build Options".