Mimic the linux kernel build system's ability to have per source file
CFLAGS or AFLAGS.  In the makefile you can now do:

CFLAGS_<file>.o += MY_FLAGS_OPTIONS

Signed-off-by: Kumar Gala <[EMAIL PROTECTED]>
---
 config.mk |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/config.mk b/config.mk
index b08b7a7..1359f7d 100644
--- a/config.mk
+++ b/config.mk
@@ -237,20 +237,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

 #########################################################################
-- 
1.5.4.5


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users

Reply via email to