summaryrefslogtreecommitdiff
path: root/Make.config
blob: b8b635e7d077e9521902cc5a066a7909372e06c9 (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
#
# 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.
# IMPORTANT: the presence of this macro is important for the Make.config
# file. So it must be defined, even if it is not used here!
#
PLUGIN = upnp

### The sources root build directory as seen by the called (to be overrideable by it)

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 C++ compiler and options:

CXX      ?= g++
ECPPC	 ?= ecppc
CXXFLAGS ?= -g -O3 -Wall -Werror=overloaded-virtual -Wno-parentheses -fPIC

### The directory environment:

VDRDIR ?= $(ROOTBUILDDIR)/../../..
VDRINCDIR ?= $(VDRDIR)
VDRPLUGINLIBDIR ?= /usr/lib/vdr/plugins
VDRCFGDIR ?= /etc/vdr/plugins/$(PLUGIN)
VDRRESDIR ?= /usr/share/vdr/$(PLUGIN)
LIBDIR ?= $(ROOTBUILDDIR)/../../lib
TMPDIR ?= /tmp

PLUGINDIR= ./PLUGINS

### The version number of VDR's plugin API (taken from VDR's "config.h"):

APIVERSION = $(shell sed -ne '/define APIVERSION/s/^.*"\(.*\)".*$$/\1/p' $(VDRDIR)/config.h)

### Includes and Defines (add further entries here):

INCLUDES += -I$(VDRDIR)/include

ifdef DEBUG
DEFINES = -DDEBUG
endif

DEFINES += -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"$(PLUGIN)"'
DEFINES += -DPLUGINDIR=\"$(VDRPLUGINLIBDIR)\"

# export to subplugins makefiles:
export PRESTRIP VERSION APIVERSION INCLUDES SHAREDDEFINES SHAREDLIBS CXX CXXFLAGS VDRDIR VDRINCDIR LIBDIR TMPDIR VDRPLUGINLIBDIR