[FFmpeg-cvslog] build: Separate logic for building examples from that for building avtools

Diego Biurrun git at videolan.org
Fri Sep 29 23:13:07 EEST 2017


ffmpeg | branch: master | Diego Biurrun <diego at biurrun.de> | Tue Feb 14 13:15:25 2017 +0100| [ab566cc96bc0c31b34d944214bc06cec8ae8b640] | committer: Diego Biurrun

build: Separate logic for building examples from that for building avtools

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ab566cc96bc0c31b34d944214bc06cec8ae8b640
---

 Makefile              | 2 +-
 doc/examples/Makefile | 5 +++++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index c96e07916d..2932e6e04c 100644
--- a/Makefile
+++ b/Makefile
@@ -165,7 +165,7 @@ $(1)$(EXESUF): FF_EXTRALIBS += $(EXTRALIBS-$(1))
 -include $$(OBJS-$(1):.o=.d)
 endef
 
-$(foreach P,$(PROGS),$(eval $(call DOPROG,$(P:$(EXESUF)=))))
+$(foreach P,$(AVPROGS-yes),$(eval $(call DOPROG,$(P))))
 
 $(PROGS): %$(EXESUF): %.o $(FF_DEP_LIBS)
 	$(LD) $(LDFLAGS) $(LDEXEFLAGS) $(LD_O) $(OBJS-$*) $(FF_EXTRALIBS)
diff --git a/doc/examples/Makefile b/doc/examples/Makefile
index b24ca28aff..c42c68fd54 100644
--- a/doc/examples/Makefile
+++ b/doc/examples/Makefile
@@ -12,6 +12,9 @@ DOC_EXAMPLES     := $(DOC_EXAMPLES-yes:%=doc/examples/%$(EXESUF))
 ALL_DOC_EXAMPLES := $(DOC_EXAMPLES) $(DOC_EXAMPLES-:%=doc/examples/%$(EXESUF))
 PROGS            += $(DOC_EXAMPLES)
 
+$(foreach P,$(DOC_EXAMPLES),$(eval OBJS-$(P:%$(EXESUF)=%) = $(P:%$(EXESUF)=%).o))
+$(DOC_EXAMPLES): %$(EXESUF): %.o
+
 examples: $(DOC_EXAMPLES)
 
 $(DOC_EXAMPLES:%$(EXESUF)=%.o): | doc/examples
@@ -23,4 +26,6 @@ clean::
 	$(RM) $(ALL_DOC_EXAMPLES)
 	$(RM) $(CLEANSUFFIXES:%=doc/examples/%)
 
+-include $(wildcard $(DOC_EXAMPLES:%$(EXESUF)=%.d))
+
 .PHONY: examples



More information about the ffmpeg-cvslog mailing list