On Monday 06 April 2009 03:56:39 Wolfgang Denk wrote:
> In message Prafulla Wadaskar wrote:
> > > This seems to be a lot of effort, from code to command line pollution
> > > - for what exactly?
> > >
> > > Which is the problem you are trying to solve?
> >
> > If I understood current u-boot debugging properly, the debug statements
> > are enabled by editing src file by adding "#define DEBUG"
> > Doing this the release contents will be tampered,
>
> This is just one way to solve this, which is most convenient when you
> want to enable debugging on a  per-file  level.  Of  course  you  can
> acchieve  the  same  effect  by  just  passing "-DDEBUG" as a compile
> option. The Makefile allows to do this globally - there are currently
> no fine-grained selections available by default.

i havent tested it, but i think this should get fine-grained flags in a 
flexible manner ?  (the out of tree isnt exact, but you see what i'm after)
-mike

diff --git a/config.mk b/config.mk
index b1254e9..8791caa 100644
--- a/config.mk
+++ b/config.mk
@@ -209,20 +209,20 @@ export    TEXT_BASE PLATFORM_CPPFLAGS PLATFORM_RELFLAGS 
CPPFLAGS CFLAGS AFLAGS
 ifndef REMOTE_BUILD
 
 %.s:   %.S
-       $(CPP) $(AFLAGS) -o $@ $<
+       $(CPP) $(AFLAGS) $(AFLAGS_$@) -o $@ $<
 %.o:   %.S
-       $(CC) $(AFLAGS) -c -o $@ $<
+       $(CC) $(AFLAGS) $(AFLAGS_$@) -c -o $@ $<
 %.o:   %.c
-       $(CC) $(CFLAGS) -c -o $@ $<
+       $(CC) $(CFLAGS) $(CFLAGS_$@) -c -o $@ $<
 
 else
 
 $(obj)%.s:     %.S
-       $(CPP) $(AFLAGS) -o $@ $<
+       $(CPP) $(AFLAGS) $(AFLAGS_$@) -o $@ $<
 $(obj)%.o:     %.S
-       $(CC) $(AFLAGS) -c -o $@ $<
+       $(CC) $(AFLAGS) $(AFLAGS_$@) -c -o $@ $<
 $(obj)%.o:     %.c
-       $(CC) $(CFLAGS) -c -o $@ $<
+       $(CC) $(CFLAGS) $(CFLAGS_$@) -c -o $@ $<
 endif
 
 #########################################################################

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to