-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_ISOC9X_SOURCE
LDFLAGS+= -g
-ifeq ($(CONFIG_FFMPEG),yes)
-MANPAGES=doc/ffmpeg.1
-PROGS_G+=ffmpeg_g$(EXESUF)
-PROGS+=ffmpeg$(EXESUF)
-endif
+PROGS-$(CONFIG_FFMPEG) += ffmpeg
+PROGS-$(CONFIG_FFPLAY) += ffplay
+PROGS-$(CONFIG_FFSERVER) += ffserver
-ifeq ($(CONFIG_FFSERVER),yes)
-MANPAGES+=doc/ffserver.1
-PROGS+=ffserver$(EXESUF)
-endif
-
-ifeq ($(CONFIG_FFPLAY),yes)
-MANPAGES+=doc/ffplay.1
-PROGS_G+=ffplay_g$(EXESUF)
-PROGS+=ffplay$(EXESUF)
-endif
+PROGS = $(addsuffix $(EXESUF), $(PROGS-yes))
+PROGS_G = $(addsuffix _g$(EXESUF), $(PROGS-yes))
+MANPAGES = $(addprefix doc/, $(addsuffix .1, $(PROGS-yes)))
BASENAMES=ffmpeg ffplay ffserver
ALLPROGS=$(addsuffix $(EXESUF), $(BASENAMES))
endif
ifeq ($(CONFIG_VHOOK),yes)
-VHOOK=videohook
-INSTALLVHOOK=install-vhook
+all: videohook
+install: install-vhook
endif
ifeq ($(BUILD_DOC),yes)
-DOC=documentation
-INSTALLMAN=install-man
+all: documentation
+install: install-man
endif
-OBJS = ffmpeg.o ffserver.o cmdutils.o ffplay.o
-SRCS = $(OBJS:.o=.c) $(ASM_OBJS:.o=.s)
+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)
EXTRALIBS+=-lswscale$(BUILDSUF)
endif
-all: lib $(PROGS) $(VHOOK) $(DOC)
+all: lib $(PROGS)
lib:
$(MAKE) -C libavutil all
documentation:
$(MAKE) -C doc all
-install: install-progs install-libs install-headers $(INSTALLMAN) $(INSTALLVHOOK)
+install: install-progs install-libs install-headers
ifeq ($(BUILD_SHARED),yes)
install-progs: $(PROGS) install-libs
.PHONY: dep depend clean distclean TAGS
.PHONY: codectest libavtest test-server fulltest test mpeg4 mpeg
-ifneq ($(wildcard .depend),)
-include .depend
-endif
+-include .depend