aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMåns Rullgård <mans@mansr.com>2008-04-16 21:50:41 +0000
committerMåns Rullgård <mans@mansr.com>2008-04-16 21:50:41 +0000
commitb153c68b8ad93cefdc51833f2e16c18a5fb1ab90 (patch)
tree03797672388eabfd56a3cc38fdd5a3a0e867d9b4
parent54381d7557c6f2af5bee7110898781782af32312 (diff)
downloadffmpeg-b153c68b8ad93cefdc51833f2e16c18a5fb1ab90.tar.gz
fix building of test programs (make tests)
Originally committed as revision 12867 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--common.mak11
-rw-r--r--libavcodec/Makefile6
2 files changed, 9 insertions, 8 deletions
diff --git a/common.mak b/common.mak
index 2ec0dffd13..93caa00f4d 100644
--- a/common.mak
+++ b/common.mak
@@ -70,11 +70,14 @@ LIBSUFFIXES = *.a *.lib *.so *.so.* *.dylib *.dll *.def *.dll.a *.exp *.map
DISTCLEANSUFFIXES = *.d
define RULES
-$(SUBDIR)%: $(SUBDIR)%.o $(LIBNAME)
- $(CC) $(FFLDFLAGS) -o $$@ $$^ $(FFEXTRALIBS)
+$(SUBDIR)%$(EXESUF): $(SUBDIR)%.o
+ $(CC) $(FFLDFLAGS) -o $$@ $$^ $(SUBDIR)$(LIBNAME) $(FFEXTRALIBS)
-$(SUBDIR)%-test$(EXESUF): $(SUBDIR)%.c $(LIBNAME)
- $(CC) $(CFLAGS) $(FFLDFLAGS) -DTEST -o $$@ $$^ $(FFEXTRALIBS)
+$(SUBDIR)%-test.o: $(SUBDIR)%.c
+ $(CC) $(CFLAGS) -DTEST -c -o $$@ $$^
+
+$(SUBDIR)%-test.o: $(SUBDIR)%-test.c
+ $(CC) $(CFLAGS) -DTEST -c -o $$@ $$^
clean::
rm -f $(TESTS) $(addprefix $(SUBDIR),$(CLEANFILES) $(CLEANSUFFIXES) $(LIBSUFFIXES)) \
diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index 7473cd6b54..32ced9279a 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -473,8 +473,6 @@ DIRS = alpha armv4l bfin i386 mlib ppc ps2 sh4 sparc
include $(SUBDIR)../subdir.mak
-$(SUBDIR)cpuid-test$(EXESUF): $(SUBDIR)i386/cputest.c
+$(SUBDIR)cpuid-test$(EXESUF): $(SUBDIR)i386/cputest.o
$(SUBDIR)apiexample$(EXESUF): $(SUBDIR)apiexample.o $(SUBDIR)$(LIBNAME)
-$(SUBDIR)dct-test$(EXESUF): $(SUBDIR)dct-test.o fdctref.o $(SUBDIR)$(LIBNAME)
-$(SUBDIR)fft-test$(EXESUF): $(SUBDIR)fft-test.o $(SUBDIR)$(LIBNAME)
-$(SUBDIR)motion-test$(EXESUF): $(SUBDIR)motion-test.o $(SUBDIR)$(LIBNAME)
+$(SUBDIR)dct-test$(EXESUF): $(SUBDIR)fdctref.o