public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH/next] add %.c->%.i and %.c->%.s rules
@ 2009-06-14 15:03 Mike Frysinger
  2009-06-14 15:11 ` Jean-Christophe PLAGNIOL-VILLARD
  2009-06-14 21:37 ` Wolfgang Denk
  0 siblings, 2 replies; 3+ messages in thread
From: Mike Frysinger @ 2009-06-14 15:03 UTC (permalink / raw)
  To: u-boot

The Linux kernel has some helper rules which allow you to quickly produce
some of the intermediary files from C source.  Specifically, you can
create .i files which is the preprocessed output and you can create .s
files which is the assembler output.  This is useful when you are trying
to track down header/macro expansion errors or inline assembly errors.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
note: this depends on the "per-file/dir flags customization" patch

 config.mk |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/config.mk b/config.mk
index f5b9c28..7fc0453 100644
--- a/config.mk
+++ b/config.mk
@@ -214,5 +214,9 @@ $(obj)%.o:	%.S
 	$(CC)  $(AFLAGS) $(AFLAGS_$(@F)) $(AFLAGS_$(BCURDIR)) -o $@ $< -c
 $(obj)%.o:	%.c
 	$(CC)  $(CFLAGS) $(CFLAGS_$(@F)) $(CFLAGS_$(BCURDIR)) -o $@ $< -c
+$(obj)%.i:	%.c
+	$(CPP) $(CFLAGS) $(CFLAGS_$(@F)) $(CFLAGS_$(BCURDIR)) -o $@ $< -c
+$(obj)%.s:	%.c
+	$(CC)  $(CFLAGS) $(CFLAGS_$(@F)) $(CFLAGS_$(BCURDIR)) -o $@ $< -c -S
 
 #########################################################################
-- 
1.6.3.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-06-14 21:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-14 15:03 [U-Boot] [PATCH/next] add %.c->%.i and %.c->%.s rules Mike Frysinger
2009-06-14 15:11 ` Jean-Christophe PLAGNIOL-VILLARD
2009-06-14 21:37 ` Wolfgang Denk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox