diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index 35bd46e27984ade0bcd54b335a79d4353b8c8174..8d0e8384ce744288f0f740d3351e1a7b65039542 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -160,8 +160,7 @@ cpuid_test: i386/cputest.c
 imgresample-test: imgresample.c
 	$(CC) $(CFLAGS) -DTEST -o $@ $^ -lm
 
-dct-test: dct-test.o jfdctfst.o jfdctint.o i386/fdct_mmx.o\
-          fdctref.o jrevdct.o i386/idct_mmx.o simple_idct.o i386/simple_idct_mmx.o
+dct-test: dct-test.o fdctref.o $(LIB)
 	$(CC) -o $@ $^ -lm
 
 motion-test: motion_test.o $(LIB)