2 # PremiereEpg plugin to VDR
4 # (C) 2005 Stefan Huelswitt <s.huelswitt@gmx.de>
6 # This code is free software; you can redistribute it and/or
7 # modify it under the terms of the GNU General Public License
8 # as published by the Free Software Foundation; either version 2
9 # of the License, or (at your option) any later version.
11 # This code is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, write to the Free Software
18 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 # Or, point your browser to http://www.gnu.org/copyleft/gpl.html
21 # The official name of this plugin.
22 # This name will be used in the '-P...' option of VDR to load the plugin.
23 # By default the main source file also carries this name.
27 ### The version number of this plugin (taken from the main source file):
29 VERSION = $(shell grep 'static const char \*VERSION *=' $(PLUGIN).c | awk '{ print $$6 }' | sed -e 's/[";]//g')
31 ### The C++ compiler and options:
34 CXXFLAGS ?= -O2 -Wall -Woverloaded-virtual
36 ### The directory environment:
38 DVBDIR = ../../../../DVB
43 ### Allow user defined options to overwrite defaults:
45 -include $(VDRDIR)/Make.config
47 ### The version number of VDR (taken from VDR's "config.h"):
49 VDRVERSION = $(shell grep 'define VDRVERSION ' $(VDRDIR)/config.h | awk '{ print $$3 }' | sed -e 's/"//g')
51 ### The name of the distribution archive:
53 ARCHIVE = $(PLUGIN)-$(VERSION)
54 PACKAGE = vdr-$(ARCHIVE)
56 ### Includes and Defines (add further entries here):
58 INCLUDES += -I$(VDRDIR)/include -I$(DVBDIR)/include
60 DEFINES += -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"$(PLUGIN)"'
62 ### The object files (add further files here):
73 $(CXX) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) $<
77 MAKEDEP = $(CXX) -MM -MG
78 DEPFILE = .dependencies
80 @$(MAKEDEP) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@
86 all: libvdr-$(PLUGIN).so
88 libvdr-$(PLUGIN).so: $(OBJS)
89 $(CXX) $(CXXFLAGS) -shared $(OBJS) -o $@
90 @cp $@ $(LIBDIR)/$@.$(VDRVERSION)
93 @-rm -rf $(TMPDIR)/$(ARCHIVE)
94 @mkdir $(TMPDIR)/$(ARCHIVE)
95 @cp -a * $(TMPDIR)/$(ARCHIVE)
96 @tar czf $(PACKAGE).tgz -C $(TMPDIR) $(ARCHIVE)
97 @-rm -rf $(TMPDIR)/$(ARCHIVE)
98 @echo Distribution package created as $(PACKAGE).tar.gz
101 @-rm -f $(OBJS) $(DEPFILE) *.so *.tar.gz core* *~