[2/2] avformat/output-example: Declare link dependency on libswscale in the Makefile

Message ID 1475671137-21270-3-git-send-email-diego@biurrun.de
State Superseded
Headers show

Commit Message

Diego Biurrun Oct. 5, 2016, 12:38 p.m.
(cherry picked from commit 47b6cfc2a0333fb24f074d27830bf35ae5007050)
Signed-off-by: Diego Biurrun <diego@biurrun.de>
---
 common.mak           | 3 ++-
 libavformat/Makefile | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

Patch

diff --git a/common.mak b/common.mak
index 5d80986..a63eaf8 100644
--- a/common.mak
+++ b/common.mak
@@ -25,7 +25,8 @@  TOOLOBJS  := $(TOOLS:%=tools/%.o)
 TOOLS     := $(TOOLS:%=tools/%$(EXESUF))
 HEADERS   += $(HEADERS-yes)
 
-DEP_LIBS := $(foreach NAME,$(FFLIBS),lib$(NAME)/$($(CONFIG_SHARED:yes=S)LIBNAME))
+PATH_LIBNAME = $(foreach NAME,$(1),lib$(NAME)/$($(CONFIG_SHARED:yes=S)LIBNAME))
+DEP_LIBS := $(foreach lib,$(FFLIBS),$(call PATH_LIBNAME,$(lib)))
 
 ALLHEADERS := $(subst $(SRC_DIR)/,$(SUBDIR),$(wildcard $(SRC_DIR)/*.h $(SRC_DIR)/$(ARCH)/*.h))
 SKIPHEADERS += $(ARCH_HEADERS:%=$(ARCH)/%) $(SKIPHEADERS-)
diff --git a/libavformat/Makefile b/libavformat/Makefile
index 9b6a23b..fae1c22 100644
--- a/libavformat/Makefile
+++ b/libavformat/Makefile
@@ -386,3 +386,4 @@  TOOLS     = aviocat                                                     \
             probetest                                                   \
 
 $(SUBDIR)output-example$(EXESUF): ELIBS = $(patsubst %,$(LD_LIB),swscale avutil)
+$(SUBDIR)output-example$(EXESUF): $(call PATH_LIBNAME,swscale)