[FFmpeg-devel] [PATCH 1/2] Makefile: make FFLIBS available between libraries.

Nicolas George george at nsup.org
Tue Feb 4 23:49:00 CET 2014


For the variables to be useful, the subdirectories must be
sourced in dependency order.

Signed-off-by: Nicolas George <george at nsup.org>
---
 Makefile    | 5 ++++-
 library.mak | 2 ++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 7317f25..01a49e1 100644
--- a/Makefile
+++ b/Makefile
@@ -89,7 +89,10 @@ include $(SRC_PATH)/$(1)/Makefile
 include $(SRC_PATH)/library.mak
 endef
 
-$(foreach D,$(FFLIBS),$(eval $(call DOSUBDIR,lib$(D))))
+FFLIBS_REV :=
+$(foreach D,$(FFLIBS),$(eval FFLIBS_REV := $(D) $(FFLIBS_REV)))
+
+$(foreach D,$(FFLIBS_REV),$(eval $(call DOSUBDIR,lib$(D))))
 
 include $(SRC_PATH)/doc/Makefile
 
diff --git a/library.mak b/library.mak
index 45096a7..ba738de 100644
--- a/library.mak
+++ b/library.mak
@@ -5,6 +5,8 @@ LIBMAJOR   := $(lib$(NAME)_VERSION_MAJOR)
 LIBMINOR   := $(lib$(NAME)_VERSION_MINOR)
 INCINSTDIR := $(INCDIR)/lib$(NAME)
 
+FFLIBS_$(NAME) := $(FFLIBS)
+
 INSTHEADERS := $(INSTHEADERS) $(HEADERS:%=$(SUBDIR)%)
 
 all-$(CONFIG_STATIC): $(SUBDIR)$(LIBNAME)
-- 
1.8.5.3



More information about the ffmpeg-devel mailing list