summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJohns <johns98@gmx.net>2015-03-10 09:43:09 +0100
committerJohns <johns98@gmx.net>2015-03-10 09:43:09 +0100
commit4e7263876615e49db278cc21c195b6d44e03ed80 (patch)
tree5eaf8bf6f613821563c348412a7ea2690f23b8eb /Makefile
parent93ea660a380f307b43719410b5ea94c2020d02ea (diff)
downloadvdr-plugin-softhddevice-4e7263876615e49db278cc21c195b6d44e03ed80.tar.gz
vdr-plugin-softhddevice-4e7263876615e49db278cc21c195b6d44e03ed80.tar.bz2
Fix bug #2058: support for Make.plgcfg.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile90
1 files changed, 46 insertions, 44 deletions
diff --git a/Makefile b/Makefile
index 187a917..eea795b 100644
--- a/Makefile
+++ b/Makefile
@@ -45,6 +45,52 @@ CONFIG += -DUSE_PIP # PIP support
CONFIG += -DUSE_VDR_SPU # use VDR SPU decoder.
#CONFIG += -DUSE_SOFTLIMIT # (tobe removed) limit the buffer fill
+### The version number of this plugin (taken from the main source file):
+
+VERSION = $(shell grep 'static const char \*const VERSION *=' $(PLUGIN).cpp | awk '{ print $$7 }' | sed -e 's/[";]//g')
+GIT_REV = $(shell git describe --always 2>/dev/null)
+
+### The directory environment:
+
+# Use package data if installed...otherwise assume we're under the VDR source directory:
+PKGCFG = $(if $(VDRDIR),$(shell pkg-config --variable=$(1) $(VDRDIR)/vdr.pc),$(shell PKG_CONFIG_PATH="$$PKG_CONFIG_PATH:../../.." pkg-config --variable=$(1) vdr))
+LIBDIR = $(call PKGCFG,libdir)
+LOCDIR = $(call PKGCFG,locdir)
+PLGCFG = $(call PKGCFG,plgcfg)
+#
+TMPDIR ?= /tmp
+
+### The compiler options:
+
+export CFLAGS = $(call PKGCFG,cflags)
+export CXXFLAGS = $(call PKGCFG,cxxflags)
+
+ifeq ($(CFLAGS),)
+$(warning CFLAGS not set)
+endif
+ifeq ($(CXXFLAGS),)
+$(warning CXXFLAGS not set)
+endif
+
+### The version number of VDR's plugin API:
+
+APIVERSION = $(call PKGCFG,apiversion)
+
+### Allow user defined options to overwrite defaults:
+
+-include $(PLGCFG)
+
+### The name of the distribution archive:
+
+ARCHIVE = $(PLUGIN)-$(VERSION)
+PACKAGE = vdr-$(ARCHIVE)
+
+### The name of the shared object file:
+
+SOFILE = libvdr-$(PLUGIN).so
+
+### Parse softhddevice config
+
ifeq ($(ALSA),1)
CONFIG += -DUSE_ALSA
_CFLAGS += $(shell pkg-config --cflags alsa)
@@ -91,50 +137,6 @@ endif
_CFLAGS += $(shell pkg-config --cflags libavcodec x11 x11-xcb xcb xcb-icccm)
LIBS += -lrt $(shell pkg-config --libs libavcodec x11 x11-xcb xcb xcb-icccm)
-### The version number of this plugin (taken from the main source file):
-
-VERSION = $(shell grep 'static const char \*const VERSION *=' $(PLUGIN).cpp | awk '{ print $$7 }' | sed -e 's/[";]//g')
-GIT_REV = $(shell git describe --always 2>/dev/null)
-
-### The directory environment:
-
-# Use package data if installed...otherwise assume we're under the VDR source directory:
-PKGCFG = $(if $(VDRDIR),$(shell pkg-config --variable=$(1) $(VDRDIR)/vdr.pc),$(shell pkg-config --variable=$(1) vdr || pkg-config --variable=$(1) ../../../vdr.pc))
-LIBDIR = $(call PKGCFG,libdir)
-LOCDIR = $(call PKGCFG,locdir)
-PLGCFG = $(call PKGCFG,plgcfg)
-#
-TMPDIR ?= /tmp
-
-### The compiler options:
-
-export CFLAGS = $(call PKGCFG,cflags)
-export CXXFLAGS = $(call PKGCFG,cxxflags)
-
-ifeq ($(CFLAGS),)
-$(warning CFLAGS not set)
-endif
-ifeq ($(CXXFLAGS),)
-$(warning CXXFLAGS not set)
-endif
-
-### The version number of VDR's plugin API:
-
-APIVERSION = $(call PKGCFG,apiversion)
-
-### Allow user defined options to overwrite defaults:
-
--include $(PLGCFG)
-
-### The name of the distribution archive:
-
-ARCHIVE = $(PLUGIN)-$(VERSION)
-PACKAGE = vdr-$(ARCHIVE)
-
-### The name of the shared object file:
-
-SOFILE = libvdr-$(PLUGIN).so
-
### Includes and Defines (add further entries here):
INCLUDES +=