Revision bca9e0bc

View differences:

common.mak
52 52

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

  
57 57
distclean: clean
58 58
	rm -f .depend
......
98 98
	rm -f $(addprefix "$(INCDIR)/",$(HEADERS))
99 99
	rm -f "$(LIBDIR)/pkgconfig/lib$(NAME).pc"
100 100

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

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

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

  
103 108
-include .depend
libavcodec/Makefile
472 472
	   ps2/*.o ps2/*~ \
473 473
	   sh4/*.o sh4/*~ \
474 474
	   sparc/*.o sparc/*~ \
475
	   apiexample$(EXESUF) $(TESTS)
476

  
477
tests: apiexample$(EXESUF) $(TESTS)
475
	   apiexample$(EXESUF)
478 476

  
479 477
cpuid-test$(EXESUF): i386/cputest.c
480 478
apiexample$(EXESUF): apiexample.o $(LIBNAME)
481 479
dct-test$(EXESUF): dct-test.o fdctref.o $(LIBNAME)
482 480
fft-test$(EXESUF): fft-test.o $(LIBNAME)
483 481
motion-test$(EXESUF): motion-test.o $(LIBNAME)
484

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

  
488
.PHONY: tests
libavutil/Makefile
45 45

  
46 46
include ../common.mak
47 47

  
48
tests: $(TESTS)
49

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

  
53 48
lzo-test$(EXESUF): lzo.c $(LIBNAME)
54 49
	$(CC) $(CFLAGS) $(LDFLAGS) -DTEST -o $@ $^ $(EXTRALIBS) -llzo2
55 50

  
56 51
clean::
57
	rm -f $(TESTS) lzo-test$(EXESUF)
58

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

Also available in: Unified diff