aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2013-11-02 16:44:18 +0100
committerDiego Biurrun <diego@biurrun.de>2013-11-25 11:57:29 -0800
commit14abeaa43d021afdce9119d906891abe89c03b88 (patch)
tree031acaceee7e327cacfa2db8d8bcf4a83c745a92 /Makefile
parent09cd0a3176204e5ce3e8279ec79706c8cfd0fe38 (diff)
downloadffmpeg-14abeaa43d021afdce9119d906891abe89c03b88.tar.gz
build: Separate building programs linking against libav* from building av*
This will allow cleaner integration of building example programs.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile38
1 files changed, 20 insertions, 18 deletions
diff --git a/Makefile b/Makefile
index 184aa37422..3c7987ab1e 100644
--- a/Makefile
+++ b/Makefile
@@ -56,14 +56,20 @@ COMPILE_S = $(call COMPILE,AS)
%.c %.h: TAG = GEN
-PROGS-$(CONFIG_AVCONV) += avconv
-PROGS-$(CONFIG_AVPLAY) += avplay
-PROGS-$(CONFIG_AVPROBE) += avprobe
-PROGS-$(CONFIG_AVSERVER) += avserver
+AVPROGS-$(CONFIG_AVCONV) += avconv
+AVPROGS-$(CONFIG_AVPLAY) += avplay
+AVPROGS-$(CONFIG_AVPROBE) += avprobe
+AVPROGS-$(CONFIG_AVSERVER) += avserver
-PROGS := $(PROGS-yes:%=%$(EXESUF))
+AVPROGS := $(AVPROGS-yes:%=%$(EXESUF))
+PROGS += $(AVPROGS)
-OBJS-avconv = avconv_opt.o avconv_filter.o
+AVBASENAMES = avconv avplay avprobe avserver
+ALLAVPROGS = $(AVBASENAMES:%=%$(EXESUF))
+
+$(foreach prog,$(ALLAVPROGS),$(eval OBJS-$(prog) += cmdutils.o))
+
+OBJS-avconv += avconv_opt.o avconv_filter.o
OBJS-avconv-$(HAVE_VDPAU_X11) += avconv_vdpau.o
TESTTOOLS = audiogen videogen rotozoom tiny_psnr base64
@@ -71,10 +77,6 @@ HOSTPROGS := $(TESTTOOLS:%=tests/%) doc/print_options
TOOLS = qt-faststart trasher
TOOLS-$(CONFIG_ZLIB) += cws2fws
-BASENAMES = avconv avplay avprobe avserver
-ALLPROGS = $(BASENAMES:%=%$(EXESUF))
-ALLMANPAGES = $(BASENAMES:%=%.1)
-
FFLIBS-$(CONFIG_AVDEVICE) += avdevice
FFLIBS-$(CONFIG_AVFILTER) += avfilter
FFLIBS-$(CONFIG_AVFORMAT) += avformat
@@ -93,7 +95,7 @@ include $(SRC_PATH)/common.mak
FF_EXTRALIBS := $(FFEXTRALIBS)
FF_DEP_LIBS := $(DEP_LIBS)
-all: $(PROGS)
+all: $(AVPROGS)
$(TOOLS): %$(EXESUF): %.o $(EXEOBJS)
$(LD) $(LDFLAGS) $(LD_O) $^ $(ELIBS)
@@ -129,7 +131,7 @@ endef
$(foreach D,$(FFLIBS),$(eval $(call DOSUBDIR,lib$(D))))
define DOPROG
-OBJS-$(1) += $(1).o cmdutils.o $(EXEOBJS) $(OBJS-$(1)-yes)
+OBJS-$(1) += $(1).o $(EXEOBJS) $(OBJS-$(1)-yes)
$(1)$(EXESUF): $$(OBJS-$(1))
$$(OBJS-$(1)): CFLAGS += $(CFLAGS-$(1))
$(1)$(EXESUF): LDFLAGS += $(LDFLAGS-$(1))
@@ -137,7 +139,7 @@ $(1)$(EXESUF): FF_EXTRALIBS += $(LIBS-$(1))
-include $$(OBJS-$(1):.o=.d)
endef
-$(foreach P,$(PROGS-yes),$(eval $(call DOPROG,$(P))))
+$(foreach P,$(PROGS),$(eval $(call DOPROG,$(P))))
$(PROGS): %$(EXESUF): %.o $(FF_DEP_LIBS)
$(LD) $(LDFLAGS) $(LD_O) $(OBJS-$*) $(FF_EXTRALIBS)
@@ -159,7 +161,7 @@ version.h .version:
# force version.sh to run whenever version might have changed
-include .version
-ifdef PROGS
+ifdef AVPROGS
install: install-progs install-data
endif
@@ -170,9 +172,9 @@ install-libs: install-libs-yes
install-progs-yes:
install-progs-$(CONFIG_SHARED): install-libs
-install-progs: install-progs-yes $(PROGS)
+install-progs: install-progs-yes $(AVPROGS)
$(Q)mkdir -p "$(BINDIR)"
- $(INSTALL) -c -m 755 $(PROGS) "$(BINDIR)"
+ $(INSTALL) -c -m 755 $(AVPROGS) "$(BINDIR)"
install-data: $(DATA_FILES)
$(Q)mkdir -p "$(DATADIR)"
@@ -181,13 +183,13 @@ install-data: $(DATA_FILES)
uninstall: uninstall-libs uninstall-headers uninstall-progs uninstall-data
uninstall-progs:
- $(RM) $(addprefix "$(BINDIR)/", $(ALLPROGS))
+ $(RM) $(addprefix "$(BINDIR)/", $(ALLAVPROGS))
uninstall-data:
$(RM) -r "$(DATADIR)"
clean::
- $(RM) $(ALLPROGS)
+ $(RM) $(ALLAVPROGS)
$(RM) $(CLEANSUFFIXES)
$(RM) $(CLEANSUFFIXES:%=tools/%)
$(RM) -rf coverage.info lcov