Add Makefile rules for test programs.
authorDiego Biurrun <diego@biurrun.de>
Sun, 27 Jan 2008 22:39:30 +0000 (22:39 +0000)
committerDiego Biurrun <diego@biurrun.de>
Sun, 27 Jan 2008 22:39:30 +0000 (22:39 +0000)
Originally committed as revision 11643 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavutil/Makefile

index 54ac475a49554100de7f2ba56c679c64120c313d..064e7e81bd66fb00e9333bbcf3f3391d4a8699c5 100644 (file)
@@ -42,3 +42,18 @@ LIBVERSION=$(LAVUVERSION)
 LIBMAJOR=$(LAVUMAJOR)
 
 include ../common.mak
+
+TESTS = $(addsuffix -test$(EXESUF), adler32 aes crc des lls md5 sha1 softfloat tree)
+
+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