CFLAGS=$(OPTFLAGS) -I$(BUILD_ROOT) -I$(SRC_PATH) -I$(SRC_PATH)/libavutil \
-I$(SRC_PATH)/libavcodec -I$(SRC_PATH)/libavformat -I$(SRC_PATH)/libswscale \
+ -I$(SRC_PATH)/libavdevice \
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_ISOC9X_SOURCE -DHAVE_AV_CONFIG_H
LDFLAGS+= -g
ALLMANPAGES = $(addsuffix .1, $(BASENAMES))
ifeq ($(BUILD_SHARED),yes)
-DEP_LIBS=libavcodec/$(SLIBPREF)avcodec$(SLIBSUF) libavformat/$(SLIBPREF)avformat$(SLIBSUF)
+DEP_LIBS=libavcodec/$(SLIBPREF)avcodec$(SLIBSUF) libavformat/$(SLIBPREF)avformat$(SLIBSUF) libavdevice/$(SLIBPREF)avdevice$(SLIBSUF)
else
-DEP_LIBS=libavcodec/$(LIBPREF)avcodec$(LIBSUF) libavformat/$(LIBPREF)avformat$(LIBSUF)
+DEP_LIBS=libavcodec/$(LIBPREF)avcodec$(LIBSUF) libavformat/$(LIBPREF)avformat$(LIBSUF) libavdevice/$(LIBPREF)avdevice$(LIBSUF)
endif
ALL_TARGETS-$(CONFIG_VHOOK) += videohook
ALL_TARGETS-$(BUILD_DOC) += documentation
INSTALL_TARGETS-$(CONFIG_VHOOK) += install-vhook
+ifneq ($(PROGS),)
+INSTALL_TARGETS-yes += install-progs
INSTALL_TARGETS-$(BUILD_DOC) += install-man
+endif
VHOOKCFLAGS += $(filter-out -mdynamic-no-pic,$(CFLAGS))
VHOOKCFLAGS += $(VHOOKCFLAGS-yes)
SRCS = $(addsuffix .c, $(PROGS-yes)) cmdutils.c
-LDFLAGS := -L$(BUILD_ROOT)/libavformat -L$(BUILD_ROOT)/libavcodec -L$(BUILD_ROOT)/libavutil $(LDFLAGS)
-EXTRALIBS := -lavformat$(BUILDSUF) -lavcodec$(BUILDSUF) -lavutil$(BUILDSUF) $(EXTRALIBS)
+LDFLAGS := -L$(BUILD_ROOT)/libavdevice -L$(BUILD_ROOT)/libavformat -L$(BUILD_ROOT)/libavcodec -L$(BUILD_ROOT)/libavutil $(LDFLAGS)
+EXTRALIBS := -lavdevice$(BUILDSUF) -lavformat$(BUILDSUF) -lavcodec$(BUILDSUF) -lavutil$(BUILDSUF) $(EXTRALIBS)
ifeq ($(CONFIG_SWSCALER),yes)
LDFLAGS+=-L$(BUILD_ROOT)/libswscale
$(MAKE) -C libavutil all
$(MAKE) -C libavcodec all
$(MAKE) -C libavformat all
+ $(MAKE) -C libavdevice all
ifeq ($(CONFIG_PP),yes)
$(MAKE) -C libpostproc all
endif
ffmpeg_g$(EXESUF): ffmpeg.o cmdutils.o .libs
$(CC) $(LDFLAGS) -o $@ ffmpeg.o cmdutils.o $(EXTRALIBS)
-ffserver$(EXESUF): ffserver.o .libs
- $(CC) $(LDFLAGS) $(FFSERVERLDFLAGS) -o $@ ffserver.o $(EXTRALIBS)
+ffserver$(EXESUF): ffserver.o cmdutils.o .libs
+ $(CC) $(LDFLAGS) $(FFSERVERLDFLAGS) -o $@ ffserver.o cmdutils.o $(EXTRALIBS)
ffplay_g$(EXESUF): ffplay.o cmdutils.o .libs
$(CC) $(LDFLAGS) -o $@ ffplay.o cmdutils.o $(EXTRALIBS) $(SDL_LIBS)
output_example$(EXESUF): output_example.o .libs
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(EXTRALIBS)
-qt-faststart$(EXESUF): qt-faststart.c
+tools/qt-faststart$(EXESUF): tools/qt-faststart.c
$(CC) $(CFLAGS) $< -o $@
-cws2fws$(EXESUF): cws2fws.c
+tools/cws2fws$(EXESUF): tools/cws2fws.c
$(CC) $(CFLAGS) $< -o $@ -lz
ffplay.o: CFLAGS += $(SDL_CFLAGS)
$(CC) $(CFLAGS) -c -o $@ $<
documentation: $(addprefix doc/, ffmpeg-doc.html faq.html ffserver-doc.html \
- ffplay-doc.html hooks.html $(ALLMANPAGES))
+ ffplay-doc.html general.html hooks.html \
+ $(ALLMANPAGES))
doc/%.html: doc/%.texi
texi2html -monolithic -number $<
doc/%.1: doc/%.pod
pod2man --section=1 --center=" " --release=" " $< > $@
-install: install-progs install-libs install-headers $(INSTALL_TARGETS-yes)
+install: install-libs install-headers $(INSTALL_TARGETS-yes)
ifeq ($(BUILD_SHARED),yes)
-install-progs: $(PROGS) install-libs
-else
-install-progs: $(PROGS)
+install-progs: install-libs
endif
- install -d "$(bindir)"
- install -c -m 755 $(PROGS) "$(bindir)"
+install-progs: $(PROGS)
+ install -d "$(BINDIR)"
+ install -c -m 755 $(PROGS) "$(BINDIR)"
# Create the Windows installer.
wininstaller: all install
makensis ffinstall.nsi
install-man:
- install -d "$(mandir)/man1"
- install -m 644 $(MANPAGES) "$(mandir)/man1"
+ install -d "$(MANDIR)/man1"
+ install -m 644 $(MANPAGES) "$(MANDIR)/man1"
install-vhook: videohook
- install -d "$(shlibdir)/vhook"
- install -m 755 $(HOOKS) "$(shlibdir)/vhook"
+ install -d "$(SHLIBDIR)/vhook"
+ install -m 755 $(HOOKS) "$(SHLIBDIR)/vhook"
install-libs:
$(MAKE) -C libavutil install-libs
$(MAKE) -C libavcodec install-libs
$(MAKE) -C libavformat install-libs
+ $(MAKE) -C libavdevice install-libs
ifeq ($(CONFIG_PP),yes)
$(MAKE) -C libpostproc install-libs
endif
$(MAKE) -C libavutil install-headers
$(MAKE) -C libavcodec install-headers
$(MAKE) -C libavformat install-headers
+ $(MAKE) -C libavdevice install-headers
ifeq ($(CONFIG_PP),yes)
$(MAKE) -C libpostproc install-headers
endif
uninstall: uninstall-progs uninstall-libs uninstall-headers uninstall-man uninstall-vhook
uninstall-progs:
- rm -f $(addprefix $(bindir)/, $(ALLPROGS))
+ rm -f $(addprefix "$(BINDIR)/", $(ALLPROGS))
uninstall-man:
- rm -f $(addprefix $(mandir)/man1/,$(ALLMANPAGES))
+ rm -f $(addprefix "$(MANDIR)/man1/",$(ALLMANPAGES))
uninstall-vhook:
- rm -f $(addprefix $(shlibdir)/vhook/,$(ALLHOOKS))
- -rmdir "$(shlibdir)/vhook/"
+ rm -f $(addprefix "$(SHLIBDIR)/",$(ALLHOOKS_SRCS:.c=$(SLIBSUF)))
+ -rmdir "$(SHLIBDIR)/vhook/"
uninstall-libs:
$(MAKE) -C libavutil uninstall-libs
$(MAKE) -C libavcodec uninstall-libs
$(MAKE) -C libavformat uninstall-libs
+ $(MAKE) -C libavdevice uninstall-libs
$(MAKE) -C libpostproc uninstall-libs
+ $(MAKE) -C libswscale uninstall-libs
uninstall-headers:
$(MAKE) -C libavutil uninstall-headers
$(MAKE) -C libavcodec uninstall-headers
$(MAKE) -C libavformat uninstall-headers
+ $(MAKE) -C libavdevice uninstall-headers
$(MAKE) -C libpostproc uninstall-headers
- -rmdir "$(incdir)"
+ $(MAKE) -C libswscale uninstall-headers
+ -rmdir "$(INCDIR)"
depend dep: .depend .vhookdep
$(MAKE) -C libavutil depend
$(MAKE) -C libavcodec depend
$(MAKE) -C libavformat depend
+ $(MAKE) -C libavdevice depend
ifeq ($(CONFIG_PP),yes)
$(MAKE) -C libpostproc depend
endif
.depend: $(SRCS) version.h
$(CC) -MM $(CFLAGS) $(SDL_CFLAGS) $(filter-out %.h,$^) 1>.depend
-# gcc stupidly only outputs the basename of targets
+# gcc stupidly only outputs the basename of targets with -MM
.vhookdep: $(ALLHOOKS_SRCS)
$(CC) $(VHOOKCFLAGS) -MM $^ | sed 's,^\([a-z]\),vhook/\1,' > $@
$(MAKE) -C libavutil clean
$(MAKE) -C libavcodec clean
$(MAKE) -C libavformat clean
+ $(MAKE) -C libavdevice clean
$(MAKE) -C libpostproc clean
$(MAKE) -C libswscale clean
rm -f *.o *~ .libs gmon.out TAGS $(ALLPROGS) $(ALLPROGS_G) \
$(MAKE) -C libavutil distclean
$(MAKE) -C libavcodec distclean
$(MAKE) -C libavformat distclean
+ $(MAKE) -C libavdevice distclean
$(MAKE) -C libpostproc distclean
$(MAKE) -C libswscale distclean
- rm -f .depend version.h config.* *.pc
+ rm -f .depend .vhookdep version.h config.* *.pc
TAGS:
etags *.[ch] libavformat/*.[ch] libavcodec/*.[ch]
$(SRC_PATH)/tests/regression.sh $@ $(FFMPEG_REFFILE) tests/vsynth1
$(SRC_PATH)/tests/regression.sh $@ $(ROTOZOOM_REFFILE) tests/vsynth2
-ifeq ($(CONFIG_GPL),yes)
libavtest: ffmpeg$(EXESUF) tests/vsynth1/00.pgm tests/asynth1.sw
$(SRC_PATH)/tests/regression.sh $@ $(LIBAV_REFFILE) tests/vsynth1
+
seektest: tests/seek_test$(EXESUF)
$(SRC_PATH)/tests/seek_test.sh $(SEEK_REFFILE)
-else
-libavtest seektest:
- @echo
- @echo "This test requires FFmpeg to be compiled with --enable-gpl."
- @echo
- @exit 1
-endif
ifeq ($(CONFIG_SWSCALER),yes)
test-server codectest mpeg4 mpeg ac3 snow snowll libavtest: swscale_error
%$(EXESUF): %.c
$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $<
-tests/seek_test$(EXESUF): tests/seek_test.c
- $(CC) $(LDFLAGS) $(CFLAGS) -DHAVE_AV_CONFIG_H -o $@ $< $(EXTRALIBS)
+tests/seek_test$(EXESUF): tests/seek_test.c .libs
+ $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $< $(EXTRALIBS)
.PHONY: all lib videohook documentation install* wininstaller uninstall*