Fix dependency generation for yasm assembler files
authorMåns Rullgård <mans@mansr.com>
Sun, 23 Aug 2009 11:02:32 +0000 (11:02 +0000)
committerMåns Rullgård <mans@mansr.com>
Sun, 23 Aug 2009 11:02:32 +0000 (11:02 +0000)
Originally committed as revision 19683 to svn://svn.ffmpeg.org/ffmpeg/trunk

subdir.mak

index ada6e53..d895739 100644 (file)
@@ -31,11 +31,9 @@ $(SUBDIR)%-test.o: $(SUBDIR)%-test.c
        $(CC) $(CPPFLAGS) $(CFLAGS) -DTEST -c -o $$@ $$^
 
 $(SUBDIR)x86/%.o: $(SUBDIR)x86/%.asm
+       $(YASM) $(YASMFLAGS) -I $$(<D)/ -M -o $$@ $$< > $$(@:.o=.d)
        $(YASM) $(YASMFLAGS) -I $$(<D)/ -o $$@ $$<
 
-$(SUBDIR)x86/%.d: $(SUBDIR)x86/%.asm
-       $(YASM) $(YASMFLAGS) -I $$(<D)/ -M -o $$(@:%.d=%.o) $$< > $$@
-
 clean::
        rm -f $(addprefix $(SUBDIR),*-example$(EXESUF) *-test$(EXESUF) $(CLEANFILES) $(CLEANSUFFIXES) $(LIBSUFFIXES)) \
            $(addprefix $(SUBDIR), $(foreach suffix,$(CLEANSUFFIXES),$(addsuffix /$(suffix),$(DIRS))))