diff options
-rw-r--r-- | Makefile | 54 | ||||
-rw-r--r-- | avtools/Makefile | 52 | ||||
-rw-r--r-- | avtools/avconv.c (renamed from avconv.c) | 0 | ||||
-rw-r--r-- | avtools/avconv.h (renamed from avconv.h) | 0 | ||||
-rw-r--r-- | avtools/avconv_dxva2.c (renamed from avconv_dxva2.c) | 0 | ||||
-rw-r--r-- | avtools/avconv_filter.c (renamed from avconv_filter.c) | 0 | ||||
-rw-r--r-- | avtools/avconv_opt.c (renamed from avconv_opt.c) | 0 | ||||
-rw-r--r-- | avtools/avconv_qsv.c (renamed from avconv_qsv.c) | 0 | ||||
-rw-r--r-- | avtools/avconv_vaapi.c (renamed from avconv_vaapi.c) | 0 | ||||
-rw-r--r-- | avtools/avconv_vda.c (renamed from avconv_vda.c) | 0 | ||||
-rw-r--r-- | avtools/avconv_vdpau.c (renamed from avconv_vdpau.c) | 0 | ||||
-rw-r--r-- | avtools/avplay.c (renamed from avplay.c) | 0 | ||||
-rw-r--r-- | avtools/avprobe.c (renamed from avprobe.c) | 0 | ||||
-rw-r--r-- | avtools/cmdutils.c (renamed from cmdutils.c) | 0 | ||||
-rw-r--r-- | avtools/cmdutils.h (renamed from cmdutils.h) | 0 |
15 files changed, 56 insertions, 50 deletions
@@ -69,25 +69,6 @@ COMPILE_HOSTC = $(call COMPILE,HOSTCC) %.c %.h %.pc %.ver %.version: TAG = GEN -AVPROGS-$(CONFIG_AVCONV) += avconv -AVPROGS-$(CONFIG_AVPLAY) += avplay -AVPROGS-$(CONFIG_AVPROBE) += avprobe - -AVPROGS := $(AVPROGS-yes:%=%$(EXESUF)) -PROGS += $(AVPROGS) - -AVBASENAMES = avconv avplay avprobe -ALLAVPROGS = $(AVBASENAMES:%=%$(EXESUF)) - -$(foreach prog,$(AVBASENAMES),$(eval OBJS-$(prog) += cmdutils.o)) - -OBJS-avconv += avconv_opt.o avconv_filter.o -OBJS-avconv-$(CONFIG_LIBMFX) += avconv_qsv.o -OBJS-avconv-$(CONFIG_VAAPI) += avconv_vaapi.o -OBJS-avconv-$(CONFIG_VDA) += avconv_vda.o -OBJS-avconv-$(HAVE_DXVA2_LIB) += avconv_dxva2.o -OBJS-avconv-$(HAVE_VDPAU_X11) += avconv_vdpau.o - TESTTOOLS = audiogen videogen rotozoom tiny_psnr base64 HOSTPROGS := $(TESTTOOLS:%=tests/%) doc/print_options @@ -115,8 +96,6 @@ FF_EXTRALIBS := $(FFEXTRALIBS) FF_DEP_LIBS := $(DEP_LIBS) FF_STATIC_DEP_LIBS := $(STATIC_DEP_LIBS) -all: $(AVPROGS) - $(TOOLS): %$(EXESUF): %.o $(LD) $(LDFLAGS) $(LDEXEFLAGS) $(LD_O) $^ $(EXTRALIBS) $(ELIBS) @@ -153,21 +132,11 @@ endef $(foreach D,$(FFLIBS),$(eval $(call DOSUBDIR,lib$(D)))) +include $(SRC_PATH)/avtools/Makefile include $(SRC_PATH)/doc/Makefile include $(SRC_PATH)/doc/examples/Makefile -define DOPROG -OBJS-$(1) += $(1).o $(OBJS-$(1)-yes) -$(1)$(EXESUF): $$(OBJS-$(1)) -$$(OBJS-$(1)): CFLAGS += $(CFLAGS-$(1)) -$(1)$(EXESUF): LDFLAGS += $(LDFLAGS-$(1)) -$(1)$(EXESUF): FF_EXTRALIBS += $(EXTRALIBS-$(1)) --include $$(OBJS-$(1):.o=.d) -endef - -$(foreach P,$(AVPROGS-yes),$(eval $(call DOPROG,$(P)))) - -$(PROGS): %$(EXESUF): %.o $(FF_DEP_LIBS) +$(PROGS): %$(EXESUF): $(FF_DEP_LIBS) $(LD) $(LDFLAGS) $(LDEXEFLAGS) $(LD_O) $(OBJS-$*) $(FF_EXTRALIBS) VERSION_SH = $(SRC_PATH)/avbuild/version.sh @@ -176,7 +145,7 @@ GIT_LOG = $(SRC_PATH)/.git/logs/HEAD .version: $(wildcard $(GIT_LOG)) $(VERSION_SH) avbuild/config.mak .version: M=@ -cmdutils.o libavutil/utils.o: avversion.h +libavutil/utils.o: avversion.h avversion.h .version: $(M)$(VERSION_SH) $(SRC_PATH) avversion.h $(EXTRA_VERSION) $(Q)touch .version @@ -184,35 +153,20 @@ avversion.h .version: # force version.sh to run whenever version might have changed -include .version -ifdef AVPROGS -install: install-progs install-data -endif - install: install-libs install-headers install-libs: install-libs-yes -install-progs-yes: -install-progs-$(CONFIG_SHARED): install-libs - -install-progs: install-progs-yes $(AVPROGS) - $(Q)mkdir -p "$(BINDIR)" - $(INSTALL) -c -m 755 $(AVPROGS) "$(BINDIR)" - install-data: $(DATA_FILES) $(Q)mkdir -p "$(DATADIR)" $(INSTALL) -m 644 $(DATA_FILES) "$(DATADIR)" -uninstall: uninstall-libs uninstall-headers uninstall-progs uninstall-data - -uninstall-progs: - $(RM) $(addprefix "$(BINDIR)/", $(ALLAVPROGS)) +uninstall: uninstall-libs uninstall-headers uninstall-data uninstall-data: $(RM) -r "$(DATADIR)" clean:: - $(RM) $(ALLAVPROGS) $(RM) $(CLEANSUFFIXES) $(RM) -rf coverage.info lcov diff --git a/avtools/Makefile b/avtools/Makefile new file mode 100644 index 0000000..d6d609f --- /dev/null +++ b/avtools/Makefile @@ -0,0 +1,52 @@ +AVPROGS-$(CONFIG_AVCONV) += avconv +AVPROGS-$(CONFIG_AVPLAY) += avplay +AVPROGS-$(CONFIG_AVPROBE) += avprobe + +AVPROGS := $(AVPROGS-yes:%=%$(EXESUF)) +PROGS += $(AVPROGS) + +AVBASENAMES = avconv avplay avprobe +ALLAVPROGS = $(AVBASENAMES:%=%$(EXESUF)) + +OBJS-avconv += avtools/avconv_opt.o avtools/avconv_filter.o +OBJS-avconv-$(CONFIG_LIBMFX) += avtools/avconv_qsv.o +OBJS-avconv-$(CONFIG_VAAPI) += avtools/avconv_vaapi.o +OBJS-avconv-$(CONFIG_VDA) += avtools/avconv_vda.o +OBJS-avconv-$(HAVE_DXVA2_LIB) += avtools/avconv_dxva2.o +OBJS-avconv-$(HAVE_VDPAU_X11) += avtools/avconv_vdpau.o + +define DOAVTOOL +OBJS-$(1) += avtools/cmdutils.o avtools/$(1).o $(OBJS-$(1)-yes) +$(1)$(EXESUF): $$(OBJS-$(1)) +$$(OBJS-$(1)): | avtools +$$(OBJS-$(1)): CFLAGS += $(CFLAGS-$(1)) +$(1)$(EXESUF): LDFLAGS += $(LDFLAGS-$(1)) +$(1)$(EXESUF): FF_EXTRALIBS += $(EXTRALIBS-$(1)) +-include $$(OBJS-$(1):.o=.d) +endef + +$(foreach P,$(AVPROGS-yes),$(eval $(call DOAVTOOL,$(P)))) + +all: $(AVPROGS) + +avtools/cmdutils.o: avversion.h | avtools +OBJDIRS += avtools + +ifdef AVPROGS +install: install-progs install-data +endif + +install-progs-yes: +install-progs-$(CONFIG_SHARED): install-libs + +install-progs: install-progs-yes $(AVPROGS) + $(Q)mkdir -p "$(BINDIR)" + $(INSTALL) -c -m 755 $(AVPROGS) "$(BINDIR)" + +uninstall: uninstall-progs + +uninstall-progs: + $(RM) $(addprefix "$(BINDIR)/", $(ALLAVPROGS)) + +clean:: + $(RM) $(ALLAVPROGS) $(CLEANSUFFIXES:%=avtools/%) diff --git a/avconv.c b/avtools/avconv.c index 5c36761..5c36761 100644 --- a/avconv.c +++ b/avtools/avconv.c diff --git a/avconv.h b/avtools/avconv.h index 3c3f0ef..3c3f0ef 100644 --- a/avconv.h +++ b/avtools/avconv.h diff --git a/avconv_dxva2.c b/avtools/avconv_dxva2.c index 7578c3f..7578c3f 100644 --- a/avconv_dxva2.c +++ b/avtools/avconv_dxva2.c diff --git a/avconv_filter.c b/avtools/avconv_filter.c index e53dcd2..e53dcd2 100644 --- a/avconv_filter.c +++ b/avtools/avconv_filter.c diff --git a/avconv_opt.c b/avtools/avconv_opt.c index e078a0b..e078a0b 100644 --- a/avconv_opt.c +++ b/avtools/avconv_opt.c diff --git a/avconv_qsv.c b/avtools/avconv_qsv.c index 723c6e0..723c6e0 100644 --- a/avconv_qsv.c +++ b/avtools/avconv_qsv.c diff --git a/avconv_vaapi.c b/avtools/avconv_vaapi.c index 584b8b4..584b8b4 100644 --- a/avconv_vaapi.c +++ b/avtools/avconv_vaapi.c diff --git a/avconv_vda.c b/avtools/avconv_vda.c index d86076e..d86076e 100644 --- a/avconv_vda.c +++ b/avtools/avconv_vda.c diff --git a/avconv_vdpau.c b/avtools/avconv_vdpau.c index 5fedcee..5fedcee 100644 --- a/avconv_vdpau.c +++ b/avtools/avconv_vdpau.c diff --git a/avplay.c b/avtools/avplay.c index 18879e1..18879e1 100644 --- a/avplay.c +++ b/avtools/avplay.c diff --git a/avprobe.c b/avtools/avprobe.c index 613e090..613e090 100644 --- a/avprobe.c +++ b/avtools/avprobe.c diff --git a/cmdutils.c b/avtools/cmdutils.c index b0445eb..b0445eb 100644 --- a/cmdutils.c +++ b/avtools/cmdutils.c diff --git a/cmdutils.h b/avtools/cmdutils.h index cc78ac5..cc78ac5 100644 --- a/cmdutils.h +++ b/avtools/cmdutils.h |