# 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