Browse Source

Add Makefile rules for test programs.

Originally committed as revision 11643 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diego Biurrun 17 years ago
parent
commit
4942a0e8ee
1 changed files with 15 additions and 0 deletions
  1. 15 0
      libavutil/Makefile

+ 15 - 0
libavutil/Makefile

@@ -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