Commit 59f7448d authored by diego's avatar diego

Move common test program infrastructure to common.mak.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@11645 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 53f5b6e6
...@@ -52,7 +52,7 @@ depend dep: $(SRCS) ...@@ -52,7 +52,7 @@ depend dep: $(SRCS)
clean:: clean::
rm -f *.o *~ *.a *.lib *.so *.so.* *.dylib *.dll \ rm -f *.o *~ *.a *.lib *.so *.so.* *.dylib *.dll \
*.def *.dll.a *.exp *.ho *.map *.def *.dll.a *.exp *.ho *.map $(TESTS)
distclean: clean distclean: clean
rm -f .depend rm -f .depend
...@@ -98,6 +98,11 @@ uninstall-headers:: ...@@ -98,6 +98,11 @@ uninstall-headers::
rm -f $(addprefix "$(INCDIR)/",$(HEADERS)) rm -f $(addprefix "$(INCDIR)/",$(HEADERS))
rm -f "$(LIBDIR)/pkgconfig/lib$(NAME).pc" 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 -include .depend
...@@ -472,17 +472,10 @@ clean:: ...@@ -472,17 +472,10 @@ clean::
ps2/*.o ps2/*~ \ ps2/*.o ps2/*~ \
sh4/*.o sh4/*~ \ sh4/*.o sh4/*~ \
sparc/*.o sparc/*~ \ sparc/*.o sparc/*~ \
apiexample$(EXESUF) $(TESTS) apiexample$(EXESUF)
tests: apiexample$(EXESUF) $(TESTS)
cpuid-test$(EXESUF): i386/cputest.c cpuid-test$(EXESUF): i386/cputest.c
apiexample$(EXESUF): apiexample.o $(LIBNAME) apiexample$(EXESUF): apiexample.o $(LIBNAME)
dct-test$(EXESUF): dct-test.o fdctref.o $(LIBNAME) dct-test$(EXESUF): dct-test.o fdctref.o $(LIBNAME)
fft-test$(EXESUF): fft-test.o $(LIBNAME) fft-test$(EXESUF): fft-test.o $(LIBNAME)
motion-test$(EXESUF): motion-test.o $(LIBNAME) motion-test$(EXESUF): motion-test.o $(LIBNAME)
%-test$(EXESUF): %.c $(LIBNAME)
$(CC) $(CFLAGS) $(LDFLAGS) -DTEST -o $@ $^ $(EXTRALIBS)
.PHONY: tests
...@@ -45,15 +45,8 @@ TESTS = $(addsuffix -test$(EXESUF), adler32 aes crc des lls md5 sha1 softfloat t ...@@ -45,15 +45,8 @@ TESTS = $(addsuffix -test$(EXESUF), adler32 aes crc des lls md5 sha1 softfloat t
include ../common.mak include ../common.mak
tests: $(TESTS)
%-test$(EXESUF): %.c $(LIBNAME)
$(CC) $(CFLAGS) $(LDFLAGS) -DTEST -o $@ $^ $(EXTRALIBS)
lzo-test$(EXESUF): lzo.c $(LIBNAME) lzo-test$(EXESUF): lzo.c $(LIBNAME)
$(CC) $(CFLAGS) $(LDFLAGS) -DTEST -o $@ $^ $(EXTRALIBS) -llzo2 $(CC) $(CFLAGS) $(LDFLAGS) -DTEST -o $@ $^ $(EXTRALIBS) -llzo2
clean:: clean::
rm -f $(TESTS) lzo-test$(EXESUF) rm -f lzo-test$(EXESUF)
.PHONY: tests
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment