OAR

RTEMS 4.5.0 On-Line Library


Makefiles Directory Makefiles

PREV UP NEXT Bookshelf BSP and Device Driver Development Guide

3.1.1: Directory Makefiles

The Directory class of Makefiles directs the build process through a set of subdirectories in a particular order. This order is usually chosen to insure that build dependencies are properly processed. Most BSPs only have one Directory class Makefile. The Makefile.in in the BSP root directory (c/src/lib/libbsp/CPU/BSP) specifies which directories are to be built for this BSP. For example, the following Makefile fragment shows how a BSP would only build the networking device driver if HAS_NETWORKING was defined:

NETWORKING_DRIVER_yes_V = network
NETWORKING_DRIVER = $(NETWORKING_DRIVER_$(HAS_NETWORKING)_V)

[...]

SUB_DIRS=include start340 startup clock console timer \
    $(NETWORKING_DRIVER) wrapup

This fragment states that all the directories have to be processed, except for the network directory which is included only if the user configured networking.


PREV UP NEXT Bookshelf BSP and Device Driver Development Guide

Copyright © 1988-2000 OAR Corporation