From: Mike Frysinger Date: Sun, 14 Jun 2009 15:03:48 +0000 (-0400) Subject: add %.c->%.i and %.c->%.s rules X-Git-Tag: v2009.08-rc1~150 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=31f30c9eb60d9ab0bd702e31f66345f99b34bdc6;p=oweals%2Fu-boot.git add %.c->%.i and %.c->%.s rules 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 Acked-by: Jean-Christophe PLAGNIOL-VILLARD --- diff --git a/config.mk b/config.mk index f5b9c28f1d..7fc045375a 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 #########################################################################