summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile22
1 files changed, 12 insertions, 10 deletions
diff --git a/Makefile b/Makefile
index 758934a..4c0a521 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
#
# Makefile for a Video Disk Recorder plugin
#
-# $Id: Makefile 2 2005-05-14 22:25:56Z tom $
+# $Id: Makefile 23 2006-04-24 23:27:28Z tom $
# The official name of this plugin.
# This name will be used in the '-P...' option of VDR to load the plugin.
@@ -11,16 +11,16 @@ PLUGIN = spider
### The version number of this plugin (taken from the main source file):
-VERSION = $(shell grep 'static const char\* VERSION *=' $(PLUGIN).c | awk '{ print $$6 }' | sed -e 's/[";]//g')
+VERSION = $(shell sed -ne '/static .* VERSION *=/s/^.*"\(.*\)".*$$/\1/p' \
+ $(PLUGIN).c)
### The C++ compiler and options:
CXX ?= g++
-CXXFLAGS ?= -fPIC -O2 -Wall -Woverloaded-virtual
+CXXFLAGS ?= -fPIC -g -O2 -Wall -Woverloaded-virtual
### The directory environment:
-DVBDIR = ../../../../DVB
VDRDIR = ../../..
LIBDIR = ../../lib
TMPDIR = /tmp
@@ -29,9 +29,10 @@ TMPDIR = /tmp
-include $(VDRDIR)/Make.config
-### The version number of VDR (taken from VDR's "config.h"):
+### The version number of VDR's plugin API (taken from VDR's "config.h"):
-VDRVERSION = $(shell grep 'define VDRVERSION ' $(VDRDIR)/config.h | awk '{ print $$3 }' | sed -e 's/"//g')
+APIVERSION = $(shell sed -ne '/define APIVERSION/s/^.*"\(.*\)".*$$/\1/p' \
+ $(VDRDIR)/config.h)
### The name of the distribution archive:
@@ -40,7 +41,7 @@ PACKAGE = vdr-$(ARCHIVE)
### Includes and Defines (add further entries here):
-INCLUDES += -I$(VDRDIR)/include -I$(DVBDIR)/include -I.
+INCLUDES += -I$(VDRDIR)/include
DEFINES += -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"$(PLUGIN)"'
@@ -52,7 +53,7 @@ OBJS = $(PLUGIN).o setup.o i18n.o bitmap.o \
### Implicit rules:
%.o: %.c
- $(CXX) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) -o $@ $<
+ $(CXX) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) $<
# Dependencies:
@@ -69,13 +70,14 @@ all: libvdr-$(PLUGIN).so
libvdr-$(PLUGIN).so: $(OBJS)
$(CXX) $(CXXFLAGS) -shared $(OBJS) -o $@
- @cp $@ $(LIBDIR)/$@.$(VDRVERSION)
+ @cp $@ $(LIBDIR)/$@.$(APIVERSION)
dist: clean
@-rm -rf $(TMPDIR)/$(ARCHIVE)
@mkdir $(TMPDIR)/$(ARCHIVE)
@cp -a * $(TMPDIR)/$(ARCHIVE)
- @tar czf $(PACKAGE).tgz -C $(TMPDIR) --exclude debian --exclude CVS --exclude .svn $(ARCHIVE)
+ @tar czf $(PACKAGE).tgz -C $(TMPDIR) \
+ --exclude debian --exclude CVS --exclude .svn $(ARCHIVE)
@-rm -rf $(TMPDIR)/$(ARCHIVE)
@echo Distribution package created as $(PACKAGE).tgz