[FFmpeg-devel] [PATCH] Add rule for compiling to asm

Mans Rullgard mans
Sat Mar 5 13:52:33 CET 2011


This allows commands of the form "make foo.s", which is useful
for inspecting the compiler output for debugging purposes.

Signed-off-by: Mans Rullgard <mans at mansr.com>
---
 common.mak |    4 ++++
 subdir.mak |    2 +-
 2 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/common.mak b/common.mak
index 3d1a129..2e3cf57 100644
--- a/common.mak
+++ b/common.mak
@@ -44,6 +44,10 @@ HOSTCFLAGS += $(IFLAGS)
 	$(CCDEP)
 	$(CC) $(CPPFLAGS) $(CFLAGS) $(CC_DEPFLAGS) -c $(CC_O) $<
 
+%.s: %.c
+	$(CCDEP)
+	$(CC) $(CPPFLAGS) $(CFLAGS) $(CC_DEPFLAGS) -S -o $@ $<
+
 %.o: %.S
 	$(ASDEP)
 	$(AS) $(CPPFLAGS) $(ASFLAGS) $(AS_DEPFLAGS) -c -o $@ $<
diff --git a/subdir.mak b/subdir.mak
index 8a407fe..806ed9c 100644
--- a/subdir.mak
+++ b/subdir.mak
@@ -20,7 +20,7 @@ $(SUBDIR)x86/%.o: $(SUBDIR)x86/%.asm
 	$(YASMDEP) $(YASMFLAGS) -I $(<D)/ -M -o $@ $< > $(@:.o=.d)
 	$(YASM) $(YASMFLAGS) -I $(<D)/ -o $@ $<
 
-$(OBJS) $(SUBDIR)%.ho $(SUBDIR)%-test.o $(TESTOBJS): CPPFLAGS += -DHAVE_AV_CONFIG_H
+$(OBJS) $(OBJS:.o=.s) $(SUBDIR)%.ho $(SUBDIR)%-test.o $(TESTOBJS): CPPFLAGS += -DHAVE_AV_CONFIG_H
 
 $(SUBDIR)$(LIBNAME): $(OBJS)
 	$(RM) $@
-- 
1.7.4.1




More information about the ffmpeg-devel mailing list