From 2cf30841b5871a720648cfe53fd89607c496702f Mon Sep 17 00:00:00 2001
From: Diego Biurrun <diego@biurrun.de>
Date: Sat, 15 Apr 2006 15:05:53 +0000
Subject: [PATCH] Have EXTRALIBS appear after other link options, fixes shared
 build on Cygwin. based on patch by Marcus Engene, ffmpeg AATT engene DDOOTT
 se

Originally committed as revision 5295 to svn://svn.ffmpeg.org/ffmpeg/trunk
---
 libavcodec/Makefile  | 2 +-
 libavformat/Makefile | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index 42796e493e5..d8e246254d3 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -293,7 +293,7 @@ OBJS+= liba52/bit_allocate.o liba52/bitstream.o liba52/downmix.o \
 endif
 endif
 
-EXTRALIBS += -L../libavutil -lavutil$(BUILDSUF)
+EXTRALIBS := -L../libavutil -lavutil$(BUILDSUF) $(EXTRALIBS)
 
 # currently using libdts for dts decoding
 ifeq ($(CONFIG_DTS),yes)
diff --git a/libavformat/Makefile b/libavformat/Makefile
index 42bc01f9ece..e5e7efaec67 100644
--- a/libavformat/Makefile
+++ b/libavformat/Makefile
@@ -66,7 +66,7 @@ ifeq ($(CONFIG_AUDIO_OSS),yes)
 OBJS+= audio.o
 endif
 
-EXTRALIBS += -L../libavutil -lavutil$(BUILDSUF) -lavcodec$(BUILDSUF) -L../libavcodec
+EXTRALIBS := -L../libavutil -lavutil$(BUILDSUF) -lavcodec$(BUILDSUF) -L../libavcodec $(EXTRALIBS)
 
 ifeq ($(CONFIG_AUDIO_BEOS),yes)
 CPPOBJS+= beosaudio.o
-- 
GitLab