INSTALL_TARGETS-yes += install-progs install-data
INSTALL_TARGETS-$(BUILD_DOC) += install-man
endif
-INSTALL_PROGS_TARGETS-$(BUILD_SHARED) = install-libs
+INSTALL_PROGS_TARGETS-$(CONFIG_SHARED) = install-libs
all: $(FF_DEP_LIBS) $(PROGS) $(ALL_TARGETS-yes)
cp -p $< $@
$(STRIP) $@
-SUBDIR_VARS := OBJS FFLIBS CLEANFILES DIRS TESTS
+SUBDIR_VARS := OBJS FFLIBS CLEANFILES DIRS TESTPROGS EXAMPLES \
+ ALTIVEC-OBJS MMX-OBJS NEON-OBJS X86-OBJS YASM-OBJS-FFT YASM-OBJS
define RESET
$(1) :=
ffserver_g$(EXESUF): FF_LDFLAGS += $(FFSERVERLDFLAGS)
%_g$(EXESUF): %.o cmdutils.o $(FF_DEP_LIBS)
- $(CC) $(FF_LDFLAGS) -o $@ $< cmdutils.o $(FF_EXTRALIBS)
+ $(LD) $(FF_LDFLAGS) -o $@ $< cmdutils.o $(FF_EXTRALIBS)
-output_example$(EXESUF): output_example.o $(FF_DEP_LIBS)
- $(CC) $(CFLAGS) $(FF_LDFLAGS) -o $@ $< $(FF_EXTRALIBS)
+tools/%$(EXESUF): tools/%.o
+ $(LD) $(FF_LDFLAGS) -o $@ $< $(FF_EXTRALIBS)
-tools/%$(EXESUF): tools/%.c
- $(CC) $(CFLAGS) $(FF_LDFLAGS) -o $@ $< $(FF_EXTRALIBS)
+tools/%.o: tools.%.c
+ $(CC) $(CPPFLAGS) $(CFLAGS) $(CC_O) $<
ffplay.o ffplay.d: CFLAGS += $(SDL_CFLAGS)
alltools: $(addsuffix $(EXESUF),$(addprefix tools/, cws2fws pktdumper qt-faststart trasher))
-documentation: $(addprefix doc/, ffmpeg-doc.html faq.html ffserver-doc.html \
+documentation: $(addprefix doc/, developer.html faq.html ffmpeg-doc.html ffserver-doc.html \
ffplay-doc.html general.html $(ALLMANPAGES))
doc/%.html: doc/%.texi
rm -f $(addprefix "$(MANDIR)/man1/",$(ALLMANPAGES))
testclean:
- rm -rf tests/vsynth1 tests/vsynth2 tests/data tests/asynth1.sw tests/*~
+ rm -rf tests/vsynth1 tests/vsynth2 tests/data tests/*~
clean:: testclean
- rm -f $(ALLPROGS) $(ALLPROGS_G) output_example$(EXESUF)
+ rm -f $(ALLPROGS) $(ALLPROGS_G)
+ rm -f $(CLEANSUFFIXES)
rm -f doc/*.html doc/*.pod doc/*.1
- rm -f $(addprefix tests/,$(addsuffix $(EXESUF),audiogen videogen rotozoom seek_test tiny_psnr))
+ rm -f tests/seek_test$(EXESUF) tests/seek_test.o
+ rm -f $(addprefix tests/,$(addsuffix $(HOSTEXESUF),audiogen videogen rotozoom tiny_psnr))
rm -f $(addprefix tools/,$(addsuffix $(EXESUF),cws2fws pktdumper qt-faststart trasher))
distclean::
+ rm -f $(DISTCLEANSUFFIXES)
rm -f version.h config.*
+config:
+ $(SRC_PATH)/configure $(value FFMPEG_CONFIGURATION)
+
# regression tests
check: test checkheaders
-fulltest test: codectest libavtest seektest
+fulltest test: codectest lavftest seektest
-FFMPEG_REFFILE = $(SRC_PATH)/tests/ffmpeg.regression.ref
FFSERVER_REFFILE = $(SRC_PATH)/tests/ffserver.regression.ref
-LIBAV_REFFILE = $(SRC_PATH)/tests/libav.regression.ref
+LAVF_REFFILE = $(SRC_PATH)/tests/lavf.regression.ref
ROTOZOOM_REFFILE = $(SRC_PATH)/tests/rotozoom.regression.ref
SEEK_REFFILE = $(SRC_PATH)/tests/seek.regression.ref
+VSYNTH_REFFILE = $(SRC_PATH)/tests/vsynth.regression.ref
CODEC_TESTS = $(addprefix regtest-, \
mpeg \
asf \
rm \
mpg \
+ mxf \
ts \
swf \
ffm \
voc \
ogg \
pixfmt \
+ pcx \
)
-REGFILES = $(addprefix tests/data/,$(addsuffix .$(1),$(2:regtest-%=%)))
+RESFILES = $(addprefix tests/data/,$(addsuffix .$(1),$(2:regtest-%=%)))
-CODEC_ROTOZOOM = $(call REGFILES,rotozoom.regression,$(CODEC_TESTS))
-CODEC_VSYNTH = $(call REGFILES,vsynth.regression,$(CODEC_TESTS))
+ROTOZOOM_RESFILES = $(call RESFILES,rotozoom.regression,$(CODEC_TESTS))
+VSYNTH_RESFILES = $(call RESFILES,vsynth.regression,$(CODEC_TESTS))
-LAVF_REGFILES = $(call REGFILES,lavf.regression,$(LAVF_TESTS))
+LAVF_RESFILES = $(call RESFILES,lavf.regression,$(LAVF_TESTS))
-LAVF_REG = tests/data/lavf.regression
-ROTOZOOM_REG = tests/data/rotozoom.regression
-VSYNTH_REG = tests/data/vsynth.regression
+LAVF_RESFILE = tests/data/lavf.regression
+ROTOZOOM_RESFILE = tests/data/rotozoom.regression
+VSYNTH_RESFILE = tests/data/vsynth.regression
ifneq ($(CONFIG_ZLIB),yes)
regtest-flashsv codectest: zlib-error
@echo
@exit 1
-codectest: $(VSYNTH_REG) $(ROTOZOOM_REG)
- diff -u -w $(FFMPEG_REFFILE) $(VSYNTH_REG)
- diff -u -w $(ROTOZOOM_REFFILE) $(ROTOZOOM_REG)
+codectest: $(VSYNTH_RESFILE) $(ROTOZOOM_RESFILE)
+ diff -u -w $(VSYNTH_REFFILE) $(VSYNTH_RESFILE)
+ diff -u -w $(ROTOZOOM_REFFILE) $(ROTOZOOM_RESFILE)
-libavtest: $(LAVF_REG)
- diff -u -w $(LIBAV_REFFILE) $(LAVF_REG)
+lavftest: $(LAVF_RESFILE)
+ diff -u -w $(LAVF_REFFILE) $(LAVF_RESFILE)
-$(VSYNTH_REG) $(ROTOZOOM_REG) $(LAVF_REG):
+$(VSYNTH_RESFILE) $(ROTOZOOM_RESFILE) $(LAVF_RESFILE):
cat $^ > $@
-$(LAVF_REG): $(LAVF_REGFILES)
-$(ROTOZOOM_REG): $(CODEC_ROTOZOOM)
-$(VSYNTH_REG): $(CODEC_VSYNTH)
+$(LAVF_RESFILE): $(LAVF_RESFILES)
+$(ROTOZOOM_RESFILE): $(ROTOZOOM_RESFILES)
+$(VSYNTH_RESFILE): $(VSYNTH_RESFILES)
-$(CODEC_VSYNTH) $(CODEC_ROTOZOOM): $(CODEC_TESTS)
+$(VSYNTH_RESFILES) $(ROTOZOOM_RESFILES): $(CODEC_TESTS)
-$(LAVF_REGFILES): $(LAVF_TESTS)
+$(LAVF_RESFILES): $(LAVF_TESTS)
$(CODEC_TESTS) $(LAVF_TESTS): regtest-ref
-regtest-ref: ffmpeg$(EXESUF) tests/vsynth1/00.pgm tests/vsynth2/00.pgm tests/asynth1.sw
+regtest-ref: ffmpeg$(EXESUF) tests/vsynth1/00.pgm tests/vsynth2/00.pgm tests/data/asynth1.sw
-$(CODEC_TESTS) regtest-ref: tests/tiny_psnr$(EXESUF)
- $(SRC_PATH)/tests/regression.sh $@ vsynth tests/vsynth1 a "$(TARGET_EXEC)" "$(TARGET_PATH)"
- $(SRC_PATH)/tests/regression.sh $@ rotozoom tests/vsynth2 a "$(TARGET_EXEC)" "$(TARGET_PATH)"
+$(CODEC_TESTS) regtest-ref: tests/tiny_psnr$(HOSTEXESUF)
+ $(SRC_PATH)/tests/codec-regression.sh $@ vsynth tests/vsynth1 a "$(TARGET_EXEC)" "$(TARGET_PATH)"
+ $(SRC_PATH)/tests/codec-regression.sh $@ rotozoom tests/vsynth2 a "$(TARGET_EXEC)" "$(TARGET_PATH)"
$(LAVF_TESTS):
- $(SRC_PATH)/tests/regression.sh $@ lavf tests/vsynth1 b "$(TARGET_EXEC)" "$(TARGET_PATH)"
+ $(SRC_PATH)/tests/codec-regression.sh $@ lavf tests/vsynth1 b "$(TARGET_EXEC)" "$(TARGET_PATH)"
-seektest: codectest libavtest tests/seek_test$(EXESUF)
- $(SRC_PATH)/tests/seek_test.sh $(SEEK_REFFILE) "$(TARGET_EXEC)" "$(TARGET_PATH)"
+seektest: codectest lavftest tests/seek_test$(EXESUF)
+ $(SRC_PATH)/tests/seek-regression.sh $(SEEK_REFFILE) "$(TARGET_EXEC)" "$(TARGET_PATH)"
-servertest: ffserver$(EXESUF) tests/vsynth1/00.pgm tests/asynth1.sw
+ffservertest: ffserver$(EXESUF) tests/vsynth1/00.pgm tests/data/asynth1.sw
@echo
@echo "Unfortunately ffserver is broken and therefore its regression"
@echo "test fails randomly. Treat the results accordingly."
@echo
- $(SRC_PATH)/tests/server-regression.sh $(FFSERVER_REFFILE) $(SRC_PATH)/tests/test.conf
+ $(SRC_PATH)/tests/ffserver-regression.sh $(FFSERVER_REFFILE) $(SRC_PATH)/tests/ffserver.conf
-tests/vsynth1/00.pgm: tests/videogen$(EXESUF)
+tests/vsynth1/00.pgm: tests/videogen$(HOSTEXESUF)
mkdir -p tests/vsynth1
$(BUILD_ROOT)/$< 'tests/vsynth1/'
-tests/vsynth2/00.pgm: tests/rotozoom$(EXESUF)
+tests/vsynth2/00.pgm: tests/rotozoom$(HOSTEXESUF)
mkdir -p tests/vsynth2
$(BUILD_ROOT)/$< 'tests/vsynth2/' $(SRC_PATH)/tests/lena.pnm
-tests/asynth1.sw: tests/audiogen$(EXESUF)
+tests/data/asynth1.sw: tests/audiogen$(HOSTEXESUF)
+ mkdir -p tests/data
$(BUILD_ROOT)/$< $@
-tests/%$(EXESUF): tests/%.c
+tests/%$(HOSTEXESUF): tests/%.c
$(HOSTCC) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o $@ $< $(HOSTLIBS)
-tests/seek_test$(EXESUF): tests/seek_test.c $(FF_DEP_LIBS)
- $(CC) $(FF_LDFLAGS) $(CFLAGS) -o $@ $< $(FF_EXTRALIBS)
+tests/seek_test$(EXESUF): tests/seek_test.o $(FF_DEP_LIBS)
+ $(LD) $(FF_LDFLAGS) -o $@ $< $(FF_EXTRALIBS)
-.PHONY: lib documentation *test regtest-* swscale-error zlib-error alltools check
+.PHONY: documentation *test regtest-* zlib-error alltools check config