summaryrefslogtreecommitdiff
path: root/Makefile.in
diff options
context:
space:
mode:
authorJan Maria Matejka <mq@ucw.cz>2018-04-30 12:20:04 +0200
committerJan Maria Matejka <mq@ucw.cz>2018-05-29 11:53:51 +0200
commit906092534ba8479ca76723b7dd7ee233f5a70d1e (patch)
tree71ad39e0a37b361ab50d3c74bf8175161c492e30 /Makefile.in
parentfeae132e0f9bdc62d2b90bf676d12241af8e794c (diff)
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.
Diffstat (limited to 'Makefile.in')
-rw-r--r--Makefile.in11
1 files changed, 10 insertions, 1 deletions
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 $<