From e0a03d41603c92643a34ca5ef44a70bd2e983e8e Mon Sep 17 00:00:00 2001 From: Enrico Scholz Date: Wed, 1 May 2013 15:13:46 +0200 Subject: makefile: added section to allow build within vdr sources [#1327] --- Makefile | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/Makefile b/Makefile index 3674e6f..c99efc9 100644 --- a/Makefile +++ b/Makefile @@ -228,3 +228,27 @@ gen-keymap.perf: Makefile @$(CC) $(call _buildflags,C) -imacros 'linux/input.h' -E -dN - >$@.tmp @mv $@.tmp $@ + + +### {{{ VDR localbuild compat section +### +ifeq "$(origin VDRDIR)" "command line" +## Do not remove it. vdr greps for these magic strings +# $(LIBDIR)/$(APIVERSION) +# PKGCFG +PKG_CONFIG_PATH := $(VDRDIR)$(if $(PKG_CONFIG_PATH),:$(PKG_CONFIG_PATH)) +export PKG_CONFIG_PATH + +AM_CPPFLAGS += -I${VDRDIR}/include + +# The 'shell' function does not take makefile variables into account; +# pass it manually +VDR_CFLAGS = $(shell env PKG_CONFIG_PATH=${PKG_CONFIG_PATH} ${PKG_CONFIG} --variable=cflags vdr) +VDR_CXXFLAGS = $(shell env PKG_CONFIG_PATH=${PKG_CONFIG_PATH} ${PKG_CONFIG} --variable=cxxflags vdr) + +all: compat-symlink +compat-symlink: $(vdr_PLUGINS) + rm -f libvdr-$(PLUGIN).so + ln -s libvdr-$(PLUGIN).so.$(APIVERSION) libvdr-$(PLUGIN).so +endif +### }}} VDR localbuild compat section -- cgit v1.2.3