Browse Source

Move common test program infrastructure to common.mak.

Originally committed as revision 11645 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.5
Diego Biurrun 18 years ago
parent
commit
bca9e0bcf1
3 changed files with 9 additions and 18 deletions
  1. +7
    -2
      common.mak
  2. +1
    -8
      libavcodec/Makefile
  3. +1
    -8
      libavutil/Makefile

+ 7
- 2
common.mak View File

@@ -52,7 +52,7 @@ depend dep: $(SRCS)

clean::
rm -f *.o *~ *.a *.lib *.so *.so.* *.dylib *.dll \
*.def *.dll.a *.exp *.ho *.map
*.def *.dll.a *.exp *.ho *.map $(TESTS)

distclean: clean
rm -f .depend
@@ -98,6 +98,11 @@ uninstall-headers::
rm -f $(addprefix "$(INCDIR)/",$(HEADERS))
rm -f "$(LIBDIR)/pkgconfig/lib$(NAME).pc"

.PHONY: all depend dep clean distclean install* uninstall*
tests: $(TESTS)

%-test$(EXESUF): %.c $(LIBNAME)
$(CC) $(CFLAGS) $(LDFLAGS) -DTEST -o $@ $^ $(EXTRALIBS)

.PHONY: all depend dep clean distclean install* uninstall* tests

-include .depend

+ 1
- 8
libavcodec/Makefile View File

@@ -472,17 +472,10 @@ clean::
ps2/*.o ps2/*~ \
sh4/*.o sh4/*~ \
sparc/*.o sparc/*~ \
apiexample$(EXESUF) $(TESTS)

tests: apiexample$(EXESUF) $(TESTS)
apiexample$(EXESUF)

cpuid-test$(EXESUF): i386/cputest.c
apiexample$(EXESUF): apiexample.o $(LIBNAME)
dct-test$(EXESUF): dct-test.o fdctref.o $(LIBNAME)
fft-test$(EXESUF): fft-test.o $(LIBNAME)
motion-test$(EXESUF): motion-test.o $(LIBNAME)

%-test$(EXESUF): %.c $(LIBNAME)
$(CC) $(CFLAGS) $(LDFLAGS) -DTEST -o $@ $^ $(EXTRALIBS)

.PHONY: tests

+ 1
- 8
libavutil/Makefile View File

@@ -45,15 +45,8 @@ TESTS = $(addsuffix -test$(EXESUF), adler32 aes crc des lls md5 sha1 softfloat t

include ../common.mak

tests: $(TESTS)

%-test$(EXESUF): %.c $(LIBNAME)
$(CC) $(CFLAGS) $(LDFLAGS) -DTEST -o $@ $^ $(EXTRALIBS)

lzo-test$(EXESUF): lzo.c $(LIBNAME)
$(CC) $(CFLAGS) $(LDFLAGS) -DTEST -o $@ $^ $(EXTRALIBS) -llzo2

clean::
rm -f $(TESTS) lzo-test$(EXESUF)

.PHONY: tests
rm -f lzo-test$(EXESUF)

Loading…
Cancel
Save