build: add rules to generate preprocessed source files

This is useful for debugging.  Dependencies for these files are not
generated due to limitations in many compilers.

Signed-off-by: Mans Rullgard <mans@mansr.com>
This commit is contained in:
Mans Rullgard
2012-10-03 13:48:27 +01:00
parent 9ae80e6a9c
commit c262649291
3 changed files with 13 additions and 2 deletions

View File

@@ -45,6 +45,9 @@ COMPILE_S = $(call COMPILE,AS)
%.o: %.S
$(COMPILE_S)
%.i: %.c
$(CC) $(CCFLAGS) $(CC_E) $<
%.h.c:
$(Q)echo '#include "$*.h"' >$@