Skip to content

Commit

Permalink
Build system: some minor improvements
Browse files Browse the repository at this point in the history
Added static hdhomerun build dir to .gitignore.
Delete data/dvb-scan on `make distclean`.
Add dependency for Makefile to static hdhomerun and ffmpeg, so they get rebuilt when the Makefile changes.
Removed some clutter from the build output of static hdhomerun and ffmpeg.
Updated static libvorbis.
  • Loading branch information
stbenz authored and perexg committed Jun 9, 2015
1 parent 96ef2f3 commit 518230b
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 22 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -14,6 +14,7 @@ src/webui/static/tvh.css.gz
data/dvb-scan

libav_static
libhdhomerun_static

.cproject
.project
Expand Down
5 changes: 3 additions & 2 deletions Makefile
Expand Up @@ -461,6 +461,7 @@ distclean: clean
rm -rf ${ROOTDIR}/libav_static
rm -rf ${ROOTDIR}/libhdhomerun_static
rm -rf ${ROOTDIR}/build.*
rm -rf ${ROOTDIR}/data/dvb-scan
rm -f ${ROOTDIR}/.config.mk

# Create version
Expand Down Expand Up @@ -515,7 +516,7 @@ endif
${BUILDDIR}/libffmpeg_stamp: ${ROOTDIR}/libav_static/build/ffmpeg/lib/libavcodec.a
@touch $@

${ROOTDIR}/libav_static/build/ffmpeg/lib/libavcodec.a:
${ROOTDIR}/libav_static/build/ffmpeg/lib/libavcodec.a: Makefile.ffmpeg
CONFIG_LIBFFMPEG_STATIC_X264=$(CONFIG_LIBFFMPEG_STATIC_X264) \
$(MAKE) -f Makefile.ffmpeg build

Expand All @@ -529,7 +530,7 @@ endif
${BUILDDIR}/libhdhomerun_stamp: ${ROOTDIR}/libhdhomerun_static/libhdhomerun/libhdhomerun.a
@touch $@

${ROOTDIR}/libhdhomerun_static/libhdhomerun/libhdhomerun.a:
${ROOTDIR}/libhdhomerun_static/libhdhomerun/libhdhomerun.a: Makefile.hdhomerun
$(MAKE) -f Makefile.hdhomerun build

# linuxdvb git tree
Expand Down
22 changes: 13 additions & 9 deletions Makefile.ffmpeg
Expand Up @@ -23,12 +23,13 @@ unexport LDFLAGS

define DOWNLOAD
@mkdir -p $(LIBAVDIR)/build
if test -z "$${TVHEADEND_FILE_CACHE}"; then \
wget --no-verbose -O $(2) $(1); \
else \
file=$$(basename $(2)); \
cp "$$TVHEADEND_FILE_CACHE/$$(file)" $(2); \
fi
@if test -z "$${TVHEADEND_FILE_CACHE}"; then \
printf "WGET $(1)\n"; \
wget --no-verbose -O $(2) $(1); \
else \
file=$$(basename $(2)); \
cp "$$TVHEADEND_FILE_CACHE/$$(file)" $(2); \
fi
@{ \
sum=$$(sha1sum $(2) | cut -d ' ' -f 1); \
printf "SHA1SUM test '$${sum}' == '$(3)': "; \
Expand All @@ -38,7 +39,10 @@ define DOWNLOAD
endef

define UNTAR
tar x -C $(LIBAVDIR) -$(2)f $(LIBAVDIR)/$(1)
@{ \
printf "UNTAR $(1)\n"; \
tar x -C $(LIBAVDIR) -$(2)f $(LIBAVDIR)/$(1); \
}
endef

LIBAVDIR = $(ROOTDIR)/libav_static
Expand Down Expand Up @@ -68,10 +72,10 @@ LIBOGG_TB = $(LIBOGG).tar.gz
LIBOGG_URL = http://downloads.xiph.org/releases/ogg/$(LIBOGG_TB)
LIBOGG_SHA1 = df7f3977bbeda67306bc2a427257dd7375319d7d

LIBVORBIS = libvorbis-1.3.4
LIBVORBIS = libvorbis-1.3.5
LIBVORBIS_TB = $(LIBVORBIS).tar.gz
LIBVORBIS_URL = http://downloads.xiph.org/releases/vorbis/$(LIBVORBIS_TB)
LIBVORBIS_SHA1 = 1602716c187593ffe4302124535240cec2079df3
LIBVORBIS_SHA1 = 10c7fee173178d72855aa7593dfe49d9b3d6c804

LIBX264 = x264-snapshot-20141218-2245
LIBX264_TB = $(LIBX264).tar.bz2
Expand Down
26 changes: 15 additions & 11 deletions Makefile.hdhomerun
Expand Up @@ -23,22 +23,26 @@ unexport LDFLAGS

define DOWNLOAD
@mkdir -p $(LIBHDHRDIR)/build
if test -z "$${TVHEADEND_FILE_CACHE}"; then \
wget --no-verbose -O $(2) $(1); \
else \
file=$$(basename $(2)); \
cp "$$TVHEADEND_FILE_CACHE/$$(file)" $(2); \
fi
@{ \
@if test -z "$${TVHEADEND_FILE_CACHE}"; then \
printf "WGET $(1)\n"; \
wget --no-verbose -O $(2) $(1); \
else \
file=$$(basename $(2)); \
cp "$$TVHEADEND_FILE_CACHE/$$(file)" $(2); \
fi
@{ \
sum=$$(sha1sum $(2) | cut -d ' ' -f 1); \
printf "SHA1SUM test '$${sum}' == '$(3)': "; \
test "y$${sum}" = "y$(3)"; \
}
printf "SHA1SUM test '$${sum}' == '$(3)': "; \
test "y$${sum}" = "y$(3)"; \
}
@echo "OK"
endef

define UNTAR
tar x -C $(LIBHDHRDIR) -$(2)f $(LIBHDHRDIR)/$(1)
@{ \
printf "UNTAR $(1)\n"; \
tar x -C $(LIBHDHRDIR) -$(2)f $(LIBHDHRDIR)/$(1); \
}
endef

LIBHDHRDIR = $(ROOTDIR)/libhdhomerun_static
Expand Down

0 comments on commit 518230b

Please sign in to comment.