diff -Naur INSTALL INSTALL --- INSTALL 1970-01-01 01:00:00.000000000 +0100 +++ INSTALL 2012-10-28 21:16:27.719380990 +0100 @@ -0,0 +1,14 @@ +- unpack as usually inside the PLUGINS dir of the VDR version against you want to build +- building the subplugins requires the main plugin to be already installed on the target +system, therefore you should execute the following sequence: + +make +make install +make subplugins +make install-subplugins + + - of course, executing the "install*" targets directly will build the binaries first... + - for building / installing just certain subplugins explicitely, just change to their + respective directories and execute 'make' / 'make install' there; + + - further targets are remove & remove-subplugins \ No newline at end of file diff -Naur Make.config Make.config --- Make.config 1970-01-01 01:00:00.000000000 +0100 +++ Make.config 2012-10-28 21:18:34.425380989 +0100 @@ -0,0 +1,56 @@ +# +# 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 + +### 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 diff -Naur Makefile.plugins Makefile.plugins --- Makefile.plugins 1970-01-01 01:00:00.000000000 +0100 +++ Makefile.plugins 2012-10-28 21:19:07.874380988 +0100 @@ -0,0 +1,70 @@ +# +# UPnP/DLNA subplugins Makefile +# +# This code is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This code is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# Or, point your browser to http://www.gnu.org/copyleft/gpl.html + +### Includes and Defines + +SINCLUDES += -I../../../include +SINCLUDES += $(shell echo "$(INCLUDES)" | sed -e 's+-I *+-I+g' | sed -e 's+-I\([^/]\)+-I../../\1+g') + +-include Makefile + +UPNPAPIVERSION = $(shell sed -ne '/define UPNPPLUGIN_VERSION/s/^.*"\(.*\)".*$$/\1/p' ../../../include/plugin.h) + +### The version number of the subplugin (taken from the main source file): +SUBPLUGVERSION = $(shell grep 'static const char \*VERSION *=' $(SUBPLUGIN)$(CATEGORY).cpp | awk '{ print $$6 }' | sed -e 's/[";]//g') + +DEFINES += -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE + +LIBS += -L$(LIBDIR) -Wl,-R$(LIBDIR) $(VDRPLUGINLIBDIR)/libvdr-upnp.so.$(APIVERSION) + +# Dependencies: + +MAKEDEP = g++ -MM -MG +DEPFILE = .dependencies +$(DEPFILE): $(OBJS:%.o=%.cpp) $(wildcard *.h) + @$(MAKEDEP) $(DEFINES) $(SHAREDDEFINES) $(SINCLUDES) $(OBJS:%.o=%.cpp) > $@ + +-include $(DEPFILE) + +### Targets: + +LIBUPNP = libupnp-$(TARGET).so +LIBUPNPVER = $(LIBUPNP).$(UPNPAPIVERSION)-$(APIVERSION) + +BUILDTARGETS = $(LIBDIR)/$(LIBUPNPVER) + +_all: $(BUILDTARGETS) +.PHONY: clean dist + +%.o: %.cpp + $(CXX) $(CXXFLAGS) -c $(DEFINES) $(SHAREDDEFINES) $(SINCLUDES) $< + +$(LIBUPNP): $(OBJS) + $(CXX) $(CXXFLAGS) -shared $(OBJS) $(LIBS) $(SHAREDLIBS) -o $@ + +$(LIBDIR)/$(LIBUPNPVER): $(LIBUPNP) + @cp -p $< $@ + +_clean: + @-rm -f $(OBJS) $(CLEAN_RM) $(DEPFILE) $(LIBUPNP) $(LIBDIR)/$(LIBUPNPVER) core* *~ + +_install: all + install -m 755 -o root -g root $(PRESTRIP) $(LIBDIR)/$(LIBUPNPVER) $(VDRPLUGINLIBDIR) + +_uninstall: + rm $(VDRPLUGINLIBDIR)/$(LIBUPNPVER)