mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-27 01:42:20 +00:00
build: Separate building programs linking against libav* from building av*
This will allow cleaner integration of building example programs.
This commit is contained in:
parent
09cd0a3176
commit
14abeaa43d
38
Makefile
38
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
|
||||
|
@ -1,6 +1,7 @@
|
||||
MANPAGES = $(PROGS-yes:%=doc/%.1)
|
||||
PODPAGES = $(PROGS-yes:%=doc/%.pod)
|
||||
HTMLPAGES = $(PROGS-yes:%=doc/%.html) \
|
||||
ALLMANPAGES = $(AVBASENAMES:%=%.1)
|
||||
MANPAGES = $(AVPROGS-yes:%=doc/%.1)
|
||||
PODPAGES = $(AVPROGS-yes:%=doc/%.pod)
|
||||
HTMLPAGES = $(AVPROGS-yes:%=doc/%.html) \
|
||||
doc/developer.html \
|
||||
doc/faq.html \
|
||||
doc/fate.html \
|
||||
|
Loading…
Reference in New Issue
Block a user