Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Makefile.ffmpeg: Fix PATHs, also simplificate deps in the main Makefile
  • Loading branch information
perexg committed Oct 13, 2014
1 parent 12d73de commit 7bc16b6
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 14 deletions.
11 changes: 8 additions & 3 deletions Makefile
Expand Up @@ -357,10 +357,8 @@ OBJS = $(SRCS:%.c=$(BUILDDIR)/%.o)
OBJS_EXTRA = $(SRCS_EXTRA:%.c=$(BUILDDIR)/%.so)
DEPS = ${OBJS:%.o=%.d}

# Static libav
ifeq ($(CONFIG_LIBFFMPEG_STATIC),yes)
OBJS_LIBAV = $(SRCS_LIBAV:%.c=$(BUILDDIR)/%.o)
DEPS += ${OBJS_LIBAV:%.o=${BUILDDIR}/libffmpeg_stamp}
DEPS += ${BUILDDIR}/libffmpeg_stamp
endif

#
Expand Down Expand Up @@ -429,7 +427,14 @@ $(BUILDDIR)/bundle.c: check_dvb_scan
$(MKBUNDLE) -o $@ -d ${BUILDDIR}/bundle.d $(BUNDLE_FLAGS) $(BUNDLES:%=$(ROOTDIR)/%)

# Static FFMPEG

ifeq ($(CONFIG_LIBFFMPEG_STATIC),yes)
${ROOTDIR}/src/libav.h: ${BUILDDIR}/libffmpeg_stamp
${SRCS_LIBAV}: ${BUILDDIR}/libffmpeg_stamp
endif

${BUILDDIR}/libffmpeg_stamp: ${ROOTDIR}/libav_static/build/ffmpeg/lib/libavcodec.a
echo "$(DEPS)"
@touch $@

${ROOTDIR}/libav_static/build/ffmpeg/lib/libavcodec.a:
Expand Down
19 changes: 8 additions & 11 deletions Makefile.ffmpeg
Expand Up @@ -21,7 +21,7 @@ include $(dir $(lastword $(MAKEFILE_LIST))).config.mk
define DOWNLOAD
@mkdir -p $(LIBAVDIR)/build
if test -z "$${TVHEADEND_FILE_CACHE}"; then \
wget -O $(2) $(1); \
wget --no-verbose -O $(2) $(1); \
else \
file=$$(basename $(2)); \
cp "$$TVHEADEND_FILE_CACHE/$$(file)" $(2); \
Expand All @@ -34,6 +34,8 @@ endef

LIBAVDIR = $(ROOTDIR)/libav_static

export PATH := $(LIBAVDIR)/build/ffmpeg/bin:$(PATH)

ECFLAGS = -I$(LIBAVDIR)/build/ffmpeg/include
ELIBS = -L$(LIBAVDIR)/build/ffmpeg/lib -ldl

Expand Down Expand Up @@ -103,8 +105,7 @@ $(LIBAVDIR)/$(LIBOGG)/.tvh_build: \
--prefix=/ffmpeg \
--enable-static \
--disable-shared
PATH="$(LIBAVDIR)/build/ffmpeg/bin:$(PATH)" \
DESTDIR=$(LIBAVDIR)/build \
DESTDIR=$(LIBAVDIR)/build \
make -C $(LIBAVDIR)/$(LIBOGG) install
@touch $@

Expand All @@ -123,8 +124,7 @@ $(LIBAVDIR)/$(LIBVORBIS)/.tvh_build: \
--enable-static \
--disable-shared \
--with-ogg=$(LIBAVDIR)/build/ffmpeg
PATH="$(LIBAVDIR)/build/ffmpeg/bin:$(PATH)" \
DESTDIR=$(LIBAVDIR)/build \
DESTDIR=$(LIBAVDIR)/build \
make -C $(LIBAVDIR)/$(LIBVORBIS) install
@touch $@

Expand Down Expand Up @@ -152,8 +152,7 @@ $(LIBAVDIR)/$(LIBX264)/.tvh_build: \
--disable-ffms \
--disable-gpac \
--disable-lsmash
PATH="$(LIBAVDIR)/build/ffmpeg/bin:$(PATH)" \
DESTDIR=$(LIBAVDIR)/build \
DESTDIR=$(LIBAVDIR)/build \
make -C $(LIBAVDIR)/$(LIBX264) install
@touch $@

Expand All @@ -174,8 +173,7 @@ $(LIBAVDIR)/$(LIBVPX)/.tvh_build: \
--prefix=/ffmpeg \
--enable-static \
--disable-shared
PATH="$(LIBAVDIR)/build/ffmpeg/bin:$(PATH)" \
DIST_DIR=$(LIBAVDIR)/build/ffmpeg \
DIST_DIR=$(LIBAVDIR)/build/ffmpeg \
make -C $(LIBAVDIR)/$(LIBVPX) install
@touch $@

Expand Down Expand Up @@ -208,8 +206,7 @@ $(LIBAVDIR)/$(FFMPEG)/.tvh_build: \
$(foreach decoder,$(DECODERS),--enable-decoder=$(decoder)) \
$(foreach encoder,$(ENCODERS),--enable-encoder=$(encoder)) \
$(foreach muxer,$(MUXERS),--enable-muxer=$(muxer))
PATH="$(LIBAVDIR)/build/ffmpeg/bin:$(PATH)" \
DESTDIR=$(LIBAVDIR)/build \
DESTDIR=$(LIBAVDIR)/build \
make -C $(LIBAVDIR)/$(FFMPEG) install
@touch $@

Expand Down

0 comments on commit 7bc16b6

Please sign in to comment.