summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Günther <tom@toms-cafe.de>2010-03-26 22:34:40 +0100
committerThomas Günther <tom@toms-cafe.de>2010-03-26 22:34:40 +0100
commit87cd7e0c9d86169c872b58de5ca9db8703cbdcef (patch)
tree4febf30be41930ba7c607d1dc79a7c97b1e8018d
parent6c8f79d05628fe863c55717c7ea8df2dfe8fc5bd (diff)
downloadvdr-plugin-osdpip-87cd7e0c9d86169c872b58de5ca9db8703cbdcef.tar.gz
vdr-plugin-osdpip-87cd7e0c9d86169c872b58de5ca9db8703cbdcef.tar.bz2
Added support for VDR >= 1.7.13 (Make.global)
-rw-r--r--HISTORY1
-rw-r--r--Makefile53
2 files changed, 31 insertions, 23 deletions
diff --git a/HISTORY b/HISTORY
index 5cf0998..6f0e58a 100644
--- a/HISTORY
+++ b/HISTORY
@@ -8,6 +8,7 @@ ____-__-__: Version 0.1.0
- Committed old releases to the GIT repository
- Updated project homepage url in README
- Updated FSF address in the license information
+- Added support for VDR >= 1.7.13 (Make.global)
2010-01-01: Version 0.0.10a
- added support for VDR 1.7.x
diff --git a/Makefile b/Makefile
index 8521947..fb01ff7 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,6 @@
#
# Makefile for a Video Disk Recorder plugin
#
-# $Id: Makefile,v 1.1.1.1 2004/11/19 16:45:31 lordjaxom Exp $
# You can change the compile options here or create a Make.config
# in the VDR directory an set them there.
@@ -18,6 +17,8 @@ WITH_NEW_FFMPEG_HEADERS=1
# 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 = osdpip
@@ -28,23 +29,26 @@ VERSION = $(shell grep 'static const char \*VERSION *=' $(PLUGIN).c | awk '{ pri
### The C++ compiler and options:
CXX ?= g++
-CXXFLAGS ?= -g -O2 -Wall -Woverloaded-virtual
+CXXFLAGS ?= -g -O2 -Wall -Woverloaded-virtual -Wno-parentheses
### The directory environment:
-DVBDIR = ../../../../DVB
FFMDIR = ../../../../ffmpeg-0.4.8
VDRDIR = ../../..
LIBDIR = ../../lib
TMPDIR = /tmp
+### Make sure that necessary options are included:
+
+-include $(VDRDIR)/Make.global
+
### Allow user defined options to overwrite defaults:
-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"):
-APIVERSION = $(shell grep 'define APIVERSION ' $(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:
@@ -53,14 +57,12 @@ PACKAGE = vdr-$(ARCHIVE)
### Includes and Defines (add further entries here):
-INCLUDES += -I$(VDRDIR)/include -I$(DVBDIR)/include -I. -I$(FFMDIR)/libavcodec
-LIBS = -L$(FFMDIR)/libavcodec -lavcodec
-DEFINES += -DPLUGIN_NAME_I18N='"$(PLUGIN)"'
-DEFINES += -D_GNU_SOURCE
+INCLUDES += -I$(VDRDIR)/include
-### The object files (add further files here):
+DEFINES += -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"$(PLUGIN)"'
-OBJS = $(PLUGIN).o osd_info.o remux.o osd.o receiver.o setup.o i18n.o pes.o quantize.o decoder.o
+INCLUDES += -I$(FFMDIR)/libavcodec
+LIBS += -L$(FFMDIR)/libavcodec -lavcodec
ifdef FFMPEG_STATIC
DEFINES += -DHAVE_FFMPEG_STATIC
@@ -79,14 +81,22 @@ ifdef WITH_NEW_FFMPEG_HEADERS
DEFINES += -DUSE_NEW_FFMPEG_HEADERS
endif
+### The object files (add further files here):
+
+OBJS = $(PLUGIN).o osd_info.o remux.o osd.o receiver.o setup.o i18n.o pes.o quantize.o decoder.o
+
+### The main target:
+
+all: libvdr-$(PLUGIN).so i18n
+
### Implicit rules:
%.o: %.c
- $(CXX) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) -o $@ $<
+ $(CXX) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) $<
-# Dependencies:
+### Dependencies:
-MAKEDEP = g++ -MM -MG
+MAKEDEP = $(CXX) -MM -MG
DEPFILE = .dependencies
$(DEPFILE): Makefile
@$(MAKEDEP) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@
@@ -109,31 +119,28 @@ $(I18Npot): $(wildcard *.c)
%.po: $(I18Npot)
msgmerge -U --no-wrap --no-location --backup=none -q $@ $<
- touch $@
+ @touch $@
$(I18Nmsgs): $(LOCALEDIR)/%/LC_MESSAGES/vdr-$(PLUGIN).mo: $(PODIR)/%.mo
- mkdir -p $(dir $@)
+ @mkdir -p $(dir $@)
cp $< $@
.PHONY: i18n
-i18n: $(I18Nmsgs)
+i18n: $(I18Nmsgs) $(I18Npot)
### Targets:
-all: libvdr-$(PLUGIN).so i18n
-
libvdr-$(PLUGIN).so: $(OBJS)
$(CXX) $(CXXFLAGS) -shared -o $@ $^ $(LIBS)
- @cp $@ $(LIBDIR)/$@.$(APIVERSION)
+ @cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION)
dist: clean
@-rm -rf $(TMPDIR)/$(ARCHIVE)
@mkdir $(TMPDIR)/$(ARCHIVE)
@cp -a * $(TMPDIR)/$(ARCHIVE)
- @tar czf $(PACKAGE).tgz -C $(TMPDIR) $(ARCHIVE)
+ @tar czf $(PACKAGE).tgz -C $(TMPDIR) --exclude debian $(ARCHIVE)
@-rm -rf $(TMPDIR)/$(ARCHIVE)
@echo Distribution package created as $(PACKAGE).tgz
clean:
- @-rm -f $(PODIR)/*.mo $(PODIR)/*.pot
- @-rm -f $(OBJS) $(DEPFILE) *.so *.tgz core* *~
+ @-rm -f $(OBJS) $(DEPFILE) *.so *.tgz core* *~ $(PODIR)/*.mo $(PODIR)/*.pot