Adding new board support option

Ralf Corsepius ralf.corsepius at rtems.org
Wed Oct 21 06:43:59 UTC 2009


On 10/20/2009 03:27 PM, Joel Sherrill wrote:
> Peter Dufault wrote:
>> On Oct 20, 2009, at 5:30 , Ralf Corsepius wrote:
>>
>>> However, you should really check, if you actually want an exported/
>>> global define in bspopts.h or an AM_CONDITIONAL.
>>
>> You are correct, I don't want either of them. I am now unconditionally
>> adding the new network driver and I assume it will be resolved at link
>> time by the BSP user.
> You do need to make sure configure.ac and Makefile.am
> turn it off if networking is disabled.

Not necessarily. Instead, you can conditionally compile the code (I.e. 
apply compile-time conditionals/defines instead of automake-conditionals).

Working principle:

#include <rtems/cpuopts.h>

#ifdef RTEMS_NETWORKING
<networked code>
#endif

This works as long as there are no files which need to be installed 
conditionally. If the later is the case, AM_CONDITIONALS are inevitable.


Ralf



More information about the users mailing list