BSP and Device Driver Development Guide
This class of Makefiles produces a library. The BSP wrapup Makefile
is responsible for producing the library libbsp.a
which is later
merged into the librtemsall.a
library. This Makefile specifies
which BSP components are to be placed into the library as well as which
components from the CPU dependent support code library. For example,
this component may choose to use a default exception handler from the
CPU dependent support code or provide its own.
This Makefile makes use of the foreach
construct in GNU make
to pick up the required components:
BSP_PIECES=startup clock console timer CPU_PIECES= GENERIC_PIECES= # bummer; have to use $foreach since % pattern subst # rules only replace 1x OBJS=$(foreach piece, $(BSP_PIECES), ../$(piece)/$(ARCH)/$(piece).o) \ $(foreach piece, $(CPU_PIECES), \ ../../../../libcpu/$(RTEMS_CPU)/$(piece)/$(ARCH)/$(piece).o) \ $(wildcard \ ../../../../libcpu/$(RTEMS_CPU)/$(RTEMS_CPU_MODEL)/fpsp/$(ARCH)/fpsp.rel) \ $(foreach piece, \ $(GENERIC_PIECES), ../../../$(piece)/$(ARCH)/$(piece).o)
The variable OBJS
is the list of "pieces" expanded to include
path information to the appropriate object files. The wildcard
function is used on pieces of libbsp.a
which are optional and
may not be present based upon the configuration options.
BSP and Device Driver Development Guide
Copyright © 1988-2003 OAR Corporation