From 906092534ba8479ca76723b7dd7ee233f5a70d1e Mon Sep 17 00:00:00 2001 From: Jan Maria Matejka Date: Mon, 30 Apr 2018 12:20:04 +0200 Subject: Macro: Added a bunch of dirty C preprocessor tricks Included are Makefile implicit rules to show the preprocessed source. When debugging something around this, it may be handy. --- Makefile.in | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'Makefile.in') diff --git a/Makefile.in b/Makefile.in index eb6cc5c9..8f6c0c8b 100644 --- a/Makefile.in +++ b/Makefile.in @@ -95,7 +95,7 @@ clean = $(eval $(call clean_in,$(1))) include $(addsuffix /Makefile,$(addprefix $(srcdir)/,$(dirs))) # Generic rules - +# Object file rules $(objdir)/%.o: $(srcdir)/%.c $(objdir)/.dir-stamp $(objdir)/sysdep/paths.h $(E)echo CC -o $@ -c $< $(Q)$(CC) $(CFLAGS) -MMD -MP -o $@ -c $< @@ -104,7 +104,16 @@ $(objdir)/%.o: $(objdir)/%.c $(objdir)/.dir-stamp $(objdir)/sysdep/paths.h $(E)echo CC -o $@ -c $< $(Q)$(CC) $(CFLAGS) -MMD -MP -o $@ -c $< +# Debug: Preprocessed source rules +$(objdir)/%.E: $(srcdir)/%.c $(objdir)/.dir-stamp $(objdir)/sysdep/paths.h + $(E)echo CC -o $@ -E $< + $(Q)$(CC) $(CFLAGS) -MMD -MP -o $@ -E $< + +$(objdir)/%.E: $(objdir)/%.c $(objdir)/.dir-stamp $(objdir)/sysdep/paths.h + $(E)echo CC -o $@ -E $< + $(Q)$(CC) $(CFLAGS) -MMD -MP -o $@ -E $< +# Debug: Assembler object rules $(objdir)/%.S: $(srcdir)/%.c $(objdir)/.dir-stamp $(objdir)/sysdep/paths.h $(E)echo CC -o $@ -S $< $(Q)$(CC) $(CFLAGS) -MMD -MP -o $@ -S $< -- cgit v1.2.3