From 851aebb5aa5f68272cf2ed5af5c83de38e78fb44 Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Mon, 23 Nov 2015 14:18:43 +0100 Subject: [PATCH] Makefile: fix the ffmpeg dependencies (to not build ffmpeg for rules like distclean) --- Makefile | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 3e5df2d40..20721a849 100644 --- a/Makefile +++ b/Makefile @@ -422,6 +422,9 @@ SRCS-$(CONFIG_BONJOUR) = $(SRCS-BONJOUR) I18N-C += $(SRCS-BONJOUR) # libav +DEPS-LIBAV = \ + src/main.c \ + src/tvhlog.c SRCS-LIBAV = \ src/libav.c \ src/muxer/muxer_libav.c \ @@ -530,10 +533,10 @@ OBJS_EXTRA = $(SRCS_EXTRA:%.c=$(BUILDDIR)/%.so) DEPS = ${OBJS:%.o=%.d} ifeq ($(CONFIG_LIBFFMPEG_STATIC),yes) -DEPS += ${BUILDDIR}/libffmpeg_stamp +ALL-yes += ${BUILDDIR}/libffmpeg_stamp endif ifeq ($(CONFIG_HDHOMERUN_STATIC),yes) -DEPS += ${BUILDDIR}/libhdhomerun_stamp +ALL-yes += ${BUILDDIR}/libhdhomerun_stamp endif SRCS += build.c timestamp.c @@ -543,17 +546,16 @@ SRCS += build.c timestamp.c # # Default +.PHONY: all all: $(ALL-yes) ${PROG} -# Special -.PHONY: clean distclean reconfigure - # Check configure output is valid .config.mk: configure @echo "./configure output is old, please re-run" @false # Recreate configuration +.PHONY: reconfigure reconfigure: $(ROOTDIR)/configure $(CONFIGURE_ARGS) @@ -572,12 +574,15 @@ ${BUILDDIR}/%.so: ${SRCS_EXTRA} ${CC} -O -fbuiltin -fomit-frame-pointer -fPIC -shared -o $@ $< -ldl # Clean +.PHONY: clean clean: rm -rf ${BUILDDIR}/src ${BUILDDIR}/bundle* ${BUILDDIR}/build.o ${BUILDDIR}/timestamp.* \ src/tvh_locale_inc.c find . -name "*~" | xargs rm -f $(MAKE) -f Makefile.webui clean +# Distclean +.PHONY: distclean distclean: clean rm -rf ${ROOTDIR}/libav_static rm -rf ${ROOTDIR}/libhdhomerun_static @@ -673,8 +678,7 @@ make_webui: # Static FFMPEG ifeq ($(CONFIG_LIBFFMPEG_STATIC),yes) -${ROOTDIR}/src/libav.h: ${BUILDDIR}/libffmpeg_stamp -${SRCS_LIBAV}: ${BUILDDIR}/libffmpeg_stamp +src/libav.h ${SRCS-LIBAV} ${DEPS-LIBAV}: ${BUILDDIR}/libffmpeg_stamp endif ${BUILDDIR}/libffmpeg_stamp: ${ROOTDIR}/libav_static/build/ffmpeg/lib/libavcodec.a @@ -686,8 +690,7 @@ ${ROOTDIR}/libav_static/build/ffmpeg/lib/libavcodec.a: Makefile.ffmpeg # Static HDHOMERUN library ifeq ($(CONFIG_LIBHDHOMERUN_STATIC),yes) -${ROOTDIR}/src/input/mpegts/tvhdhomerun/tvhdhomerun_private.h: ${BUILDDIR}/libhdhomerun_stamp -${SRCS_HDHOMERUN}: ${BUILDDIR}/libhdhomerun_stamp +src/input/mpegts/tvhdhomerun/tvhdhomerun_private.h ${SRCS-HDHOMERUN}: ${BUILDDIR}/libhdhomerun_stamp endif ${BUILDDIR}/libhdhomerun_stamp: ${ROOTDIR}/libhdhomerun_static/libhdhomerun/libhdhomerun.a -- 2.47.3