]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
Makefile: fix the ffmpeg dependencies (to not build ffmpeg for rules like distclean)
authorJaroslav Kysela <perex@perex.cz>
Mon, 23 Nov 2015 13:18:43 +0000 (14:18 +0100)
committerJaroslav Kysela <perex@perex.cz>
Mon, 23 Nov 2015 13:19:42 +0000 (14:19 +0100)
Makefile

index 3e5df2d400abe041f46eb0ebae6d2c276a33cb47..20721a849165576dd6d07762d7e4bec0e3eddd1c 100644 (file)
--- 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