From: Jaroslav Kysela Date: Fri, 25 Mar 2016 18:33:41 +0000 (+0100) Subject: Makefile: static ffmpeg - fix for parallel build (e.g.: make -j4) X-Git-Tag: v4.2.1~816 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=11df42949746faa34360fd615bc2dcbdba842370;p=thirdparty%2Ftvheadend.git Makefile: static ffmpeg - fix for parallel build (e.g.: make -j4) --- diff --git a/Makefile b/Makefile index 1c53ed9f8..cc0726897 100644 --- a/Makefile +++ b/Makefile @@ -76,9 +76,15 @@ FFMPEG_LIBS := \ libavcodec \ libavutil -# FFMEG_STATIC +# FFMPEG_STATIC ifeq ($(CONFIG_FFMPEG_STATIC),yes) +ifeq (,$(wildcard ${BUILDDIR}/libffmpeg_stamp)) +# build static FFMPEG as first for pkgconfig +ffmpeg_all: ${BUILDDIR}/libffmpeg_stamp + $(MAKE) all +endif + FFMPEG_PREFIX := $(BUILDDIR)/ffmpeg/build/ffmpeg FFMPEG_LIBDIR := $(FFMPEG_PREFIX)/lib FFMPEG_CONFIG := \ @@ -120,11 +126,11 @@ endif LDFLAGS += $(foreach lib,$(FFMPEG_LIBS),$(FFMPEG_LIBDIR)/$(lib).a) LDFLAGS += $(foreach lib,$(FFMPEG_DEPS),$(FFMPEG_LIBDIR)/$(lib).a) -else +else # !FFMPEG_STATIC FFMPEG_CONFIG := $(PKG_CONFIG) -endif # FFMEG_STATIC +endif # FFMPEG_STATIC CFLAGS += `$(FFMPEG_CONFIG) --cflags $(FFMPEG_LIBS)` LDFLAGS += `$(FFMPEG_CONFIG) --libs $(FFMPEG_LIBS)`