# # 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 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