blob: 9b3507dbe523af5ba90a0e82744993623ecb105f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
# Makefile for a Video Disk Recorder plugin
#
# $Id$
# The official name of this plugin.
# This name will be used in the '-P...' option of VDR to load the plugin.
# By default the main source file also carries this name.
PLUGIN = upnp
# we need this one when building the subplugins
ROOTBUILDDIR ?= $(shell pwd)
### The version number of this plugin (taken from the main source file):
VERSION = $(shell grep 'static const char \*VERSION *=' $(ROOTBUILDDIR)/$(PLUGIN).h | awk '{ print $$6 }' | sed -e 's/[";]//g')
### If you do not want to strip binaries on installing, you may comment this:
#PRESTRIP = -s
### 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)
VDRCFGDIR ?= $(call PKGCFG,configdir)/plugins/$(PLUGIN)
VDRRESDIR ?= $(call PKGCFG,resdir)/plugins/$(PLUGIN)
PLGCFG = $(call PKGCFG,plgcfg)
PREFIX ?= /usr
INSDOCDIR ?= $(PREFIX)/share/doc/vdr-$(PLUGIN)-$(VERSION)
#
TMPDIR ?= /tmp
### The compiler options:
ECPPC ?= ecppc
export CFLAGS = $(call PKGCFG,cflags)
export CXXFLAGS = $(call PKGCFG,cxxflags)
### The version number of VDR's plugin API:
APIVERSION = $(call PKGCFG,apiversion)
### Allow user defined options to overwrite defaults:
-include $(PLGCFG)
ifdef DEBUG
DEFINES = -DDEBUG
endif
### Includes and Defines (add further entries here):
INCLUDES +=
DEFINES += -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"$(PLUGIN)"'
# export to subplugins makefiles:
export PRESTRIP VERSION APIVERSION INCLUDES CXXFLAGS VDRDIR VDRINCDIR LIBDIR TMPDIR LOCDIR DEFINES SHAREDDEFINES SHAREDLIBS ROOTBUILDDIR PREFIX INSDOCDIR
|