You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

92 lines
2.5KB

  1. #
  2. # Makefile for tests
  3. # (c) 2002 Fabrice Bellard
  4. #
  5. include ../config.mak
  6. VPATH=$(SRC_PATH_BARE)/tests
  7. SRC_DIR=$(SRC_PATH)/tests
  8. CFLAGS=-O2 -Wall -g
  9. REFFILE1=$(SRC_DIR)/ffmpeg.regression.ref
  10. REFFILE2=$(SRC_DIR)/rotozoom.regression.ref
  11. SERVER_REFFILE=$(SRC_DIR)/ffserver.regression.ref
  12. LIBAV_REFFILE=$(SRC_DIR)/libav.regression.ref
  13. all fulltest test: codectest libavtest test-server
  14. test-server: vsynth1/00.pgm asynth1.sw
  15. @$(SRC_DIR)/server-regression.sh $(SERVER_REFFILE) $(SRC_DIR)/test.conf
  16. # fast regression tests for all codecs
  17. codectest mpeg4 mpeg ac3 snow snowll: vsynth1/00.pgm vsynth2/00.pgm asynth1.sw tiny_psnr$(EXESUF)
  18. @$(SRC_DIR)/regression.sh $@ $(REFFILE1) vsynth1
  19. @$(SRC_DIR)/regression.sh $@ $(REFFILE2) vsynth2
  20. # fast regression for libav formats
  21. ifeq ($(CONFIG_GPL),yes)
  22. libavtest: vsynth1/00.pgm asynth1.sw
  23. @$(SRC_DIR)/regression.sh $@ $(LIBAV_REFFILE) vsynth1
  24. else
  25. libavtest:
  26. @echo
  27. @echo "This test requires FFmpeg to be compiled with --enable-gpl."
  28. @echo
  29. endif
  30. # video generation
  31. vsynth1/00.pgm: videogen$(EXESUF)
  32. @mkdir -p vsynth1
  33. ./videogen 'vsynth1/'
  34. vsynth2/00.pgm: rotozoom$(EXESUF)
  35. @mkdir -p vsynth2
  36. ./rotozoom 'vsynth2/' $(SRC_DIR)/lena.pnm
  37. videogen$(EXESUF): videogen.c
  38. $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $<
  39. rotozoom$(EXESUF): rotozoom.c
  40. $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $<
  41. # audio generation
  42. asynth1.sw: audiogen$(EXESUF)
  43. ./audiogen $@
  44. audiogen$(EXESUF): audiogen.c
  45. $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $<
  46. tiny_psnr$(EXESUF): tiny_psnr.c
  47. $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $<
  48. DSPDEPS = $(SRC_PATH)/libavcodec/i386/dsputil_mmx.c \
  49. $(SRC_PATH)/libavcodec/i386/dsputil_mmx_avg.h \
  50. $(SRC_PATH)/libavcodec/i386/dsputil_mmx_rnd.h \
  51. $(SRC_PATH)/libavcodec/i386/fdct_mmx.c \
  52. $(SRC_PATH)/libavcodec/i386/idct_mmx.c \
  53. $(SRC_PATH)/libavcodec/i386/motion_est_mmx.c \
  54. $(SRC_PATH)/libavcodec/i386/simple_idct_mmx.c \
  55. $(SRC_PATH)/libavcodec/dsputil.c \
  56. $(SRC_PATH)/libavcodec/dsputil.h \
  57. $(SRC_PATH)/libavcodec/simple_idct.c
  58. DSPCFLAGS = -O4 -fomit-frame-pointer -DHAVE_AV_CONFIG_H -I.. \
  59. -I$(SRC_PATH)/libavutil/ -I$(SRC_PATH)/libavcodec/i386 \
  60. -I$(SRC_PATH)/libavcodec/ -lm
  61. dsptestpic: dsptest.c $(DSPDEPS)
  62. $(CC) -fPIC -DPIC $(DSPCFLAGS) -o $@ $<
  63. dsptest: dsptest.c $(DSPDEPS)
  64. $(CC) $(DSPCFLAGS) -o $@ $<
  65. distclean clean:
  66. rm -rf vsynth1 vsynth2 data
  67. rm -f asynth1.sw *~ audiogen$(EXESUF) videogen$(EXESUF) rotozoom$(EXESUF) tiny_psnr$(EXESUF)
  68. .PHONY: all fulltest test codectest libavtest test-server
  69. .PHONY: mpeg4 mpeg ac3 snow snowll distclean clean