[Tinyos-devel] Re: [Tinyos-help] .platform question

Martin Leopold leopold at diku.dk
Mon Dec 17 10:13:27 PST 2007


Hi Phil.

I think you are taking this in a spirit then it was meant - while it may
or may not make sense to have a %C built into ncc, I can't see the harm
in defining a named env variable for the location of contrib. Contrib
has other provisions that projects must follow, this would just be one
more.

Most project will probably end up defining their own variable with the
same purpose - the way I see it Keven merely proposes that all projects
agree on the name.

On Mon, 2007-12-17 at 08:34 -0800, Philip Levis wrote:
> I do. Why should contrib -- a social construction that happens to be  
> the way it is mostly due to sourceforge licensing and CVS checkout  
> structure -- determine parameters to the compiler? If contrib were in  
> tinyos-2.x (as it is in 1.x), then this would not be necessary. It's  
> not very hard in a Makefile to
> 
> RCHIPS=/opt/tinyos-2.x/contrib/rincon/tos/chips
> 
> CFLAGS +=$(RCHIPS)/cc2420 $(RCHIPS)/at45db

And what if I install contrib in say /home/leopold/tinyos-2.x-contrib?

Having a common variable would enable a common make-rule that requires
no modifications:

RCHIPS=$(TOSCONTRIBROOT)/rincon/tos/chips

> It might make more sense to define a variable in Makerules that  
> derives contrib from TOSDIR/TOSROOT. Application makefiles can  
> override it, etc.

Is there a mechanical relation between the two? I mean is there a way to
derive the location of contrib from the location of TOSROOT? For example
I have more than one "contrib" directory - one is the sourceforge and
one is my local svn tree, how would I pick one or the other?

-- 
Regards Martin Leopold.
Dept. of Computer Science, University of Copenhagen
http://www.diku.dk/~leopold





More information about the Tinyos-devel mailing list