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.

117 lines
3.4KB

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