]> git.sesse.net Git - ffmpeg/blobdiff - Makefile
Merge remote-tracking branch 'qatar/master'
[ffmpeg] / Makefile
index 94fb83072341cdf5f5da2765c611f59f7d480b1a..53f91cb45ec83501b6e30179c853a27d26692462 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -77,6 +77,7 @@ define DOSUBDIR
 $(foreach V,$(SUBDIR_VARS),$(eval $(call RESET,$(V))))
 SUBDIR := $(1)/
 include $(SRC_PATH)/$(1)/Makefile
+include $(SRC_PATH)/library.mak
 endef
 
 $(foreach D,$(FFLIBS),$(eval $(call DOSUBDIR,lib$(D))))
@@ -137,6 +138,8 @@ clean::
        $(RM) $(CLEANSUFFIXES)
        $(RM) $(TOOLS)
        $(RM) $(CLEANSUFFIXES:%=tools/%)
+       $(RM) coverage.info
+       $(RM) -r coverage-html
 
 distclean::
        $(RM) $(DISTCLEANSUFFIXES)
@@ -145,6 +148,15 @@ distclean::
 config:
        $(SRC_PATH)/configure $(value FFMPEG_CONFIGURATION)
 
+# Without the sed genthml thinks "libavutil" and "./libavutil" are two different things
+coverage.info: $(wildcard *.gcda *.gcno */*.gcda */*.gcno */*/*.gcda */*/*.gcno)
+       $(Q)lcov -c -d . -b . | sed -e 's#/./#/#g' > $@
+
+coverage-html: coverage.info
+       $(Q)mkdir -p $@
+       $(Q)genhtml -o $@ $<
+       $(Q)touch $@
+
 include $(SRC_PATH)/doc/Makefile
 include $(SRC_PATH)/tests/Makefile