From: Jaroslav Kysela Date: Fri, 17 Oct 2014 12:45:06 +0000 (+0200) Subject: Makefile.ffmpeg: prefer static linking for x264, vpx, vorbis libs to avoid conflicts... X-Git-Tag: v4.1~974 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8e876995f352b28dc7ca0f5ad683d82e35b38370;p=thirdparty%2Ftvheadend.git Makefile.ffmpeg: prefer static linking for x264, vpx, vorbis libs to avoid conflicts with distro --- diff --git a/Makefile.ffmpeg b/Makefile.ffmpeg index 7d6bc7fdb..8fd0c17c6 100644 --- a/Makefile.ffmpeg +++ b/Makefile.ffmpeg @@ -47,6 +47,7 @@ export PATH := $(LIBAVDIR)/build/ffmpeg/bin:$(PATH) ECFLAGS = -I$(LIBAVDIR)/build/ffmpeg/include ELIBS = -L$(LIBAVDIR)/build/ffmpeg/lib -ldl +SLIBS = -lx264 -lvpx -lvorbisenc -lvorbis -logg FFMPEG = ffmpeg-2.4.2 FFMPEG_TB = $(FFMPEG).tar.bz2 @@ -239,6 +240,17 @@ $(LIBAVDIR)/$(FFMPEG)/.tvh_build: \ $(foreach encoder,$(ENCODERS),--enable-encoder=$(encoder)) \ $(foreach muxer,$(MUXERS),--enable-muxer=$(muxer)) \ $(foreach bsf,$(BSFS),--enable-bsf=$(bsf)) + # + # Modify EXTRALIBS to link statically at first shot + # + @{ \ + libs=$$(cat $(LIBAVDIR)/$(FFMPEG)/config.mak | grep -E "^EXTRALIBS=" | cut -d '=' -f 2-) ; \ + cat $(LIBAVDIR)/$(FFMPEG)/config.mak | grep -Ev "^EXTRALIBS=" > \ + $(LIBAVDIR)/$(FFMPEG)/config.mak.new ; \ + echo "EXTRALIBS=-L$(LIBAVDIR)/build/ffmpeg/lib -Wl,-Bstatic $(SLIBS) -Wl,-Bdynamic $${libs}" > \ + $(LIBAVDIR)/$(FFMPEG)/config.mak ; \ + cat $(LIBAVDIR)/$(FFMPEG)/config.mak.new >> $(LIBAVDIR)/$(FFMPEG)/config.mak ; \ + } DESTDIR=$(LIBAVDIR)/build \ make -C $(LIBAVDIR)/$(FFMPEG) install @touch $@