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.

102 lines
2.7KB

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