Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
build: updated the Makefiles to make use of new static lib helpers
  • Loading branch information
adamsutton committed Jan 16, 2016
1 parent 408d7d0 commit afff708
Show file tree
Hide file tree
Showing 3 changed files with 183 additions and 181 deletions.
24 changes: 11 additions & 13 deletions Makefile
Expand Up @@ -61,8 +61,8 @@ endif

ifeq ($(CONFIG_LIBFFMPEG_STATIC),yes)

CFLAGS += -I${ROOTDIR}/libav_static/build/ffmpeg/include
LDFLAGS_FFDIR = ${ROOTDIR}/libav_static/build/ffmpeg/lib
CFLAGS += -I${BUILDDIR}/ffmpeg/build/ffmpeg/include
LDFLAGS_FFDIR = ${BUILDDIR}/ffmpeg/build/ffmpeg/lib
LDFLAGS += ${LDFLAGS_FFDIR}/libavresample.a
LDFLAGS += ${LDFLAGS_FFDIR}/libswresample.a
LDFLAGS += ${LDFLAGS_FFDIR}/libavfilter.a
Expand Down Expand Up @@ -112,9 +112,9 @@ endif
endif # CONFIG_LIBFFMPEG_STATIC

ifeq ($(CONFIG_HDHOMERUN_STATIC),yes)
CFLAGS += -I${ROOTDIR}/libhdhomerun_static
LDFLAGS += -L${ROOTDIR}/libhdhomerun_static/libhdhomerun \
-Wl,-Bstatic -lhdhomerun -Wl,-Bdynamic
CFLAGS += -I$(BUILDDIR)/hdhomerun
LDFLAGS += $(BUILDDIR)/hdhomerun/libhdhomerun/libhdhomerun.a \
-Wl,-Bstatic -Wl,-Bdynamic
endif

vpath %.c $(ROOTDIR)
Expand Down Expand Up @@ -587,8 +587,6 @@ clean:
# Distclean
.PHONY: distclean
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
Expand Down Expand Up @@ -684,23 +682,23 @@ ifeq ($(CONFIG_LIBFFMPEG_STATIC),yes)
src/libav.h ${SRCS-LIBAV} ${DEPS-LIBAV}: ${BUILDDIR}/libffmpeg_stamp
endif

${BUILDDIR}/libffmpeg_stamp: ${ROOTDIR}/libav_static/build/ffmpeg/lib/libavcodec.a
${BUILDDIR}/libffmpeg_stamp: ${BUILDDIR}/ffmpeg/build/ffmpeg/lib/libavcodec.a
@touch $@

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

# Static HDHOMERUN library

ifeq ($(CONFIG_LIBHDHOMERUN_STATIC),yes)
src/input/mpegts/tvhdhomerun/tvhdhomerun_private.h ${SRCS-HDHOMERUN}: ${BUILDDIR}/libhdhomerun_stamp
endif

${BUILDDIR}/libhdhomerun_stamp: ${ROOTDIR}/libhdhomerun_static/libhdhomerun/libhdhomerun.a
${BUILDDIR}/libhdhomerun_stamp: ${BUILDDIR}/hdhomerun/libhdhomerun/libhdhomerun.a
@touch $@

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

# linuxdvb git tree
$(ROOTDIR)/data/dvb-scan/.stamp:
Expand Down

0 comments on commit afff708

Please sign in to comment.