RFC: RTEMS Makefile change proposal
Till Straumann
strauman at SLAC.Stanford.EDU
Mon Apr 7 18:35:54 UTC 2003
I'm working often with different BSPs and even different
RTEMS releases for different projects.
Therefore, I created a small framework of 'site' specific
Makefiles for building RTEMS applications / libraries etc.
Putting this together, I came across the following issue:
Usually, RTEMS Makefile pieces are included in the order
Makefile.inc (defines RTEMS_BSP, exec_prefix, CC)
$(RTEMS_CUSTOM)
leaf / directory.cfg
RTEMS_CUSTOM normally is the bsp specific xxx.cfg which
in turn includes 'default.cfg'
All of the BSP configuration files xxx.cfg look like
this:
include $(RTEMS_ROOT)/make/custom/default.cfg
RTEMS_CPU = xxx
RTEMS_CPU_MODEL = yyy
RTEMS_BSP_FAMILY = zzz
PROPOSAL:
I propose to define RTEMS_CPU etc. _before_ including
'default.cfg'. This would make the CPU info available
to 'default.cfg'. Hence, Makefile.inc (or default.cfg
itself) could use an
exec_prefix = $(prefix)/$(RTEMS_CPU)-rtems
rather than hardcoding the CPU type (currently not
possible because 'default.cfg' references 'exec_prefix'
before RTEMS_CPU is defined).
RATIONALE:
Making this change, one is able to use a generic,
site-specific (more complex than the default; e.g.
adds include/library paths + more) Makefile.inc which
is usable across different BSPs and RTEMS releases etc.
All the necessary information can be derived from the
'prefix' and the 'RTEMS_BSP' variables which are
the only ones to be set by the user.
If there are no objections, I'll put a patch together
and file a PR
-- Till
More information about the users
mailing list