Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Makefile: static ffmpeg - fix for parallel build (e.g.: make -j4)
  • Loading branch information
perexg committed Mar 25, 2016
1 parent 1359eff commit 11df429
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions Makefile
Expand Up @@ -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 := \
Expand Down Expand Up @@ -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)`
Expand Down

0 comments on commit 11df429

Please sign in to comment.