Makefiles

James Yates j.yates at quartzuk.com
Tue Oct 26 11:42:38 UTC 2004


Thanks guys. Joel, your suggestion works and is good enough for what I
need. Many thanks for this.

	James 

> -----Original Message-----
> From: Joel Sherrill <joel at OARcorp.com> 
> [mailto:joel.sherrill at OARcorp.com] 
> Sent: 26 October 2004 12:27
> To: James Yates
> Cc: Till Straumann; Jay Monkman; RTEMS Users
> Subject: Re: Makefiles
> 
> James Yates wrote:
> > I have tried this and i get a much bigger executeable, but 
> that's to 
> > be expected, although it is too big for me run through my 
> GDB stub. I 
> > really want to find a solution whereby I can specify a list 
> of sources 
> > that are not optimised as well as a list of sources that 
> are optimised.
> > I have 2 files out of 30 that I need optimisation turned 
> off for, the 
> > rest I really want optimised. The template Makefile.leaf 
> only seems to 
> > cope with one set of CFLAGS for all c files. This is quite 
> an unusual 
> > problem, but one I am eager to solve. Does anyone have any ideas? I 
> > know a bit about makefiles, but I am no expert.
> 
> Being tacky you could provide special rules for those two.
> 
> o-optimize/xxx.o: XXX.c
> 	$(CC..... -O0
> 
> --joel
> 
> > 		James
> > 
> > 
> >>-----Original Message-----
> >>From: Till Straumann [mailto:strauman at slac.stanford.edu]
> >>Sent: 25 October 2004 17:35
> >>To: Jay Monkman
> >>Cc: James Yates; RTEMS Users
> >>Subject: Re: Makefiles
> >>
> >>Jay Monkman wrote:
> >>
> >>>On Mon, Oct 25, 2004 at 04:42:29PM +0100, James Yates wrote:
> >>>
> >>>
> >>>>This is for RTEMS 4.6.0.
> >>>>
> >>>>  This would be a nice thing to have on a permanent basis. 
> >>
> >>Inside my
> >>
> >>>>makefile I have a CFLAGS+=  line.
> >>
> >>(I was assuming you are using the template 'Makefile.leaf').
> >>
> >>
> >>>>When I added -O0 to it, my rtems app seemed to fail to work. I 
> >>>>didn't bother investigating this
> >>
> >>perhaps I
> >>
> >>>>should have.
> >>
> >>Yes, you should have. I tested 'CFLAGS+= -O0' with one of my 
> >>applications and it works fine. Could be that disabling 
> optimization 
> >>triggers a bug in your code?
> >>
> >>
> >>>>Can I then change CFLAGS+=  to CFLAGS =  and use completely
> >>
> >>different
> >>
> >>>>flags in building the app to when I built RTEMS.
> >>
> >>Yes, but you are discouraged to do so [unless you really 
> know what you 
> >>are doing]. The BSP might know of vital flags which must not be 
> >>omitted.
> >>
> >>T.
> >>
> >>
> >>>
> >>>Are you using something like the template Makefile.leaf?
> >>>
> >>>If so, you can modify/overwrite CFLAGS after the lines:
> >>>   include $(RTEMS_MAKEFILE_PATH)/Makefile.inc
> >>>   include $(RTEMS_CUSTOM)
> >>>   include $(RTEMS_ROOT)/make/leaf.cfg
> >>>
> >>
> >>
> >>
> > 
> 
> 
> -- 
> Joel Sherrill, Ph.D.             Director of Research & Development
> joel at OARcorp.com                 On-Line Applications Research
> Ask me about RTEMS: a free RTOS  Huntsville AL 35805
>     Support Available             (256) 722-9985
> 
> 
> 



More information about the users mailing list