Browse code

Add rule for compiling to asm

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@mansr.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>

Mans Rullgard authored on 2011/03/05 04:41:33
Showing 2 changed files
... ...
@@ -47,6 +47,9 @@ COMPILE_S = $(call COMPILE,AS)
47 47
 %.o: %.cpp
48 48
 	$(COMPILE_CXX)
49 49
 
50
+%.s: %.c
51
+	$(CC) $(CPPFLAGS) $(CFLAGS) -S -o $@ $<
52
+
50 53
 %.o: %.S
51 54
 	$(COMPILE_S)
52 55
 
... ...
@@ -20,7 +20,7 @@ $(SUBDIR)x86/%.o: $(SUBDIR)x86/%.asm
20 20
 	$(YASMDEP) $(YASMFLAGS) -I $(<D)/ -M -o $@ $< > $(@:.o=.d)
21 21
 	$(YASM) $(YASMFLAGS) -I $(<D)/ -o $@ $<
22 22
 
23
-$(OBJS) $(SUBDIR)%.ho $(TESTOBJS): CPPFLAGS += -DHAVE_AV_CONFIG_H
23
+$(OBJS) $(OBJS:.o=.s) $(SUBDIR)%.ho $(TESTOBJS): CPPFLAGS += -DHAVE_AV_CONFIG_H
24 24
 $(TESTOBJS): CPPFLAGS += -DTEST
25 25
 
26 26
 $(SUBDIR)$(LIBNAME): $(OBJS)