1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

Modified the Makefiles, by default VDR is now built according to the FHS

This commit is contained in:
Klaus Schmidinger 2013-01-06 18:48:29 +01:00
parent 36dfa5cb8f
commit 188fe74c8a
15 changed files with 209 additions and 176 deletions

13
HISTORY
View File

@ -7494,10 +7494,21 @@ Video Disk Recorder Revision History
use it. use it.
- Added maximum SNR value for PCTV Systems PCTV 73ESE (thanks to Cedric Dewijs). - Added maximum SNR value for PCTV Systems PCTV 73ESE (thanks to Cedric Dewijs).
2013-01-03: Version 1.7.36 2013-01-06: Version 1.7.36
- Added maximum SNR value for PCTV Systems nanoStick T2 290e (thanks to Antti - Added maximum SNR value for PCTV Systems nanoStick T2 290e (thanks to Antti
Hartikainen). Hartikainen).
- Added a remark indicating that the coordinates of Rect in a call to - Added a remark indicating that the coordinates of Rect in a call to
cDevice::CanScaleVideo() are in the range of the width and height returned by cDevice::CanScaleVideo() are in the range of the width and height returned by
GetOsdSize() (suggested by Reinhard Nissl). GetOsdSize() (suggested by Reinhard Nissl).
- Modified the Makefiles (thanks to Christopher Reimer).
By default VDR is now built according to the FHS ("File system Hierarchy Standard"),
and a plain "make" in the VDR source directory just builds everything, but doesn't
copy it to ./PLUGINS/lib and ./locale any more. You can use a Make.config file
(copied from Make.config.template) and set the parameter LCLBLD=1 to have everything
built and installed under the VDR source tree (as was the default in previous
versions). If you already have your own Make.config file, you may want to copy the
new Make.config.template and adapt it to your needs. If you don't want VDR's data
files to be spread around your system according to the FHS, you can set the
parameter ONEDIR=1 (using Make.config) to have all files in one /video directory as
before.

29
INSTALL
View File

@ -311,7 +311,7 @@ This program must be given to VDR with the '-a' option, as in
The video data directory: The video data directory:
------------------------- -------------------------
All recordings are written into directories below "/video". Please All recordings are written into directories below "/srv/vdr/video". Please
make sure this directory exists, and that the user who runs the 'vdr' make sure this directory exists, and that the user who runs the 'vdr'
program has read and write access to that directory. program has read and write access to that directory.
If you prefer a different location for your video files, you can use If you prefer a different location for your video files, you can use
@ -331,12 +331,12 @@ same basic name and must end with a numeric part, which starts at 0 for
the main directory and has increasing values for the rest of the the main directory and has increasing values for the rest of the
directories. For example directories. For example
/video0 /srv/vdr/video0
/video1 /srv/vdr/video1
/video2 /srv/vdr/video2
would be a setup with three directories. You can use more than one would be a setup with three directories. You can use more than one
numeric digit, and the directories need not be directly under '/': numeric digit:
/mnt/MyVideos/vdr.00 /mnt/MyVideos/vdr.00
/mnt/MyVideos/vdr.01 /mnt/MyVideos/vdr.01
@ -351,7 +351,7 @@ with the name of the basic directory when running 'vdr':
vdr -v /video0 vdr -v /video0
Note that you should not copy any non-VDR files into the /videoX directories, Note that you should not copy any non-VDR files into the video directory,
since this might cause a lot of unnecessary disk access when VDR cleans up those since this might cause a lot of unnecessary disk access when VDR cleans up those
directories and there is a large number of files and/or subdirectories in directories and there is a large number of files and/or subdirectories in
there. If you have a large disk that you want to use for VDR's video data as there. If you have a large disk that you want to use for VDR's video data as
@ -375,9 +375,11 @@ Configuration files:
There are several configuration files that hold information about There are several configuration files that hold information about
channels, remote control keys, timers etc. By default these files are channels, remote control keys, timers etc. By default these files are
assumed to be located in the video directory, but a different directory spread around the system according to the FHS ("File system Hierarchy Standard").
can be used with the '-c' option. Plugins assume their configuration files If you prefer to have VDR built to run locally under the VDR source tree,
in a subdirectory called "plugins" of this directory. you can copy the file Make.config.template to Make.config and set the parameter
LCLBLD=1. If you also want to have all data files under one single directory,
set ONEDIR=1 in Make.config.
For starters just copy all *.conf files from the VDR directory into your For starters just copy all *.conf files from the VDR directory into your
video directory. video directory.
@ -396,15 +398,6 @@ As a starting point you can copy the 'channels.conf' file that comes with the
VDR archive into your video directory (or into your config directory, VDR archive into your video directory (or into your config directory,
respectively, in case you have redirected it with the -c option). respectively, in case you have redirected it with the -c option).
If you prefer to have your system set up according to the FHS
("File system Hierarchy Standard") and thus have your files spread
all over the place ;-), you can do this by copying the file Make.config.template
to Make.config in the VDR source directory, and activating the line
#USEFHS = 1
in that file.
Setting up DiSEqC: Setting up DiSEqC:
------------------ ------------------

View File

@ -6,7 +6,7 @@
# See the main source file 'vdr.c' for copyright information and # See the main source file 'vdr.c' for copyright information and
# how to reach the author. # how to reach the author.
# #
# $Id: Make.config.template 2.14 2012/12/28 09:55:22 kls Exp $ # $Id: Make.config.template 2.15 2013/01/06 18:48:29 kls Exp $
### The C compiler and options: ### The C compiler and options:
@ -14,48 +14,56 @@ CC = gcc
CFLAGS = -g -O3 -Wall CFLAGS = -g -O3 -Wall
CXX = g++ CXX = g++
CXXFLAGS = $(CFLAGS) -Werror=overloaded-virtual -Wno-parentheses CXXFLAGS = -g -O3 -Wall -Werror=overloaded-virtual -Wno-parentheses
CFLAGS += -fPIC
# Use 'make M32=1 ...' to build a 32-bit version of VDR on a 64-bit machine: # Use 'make M32=1 ...' to build a 32-bit version of VDR on a 64-bit machine:
ifdef M32 ifdef M32
CFLAGS += -m32 CFLAGS += -m32
CXXFLAGS += -m32
endif endif
### The directory environment: ### The directory environment:
PREFIX = /usr/local
#DVBDIR = /usr/src/v4l-dvb/linux
MANDIR = $(PREFIX)/man
BINDIR = $(PREFIX)/bin
# Use this if you want to have a central place where you configure compile time # Use this if you want to have a central place where you configure compile time
# parameters for plugins: # parameters for plugins:
#PLGCFG = /etc/vdr/plugins.conf #PLGCFG = /etc/vdr/plugins.conf
# By default locale and plugin files are built under the source directory: # Use 'make LCLBLD=1' to build locale and plugin files under the source directory:
INCDIR = $(CWD)/include ifdef LCLBLD
LOCDIR = $(CWD)/locale LOCDIR = $(CWD)/locale
PLUGINDIR = $(CWD)/PLUGINS PLUGINDIR = $(CWD)/PLUGINS
ifndef PLUGIN # don't overwrite for plugins with old makefiles
LIBDIR = $(PLUGINDIR)/lib LIBDIR = $(PLUGINDIR)/lib
# By default VDR requires only one single directory to operate:
VIDEODIR = /video
# Activate the following line to build VDR according to the FHS ("File system Hierarchy Standard"):
#USEFHS = 1
ifdef USEFHS
VIDEODIR = /srv/vdr/video
CONFDIR = /var/lib/vdr
CACHEDIR = /var/cache/vdr
RESDIR = $(PREFIX)/share/vdr
INCDIR = $(PREFIX)/include
LOCDIR = $(PREFIX)/share/locale
LIBDIR = $(PREFIX)/lib/vdr
endif endif
HDRDIR = $(CWD)/include
endif
# Use 'make ONEDIR=1' to have all data in one single directory:
ifdef ONEDIR
VIDEODIR = /video
CACHEDIR = $(VIDEODIR)
CONFDIR = $(VIDEODIR)
RESDIR = $(VIDEODIR)
endif
# Other directories:
#PREFIX = /usr/local
#BINDIR = $(PREFIX)/bin
#DVBDIR = /usr/src/v4l-dvb/linux
#MANDIR = $(PREFIX)/man
#INCDIR = $(PREFIX)/include
#PCDIR = $(PREFIX)/lib/pkgconfig
### The remote control: ### The remote control:
LIRC_DEVICE = /var/run/lirc/lircd LIRC_DEVICE = /var/run/lirc/lircd
## Define if you want vdr to not run as root ### Define if you want vdr to not run as root:
#VDR_USER = vdr #VDR_USER = vdr
### Fallback for plugins with old makefiles:
ifdef PLUGIN
CFLAGS += -fPIC
CXXFLAGS += -fPIC
endif

159
Makefile
View File

@ -4,7 +4,7 @@
# See the main source file 'vdr.c' for copyright information and # See the main source file 'vdr.c' for copyright information and
# how to reach the author. # how to reach the author.
# #
# $Id: Makefile 2.47 2012/12/30 11:18:18 kls Exp $ # $Id: Makefile 2.48 2013/01/06 18:45:33 kls Exp $
.DELETE_ON_ERROR: .DELETE_ON_ERROR:
@ -14,45 +14,55 @@ CC ?= gcc
CFLAGS ?= -g -O3 -Wall CFLAGS ?= -g -O3 -Wall
CXX ?= g++ CXX ?= g++
CXXFLAGS ?= $(CFLAGS) -Werror=overloaded-virtual -Wno-parentheses CXXFLAGS ?= -g -O3 -Wall -Werror=overloaded-virtual -Wno-parentheses
CFLAGS += -fPIC
CDEFINES = -D_GNU_SOURCE CDEFINES = -D_GNU_SOURCE
CDEFINES += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE CDEFINES += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
# Directories:
CWD = .
LSIDIR = ./libsi
DESTDIR ?=
PREFIX ?= /usr/local
MANDIR ?= $(PREFIX)/share/man
BINDIR ?= $(PREFIX)/bin
INCDIR ?= $(CWD)/include
LOCDIR ?= $(CWD)/locale
LIBS = -ljpeg -lpthread -ldl -lcap -lrt $(shell pkg-config --libs freetype2 fontconfig) LIBS = -ljpeg -lpthread -ldl -lcap -lrt $(shell pkg-config --libs freetype2 fontconfig)
INCLUDES ?= $(shell pkg-config --cflags freetype2 fontconfig) INCLUDES ?= $(shell pkg-config --cflags freetype2 fontconfig)
PLUGINDIR= $(CWD)/PLUGINS # Directories:
LIBDIR = $(PLUGINDIR)/lib
# By default VDR requires only one single directory to operate: CWD ?= $(shell pwd)
VIDEODIR = /video LSIDIR ?= $(CWD)/libsi
# See Make.config.template if you want to build VDR according to the FHS ("File system Hierarchy Standard") PLUGINDIR ?= $(CWD)/PLUGINS
DESTDIR ?=
VIDEODIR ?= /srv/vdr/video
CONFDIR ?= /var/lib/vdr
CACHEDIR ?= /var/cache/vdr
PREFIX ?= /usr/local
BINDIR ?= $(PREFIX)/bin
INCDIR ?= $(PREFIX)/include
LIBDIR ?= $(PREFIX)/lib/vdr
LOCDIR ?= $(PREFIX)/share/locale
MANDIR ?= $(PREFIX)/share/man
PCDIR ?= $(PREFIX)/lib/pkgconfig
RESDIR ?= $(PREFIX)/share/vdr
# Source documentation
DOXYGEN ?= /usr/bin/doxygen DOXYGEN ?= /usr/bin/doxygen
DOXYFILE = Doxyfile DOXYFILE = Doxyfile
PCDIR ?= $(firstword $(subst :, , ${PKG_CONFIG_PATH}:$(shell pkg-config --variable=pc_path pkg-config):$(PREFIX)/lib/pkgconfig)) # User configuration
-include Make.config -include Make.config
# Mandatory compiler flags:
CFLAGS += -fPIC
CXXFLAGS += -fPIC
# Common include files:
ifdef DVBDIR ifdef DVBDIR
CFLAGS += -I$(DVBDIR) CINCLUDES += -I$(DVBDIR)
endif endif
UP3 = $(if $(findstring "$(LIBDIR)-$(LOCDIR)","$(CWD)/PLUGINS/lib-$(CWD)/locale"),../../../,) # Object files
SILIB = $(LSIDIR)/libsi.a SILIB = $(LSIDIR)/libsi.a
@ -64,7 +74,11 @@ OBJS = audio.o channels.o ci.o config.o cutter.o device.o diseqc.o dvbdevice.o d
timers.o tools.o transfer.o vdr.o videodir.o timers.o tools.o transfer.o vdr.o videodir.o
DEFINES += $(CDEFINES) DEFINES += $(CDEFINES)
INCLUDES += $(CINCLUDES)
ifdef HDRDIR
HDRDIR := -I$(HDRDIR)
endif
ifndef NO_KBD ifndef NO_KBD
DEFINES += -DREMOTE_KBD DEFINES += -DREMOTE_KBD
endif endif
@ -90,12 +104,6 @@ DEFINES += -DRESDIR=\"$(RESDIR)\"
DEFINES += -DPLUGINDIR=\"$(LIBDIR)\" DEFINES += -DPLUGINDIR=\"$(LIBDIR)\"
DEFINES += -DLOCDIR=\"$(LOCDIR)\" DEFINES += -DLOCDIR=\"$(LOCDIR)\"
# Default values for directories:
CONFDIRDEF = $(firstword $(CONFDIR) $(VIDEODIR))
CACHEDIRDEF = $(firstword $(CACHEDIR) $(VIDEODIR))
RESDIRDEF = $(firstword $(RESDIR) $(CONFDIRDEF))
# The version numbers of VDR and the plugin API (taken from VDR's "config.h"): # The version numbers of VDR and the plugin API (taken from VDR's "config.h"):
VDRVERSION = $(shell sed -ne '/define VDRVERSION/s/^.*"\(.*\)".*$$/\1/p' config.h) VDRVERSION = $(shell sed -ne '/define VDRVERSION/s/^.*"\(.*\)".*$$/\1/p' config.h)
@ -133,16 +141,16 @@ $(SILIB):
vdr.pc: vdr.pc:
@echo "bindir=$(BINDIR)" > $@ @echo "bindir=$(BINDIR)" > $@
@echo "mandir=$(MANDIR)" >> $@ @echo "mandir=$(MANDIR)" >> $@
@echo "configdir=$(CONFDIRDEF)" >> $@ @echo "configdir=$(CONFDIR)" >> $@
@echo "videodir=$(VIDEODIR)" >> $@ @echo "videodir=$(VIDEODIR)" >> $@
@echo "cachedir=$(CACHEDIRDEF)" >> $@ @echo "cachedir=$(CACHEDIR)" >> $@
@echo "resdir=$(RESDIRDEF)" >> $@ @echo "resdir=$(RESDIR)" >> $@
@echo "libdir=$(UP3)$(LIBDIR)" >> $@ @echo "libdir=$(LIBDIR)" >> $@
@echo "locdir=$(UP3)$(LOCDIR)" >> $@ @echo "locdir=$(LOCDIR)" >> $@
@echo "plgcfg=$(PLGCFG)" >> $@ @echo "plgcfg=$(PLGCFG)" >> $@
@echo "apiversion=$(APIVERSION)" >> $@ @echo "apiversion=$(APIVERSION)" >> $@
@echo "cflags=$(CFLAGS) $(CDEFINES) -I$(UP3)$(INCDIR)" >> $@ @echo "cflags=$(CFLAGS) $(CDEFINES) $(CINCLUDES) $(HDRDIR)" >> $@
@echo "cxxflags=$(CXXFLAGS) $(CDEFINES) -I$(UP3)$(INCDIR)" >> $@ @echo "cxxflags=$(CXXFLAGS) $(CDEFINES) $(CINCLUDES) $(HDRDIR)" >> $@
@echo "" >> $@ @echo "" >> $@
@echo "Name: VDR" >> $@ @echo "Name: VDR" >> $@
@echo "Description: Video Disk Recorder" >> $@ @echo "Description: Video Disk Recorder" >> $@
@ -155,6 +163,7 @@ vdr.pc:
PODIR = po PODIR = po
LOCALEDIR = locale LOCALEDIR = locale
I18Npo = $(wildcard $(PODIR)/*.po) I18Npo = $(wildcard $(PODIR)/*.po)
I18Nmo = $(addsuffix .mo, $(foreach file, $(I18Npo), $(basename $(file))))
I18Nmsgs = $(addprefix $(LOCALEDIR)/, $(addsuffix /LC_MESSAGES/vdr.mo, $(notdir $(foreach file, $(I18Npo), $(basename $(file)))))) I18Nmsgs = $(addprefix $(LOCALEDIR)/, $(addsuffix /LC_MESSAGES/vdr.mo, $(notdir $(foreach file, $(I18Npo), $(basename $(file))))))
I18Npot = $(PODIR)/vdr.pot I18Npot = $(PODIR)/vdr.pot
@ -169,15 +178,14 @@ $(I18Npot): $(wildcard *.c)
@touch $@ @touch $@
$(I18Nmsgs): $(LOCALEDIR)/%/LC_MESSAGES/vdr.mo: $(PODIR)/%.mo $(I18Nmsgs): $(LOCALEDIR)/%/LC_MESSAGES/vdr.mo: $(PODIR)/%.mo
@mkdir -p $(dir $@) install -D -m644 $< $@
cp $< $@
.PHONY: i18n .PHONY: i18n
i18n: $(I18Nmsgs) $(I18Npot) i18n: $(I18Nmsgs)
install-i18n: install-i18n:
@mkdir -p $(DESTDIR)$(LOCDIR) @mkdir -p $(DESTDIR)$(LOCDIR)
@(cd $(LOCALEDIR); cp -r --parents * $(DESTDIR)$(LOCDIR)) cp -r $(LOCALEDIR)/* $(DESTDIR)$(LOCDIR)
# The 'include' directory (for plugins): # The 'include' directory (for plugins):
@ -192,45 +200,54 @@ include-dir:
plugins: include-dir vdr.pc plugins: include-dir vdr.pc
@failed="";\ @failed="";\
noapiv="";\ noapiv="";\
oldmakefile="";\
for i in `ls $(PLUGINDIR)/src | grep -v '[^a-z0-9]'`; do\ for i in `ls $(PLUGINDIR)/src | grep -v '[^a-z0-9]'`; do\
echo "*** Plugin $$i:";\ echo "*** Plugin $$i:";\
# No APIVERSION: Skip\
if ! grep -q "\$$(LIBDIR)/.*\$$(APIVERSION)" "$(PLUGINDIR)/src/$$i/Makefile" ; then\ if ! grep -q "\$$(LIBDIR)/.*\$$(APIVERSION)" "$(PLUGINDIR)/src/$$i/Makefile" ; then\
echo "ERROR: plugin $$i doesn't honor APIVERSION - not compiled!";\ echo "ERROR: plugin $$i doesn't honor APIVERSION - not compiled!";\
noapiv="$$noapiv $$i";\ noapiv="$$noapiv $$i";\
continue;\ continue;\
fi;\ fi;\
newmakefile=`grep "PKGCFG" "$(PLUGINDIR)/src/$$i/Makefile"`;\ # Old Makefile\
if [ -z "$$newmakefile" ]; then\ if ! grep -q "PKGCFG" "$(PLUGINDIR)/src/$$i/Makefile" ; then\
echo "********************************************************************";\ echo "WARNING: plugin $$i is using an old Makefile!";\
echo "* Your plugin \"$$i\" is using an old Makefile!";\ oldmakefile="$$oldmakefile $$i";\
echo "* While this currently still works, it is strongly recommended";\ $(MAKE) --no-print-directory -C "$(PLUGINDIR)/src/$$i" CFLAGS="$(CFLAGS) $(CDEFINES) $(CINCLUDES)" CXXFLAGS="$(CXXFLAGS) $(CDEFINES) $(CINCLUDES)" LIBDIR="$(PLUGINDIR)/lib" VDRDIR="$(CWD)" all || failed="$$failed $$i";\
echo "* that you convert that Makefile to the new style used since";\ continue;\
echo "* VDR version 1.7.35. Support for old style Makefiles may be dropped";\
echo "* in future versions of VDR.";\
echo "********************************************************************";\
$(MAKE) --no-print-directory -C "$(PLUGINDIR)/src/$$i" CXXFLAGS="$(CXXFLAGS)" VDRDIR=$(UP3) LIBDIR=../../lib all || failed="$$failed $$i";\
else\
target=all;\
if [ "$(LIBDIR)" = "$(CWD)/PLUGINS/lib" ] && [ "$(LOCDIR)" = "$(CWD)/locale" ]; then\
target="install";\
fi;\ fi;\
includes=;\ # New Makefile\
if [ "$(INCDIR)" != "$(CWD)/include" ]; then\ INCLUDES="-I$(CWD)/include"\
includes="INCLUDES=-I$(UP3)/include";\ $(MAKE) --no-print-directory -C "$(PLUGINDIR)/src/$$i" VDRDIR="$(CWD)" || failed="$$failed $$i";\
if [ -n "$(LCLBLD)" ] ; then\
(cd $(PLUGINDIR)/src/$$i; for l in libvdr-*.so; do install $$l $(LIBDIR)/$$l.$(APIVERSION); done);\
if [ -d $(PLUGINDIR)/src/$$i/po ]; then\
for l in `ls $(PLUGINDIR)/src/$$i/po/*.mo`; do\
install -D -m644 $$l $(LOCDIR)/`basename $$l | cut -d. -f1`/LC_MESSAGES/vdr-$$i.mo;\
done;\
fi;\ fi;\
$(MAKE) --no-print-directory -C "$(PLUGINDIR)/src/$$i" VDRDIR=$(UP3) $$includes $$target || failed="$$failed $$i";\
fi;\ fi;\
done;\ done;\
# Conclusion\
if [ -n "$$noapiv" ] ; then echo; echo "*** plugins without APIVERSION:$$noapiv"; echo; fi;\ if [ -n "$$noapiv" ] ; then echo; echo "*** plugins without APIVERSION:$$noapiv"; echo; fi;\
if [ -n "$$oldmakefile" ] ; then\
echo; echo "*** plugins with old Makefile:$$oldmakefile"; echo;\
echo "**********************************************************************";\
echo "*** While this currently still works, it is strongly recommended";\
echo "*** that you convert old Makefiles to the new style used since";\
echo "*** VDR version 1.7.36. Support for old style Makefiles may be dropped";\
echo "*** in future versions of VDR.";\
echo "**********************************************************************";\
fi;\
if [ -n "$$failed" ] ; then echo; echo "*** failed plugins:$$failed"; echo; exit 1; fi if [ -n "$$failed" ] ; then echo; echo "*** failed plugins:$$failed"; echo; exit 1; fi
clean-plugins: clean-plugins:
@for i in `ls $(PLUGINDIR)/src | grep -v '[^a-z0-9]'`; do $(MAKE) --no-print-directory -C "$(PLUGINDIR)/src/$$i" clean; done @for i in `ls $(PLUGINDIR)/src | grep -v '[^a-z0-9]'`; do $(MAKE) --no-print-directory -C "$(PLUGINDIR)/src/$$i" clean; done
@-rm -f $(PLUGINDIR)/lib/lib*-*.so.$(APIVERSION) @-rm -f $(PLUGINDIR)/lib/lib*-*.so.$(APIVERSION)
# Install the files: # Install the files (note that 'install-pc' must be first!):
install: install-bin install-dirs install-conf install-doc install-plugins install-i18n install-includes install-pc install: install-pc install-bin install-dirs install-conf install-doc install-plugins install-i18n install-includes
# VDR binary: # VDR binary:
@ -242,13 +259,12 @@ install-bin: vdr
install-dirs: install-dirs:
@mkdir -p $(DESTDIR)$(VIDEODIR) @mkdir -p $(DESTDIR)$(VIDEODIR)
@mkdir -p $(DESTDIR)$(CONFDIRDEF) @mkdir -p $(DESTDIR)$(CONFDIR)
@mkdir -p $(DESTDIR)$(CACHEDIRDEF) @mkdir -p $(DESTDIR)$(CACHEDIR)
@mkdir -p $(DESTDIR)$(RESDIRDEF) @mkdir -p $(DESTDIR)$(RESDIR)
install-conf: install-conf:
@cp -n *.conf $(DESTDIR)$(CONFDIRDEF) @cp -n *.conf $(DESTDIR)$(CONFDIR)
# Documentation: # Documentation:
@ -261,9 +277,14 @@ install-doc:
# Plugins: # Plugins:
install-plugins: plugins install-plugins: plugins
@for i in `ls $(PLUGINDIR)/src | grep -v '[^a-z0-9]'`; do\ @-for i in `ls $(PLUGINDIR)/src | grep -v '[^a-z0-9]'`; do\
$(MAKE) --no-print-directory -C "$(PLUGINDIR)/src/$$i" VDRDIR=$(UP3) DESTDIR=$(DESTDIR) install;\ $(MAKE) --no-print-directory -C "$(PLUGINDIR)/src/$$i" VDRDIR=$(CWD) DESTDIR=$(DESTDIR) install;\
done done
@if [ -d $(PLUGINDIR)/lib ] ; then\
for i in `find $(PLUGINDIR)/lib -name 'lib*-*.so.$(APIVERSION)'`; do\
install -D $$i $(DESTDIR)$(LIBDIR);\
done;\
fi
# Includes: # Includes:
@ -274,9 +295,9 @@ install-includes: include-dir
# pkg-config file: # pkg-config file:
install-pc: vdr.pc install-pc: vdr.pc
if [ -n "$(PCDIR)" ] ; then \ if [ -n "$(PCDIR)" ] ; then\
mkdir -p $(DESTDIR)$(PCDIR) ; \ mkdir -p $(DESTDIR)$(PCDIR) ;\
cp vdr.pc $(DESTDIR)$(PCDIR) ; \ cp vdr.pc $(DESTDIR)$(PCDIR) ;\
fi fi
# Source documentation: # Source documentation:

View File

@ -1,7 +1,7 @@
# #
# Makefile for a Video Disk Recorder plugin # Makefile for a Video Disk Recorder plugin
# #
# $Id: Makefile 1.18 2012/12/29 10:28:45 kls Exp $ # $Id: Makefile 1.19 2013/01/06 10:19:53 kls Exp $
# The official name of this plugin. # The official name of this plugin.
# This name will be used in the '-P...' option of VDR to load the plugin. # This name will be used in the '-P...' option of VDR to load the plugin.
@ -17,7 +17,7 @@ VERSION = $(shell grep 'static const char \*VERSION *=' $(PLUGIN).c | awk '{ pri
# Use package data if installed...otherwise assume we're under the VDR source directory: # 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)) PKGCFG = $(if $(VDRDIR),$(shell pkg-config --variable=$(1) $(VDRDIR)/vdr.pc),$(shell pkg-config --variable=$(1) vdr || pkg-config --variable=$(1) ../../../vdr.pc))
LIBDIR = $(DESTDIR)$(call PKGCFG,libdir) LIBDIR = $(call PKGCFG,libdir)
PLGCFG = $(call PKGCFG,plgcfg) PLGCFG = $(call PKGCFG,plgcfg)
# #
TMPDIR ?= /tmp TMPDIR ?= /tmp
@ -68,7 +68,7 @@ all: $(SOFILE)
MAKEDEP = $(CXX) -MM -MG MAKEDEP = $(CXX) -MM -MG
DEPFILE = .dependencies DEPFILE = .dependencies
$(DEPFILE): Makefile $(DEPFILE): Makefile
@$(MAKEDEP) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@ @$(MAKEDEP) $(CXXFLAGS) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@
-include $(DEPFILE) -include $(DEPFILE)
@ -78,7 +78,7 @@ $(SOFILE): $(OBJS)
$(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(OBJS) -o $@ $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(OBJS) -o $@
install-lib: $(SOFILE) install-lib: $(SOFILE)
install -D $^ $(LIBDIR)/$^.$(APIVERSION) install -D $^ $(DESTDIR)$(LIBDIR)/$^.$(APIVERSION)
install: install-lib install: install-lib

View File

@ -1,7 +1,7 @@
# #
# Makefile for a Video Disk Recorder plugin # Makefile for a Video Disk Recorder plugin
# #
# $Id: Makefile 1.11 2012/12/29 10:28:58 kls Exp $ # $Id: Makefile 1.12 2013/01/06 10:19:53 kls Exp $
# The official name of this plugin. # The official name of this plugin.
# This name will be used in the '-P...' option of VDR to load the plugin. # This name will be used in the '-P...' option of VDR to load the plugin.
@ -17,7 +17,7 @@ VERSION = $(shell grep 'static const char \*VERSION *=' $(PLUGIN).c | awk '{ pri
# Use package data if installed...otherwise assume we're under the VDR source directory: # 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)) PKGCFG = $(if $(VDRDIR),$(shell pkg-config --variable=$(1) $(VDRDIR)/vdr.pc),$(shell pkg-config --variable=$(1) vdr || pkg-config --variable=$(1) ../../../vdr.pc))
LIBDIR = $(DESTDIR)$(call PKGCFG,libdir) LIBDIR = $(call PKGCFG,libdir)
PLGCFG = $(call PKGCFG,plgcfg) PLGCFG = $(call PKGCFG,plgcfg)
# #
TMPDIR ?= /tmp TMPDIR ?= /tmp
@ -68,7 +68,7 @@ all: $(SOFILE)
MAKEDEP = $(CXX) -MM -MG MAKEDEP = $(CXX) -MM -MG
DEPFILE = .dependencies DEPFILE = .dependencies
$(DEPFILE): Makefile $(DEPFILE): Makefile
@$(MAKEDEP) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@ @$(MAKEDEP) $(CXXFLAGS) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@
-include $(DEPFILE) -include $(DEPFILE)
@ -78,7 +78,7 @@ $(SOFILE): $(OBJS)
$(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(OBJS) -o $@ $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(OBJS) -o $@
install-lib: $(SOFILE) install-lib: $(SOFILE)
install -D $^ $(LIBDIR)/$^.$(APIVERSION) install -D $^ $(DESTDIR)$(LIBDIR)/$^.$(APIVERSION)
install: install-lib install: install-lib

View File

@ -1,7 +1,7 @@
# #
# Makefile for a Video Disk Recorder plugin # Makefile for a Video Disk Recorder plugin
# #
# $Id: Makefile 2.16 2012/12/28 10:09:20 kls Exp $ # $Id: Makefile 2.17 2013/01/06 10:19:53 kls Exp $
# The official name of this plugin. # The official name of this plugin.
# This name will be used in the '-P...' option of VDR to load the plugin. # This name will be used in the '-P...' option of VDR to load the plugin.
@ -17,8 +17,8 @@ VERSION = $(shell grep 'static const char \*VERSION *=' $(PLUGIN).c | awk '{ pri
# Use package data if installed...otherwise assume we're under the VDR source directory: # 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)) PKGCFG = $(if $(VDRDIR),$(shell pkg-config --variable=$(1) $(VDRDIR)/vdr.pc),$(shell pkg-config --variable=$(1) vdr || pkg-config --variable=$(1) ../../../vdr.pc))
LIBDIR = $(DESTDIR)$(call PKGCFG,libdir) LIBDIR = $(call PKGCFG,libdir)
LOCDIR = $(DESTDIR)$(call PKGCFG,locdir) LOCDIR = $(call PKGCFG,locdir)
PLGCFG = $(call PKGCFG,plgcfg) PLGCFG = $(call PKGCFG,plgcfg)
# #
TMPDIR ?= /tmp TMPDIR ?= /tmp
@ -69,7 +69,7 @@ all: $(SOFILE) i18n
MAKEDEP = $(CXX) -MM -MG MAKEDEP = $(CXX) -MM -MG
DEPFILE = .dependencies DEPFILE = .dependencies
$(DEPFILE): Makefile $(DEPFILE): Makefile
@$(MAKEDEP) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@ @$(MAKEDEP) $(CXXFLAGS) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@
-include $(DEPFILE) -include $(DEPFILE)
@ -78,7 +78,7 @@ $(DEPFILE): Makefile
PODIR = po PODIR = po
I18Npo = $(wildcard $(PODIR)/*.po) I18Npo = $(wildcard $(PODIR)/*.po)
I18Nmo = $(addsuffix .mo, $(foreach file, $(I18Npo), $(basename $(file)))) I18Nmo = $(addsuffix .mo, $(foreach file, $(I18Npo), $(basename $(file))))
I18Nmsgs = $(addprefix $(LOCDIR)/, $(addsuffix /LC_MESSAGES/vdr-$(PLUGIN).mo, $(notdir $(foreach file, $(I18Npo), $(basename $(file)))))) I18Nmsgs = $(addprefix $(DESTDIR)$(LOCDIR)/, $(addsuffix /LC_MESSAGES/vdr-$(PLUGIN).mo, $(notdir $(foreach file, $(I18Npo), $(basename $(file))))))
I18Npot = $(PODIR)/$(PLUGIN).pot I18Npot = $(PODIR)/$(PLUGIN).pot
%.mo: %.po %.mo: %.po
@ -91,7 +91,7 @@ $(I18Npot): $(wildcard *.c)
msgmerge -U --no-wrap --no-location --backup=none -q -N $@ $< msgmerge -U --no-wrap --no-location --backup=none -q -N $@ $<
@touch $@ @touch $@
$(I18Nmsgs): $(LOCDIR)/%/LC_MESSAGES/vdr-$(PLUGIN).mo: $(PODIR)/%.mo $(I18Nmsgs): $(DESTDIR)$(LOCDIR)/%/LC_MESSAGES/vdr-$(PLUGIN).mo: $(PODIR)/%.mo
install -D -m644 $< $@ install -D -m644 $< $@
.PHONY: i18n .PHONY: i18n
@ -105,7 +105,7 @@ $(SOFILE): $(OBJS)
$(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(OBJS) -o $@ $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(OBJS) -o $@
install-lib: $(SOFILE) install-lib: $(SOFILE)
install -D $^ $(LIBDIR)/$^.$(APIVERSION) install -D $^ $(DESTDIR)$(LIBDIR)/$^.$(APIVERSION)
install: install-lib install-i18n install: install-lib install-i18n

View File

@ -1,7 +1,7 @@
# #
# Makefile for a Video Disk Recorder plugin # Makefile for a Video Disk Recorder plugin
# #
# $Id: Makefile 2.14 2012/12/29 10:29:04 kls Exp $ # $Id: Makefile 2.15 2013/01/06 10:19:53 kls Exp $
# The official name of this plugin. # The official name of this plugin.
# This name will be used in the '-P...' option of VDR to load the plugin. # This name will be used in the '-P...' option of VDR to load the plugin.
@ -17,7 +17,7 @@ VERSION = $(shell grep 'static const char \*VERSION *=' $(PLUGIN).c | awk '{ pri
# Use package data if installed...otherwise assume we're under the VDR source directory: # 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)) PKGCFG = $(if $(VDRDIR),$(shell pkg-config --variable=$(1) $(VDRDIR)/vdr.pc),$(shell pkg-config --variable=$(1) vdr || pkg-config --variable=$(1) ../../../vdr.pc))
LIBDIR = $(DESTDIR)$(call PKGCFG,libdir) LIBDIR = $(call PKGCFG,libdir)
PLGCFG = $(call PKGCFG,plgcfg) PLGCFG = $(call PKGCFG,plgcfg)
# #
TMPDIR ?= /tmp TMPDIR ?= /tmp
@ -68,7 +68,7 @@ all: $(SOFILE)
MAKEDEP = $(CXX) -MM -MG MAKEDEP = $(CXX) -MM -MG
DEPFILE = .dependencies DEPFILE = .dependencies
$(DEPFILE): Makefile $(DEPFILE): Makefile
@$(MAKEDEP) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@ @$(MAKEDEP) $(CXXFLAGS) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@
-include $(DEPFILE) -include $(DEPFILE)
@ -78,7 +78,7 @@ $(SOFILE): $(OBJS)
$(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(OBJS) -o $@ $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(OBJS) -o $@
install-lib: $(SOFILE) install-lib: $(SOFILE)
install -D $^ $(LIBDIR)/$^.$(APIVERSION) install -D $^ $(DESTDIR)$(LIBDIR)/$^.$(APIVERSION)
install: install-lib install: install-lib

View File

@ -1,7 +1,7 @@
# #
# Makefile for a Video Disk Recorder plugin # Makefile for a Video Disk Recorder plugin
# #
# $Id: Makefile 2.16 2012/12/28 10:09:29 kls Exp $ # $Id: Makefile 2.17 2013/01/06 10:19:53 kls Exp $
# The official name of this plugin. # The official name of this plugin.
# This name will be used in the '-P...' option of VDR to load the plugin. # This name will be used in the '-P...' option of VDR to load the plugin.
@ -17,8 +17,8 @@ VERSION = $(shell grep 'static const char \*VERSION *=' $(PLUGIN).c | awk '{ pri
# Use package data if installed...otherwise assume we're under the VDR source directory: # 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)) PKGCFG = $(if $(VDRDIR),$(shell pkg-config --variable=$(1) $(VDRDIR)/vdr.pc),$(shell pkg-config --variable=$(1) vdr || pkg-config --variable=$(1) ../../../vdr.pc))
LIBDIR = $(DESTDIR)$(call PKGCFG,libdir) LIBDIR = $(call PKGCFG,libdir)
LOCDIR = $(DESTDIR)$(call PKGCFG,locdir) LOCDIR = $(call PKGCFG,locdir)
PLGCFG = $(call PKGCFG,plgcfg) PLGCFG = $(call PKGCFG,plgcfg)
# #
TMPDIR ?= /tmp TMPDIR ?= /tmp
@ -69,7 +69,7 @@ all: $(SOFILE) i18n
MAKEDEP = $(CXX) -MM -MG MAKEDEP = $(CXX) -MM -MG
DEPFILE = .dependencies DEPFILE = .dependencies
$(DEPFILE): Makefile $(DEPFILE): Makefile
@$(MAKEDEP) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@ @$(MAKEDEP) $(CXXFLAGS) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@
-include $(DEPFILE) -include $(DEPFILE)
@ -78,7 +78,7 @@ $(DEPFILE): Makefile
PODIR = po PODIR = po
I18Npo = $(wildcard $(PODIR)/*.po) I18Npo = $(wildcard $(PODIR)/*.po)
I18Nmo = $(addsuffix .mo, $(foreach file, $(I18Npo), $(basename $(file)))) I18Nmo = $(addsuffix .mo, $(foreach file, $(I18Npo), $(basename $(file))))
I18Nmsgs = $(addprefix $(LOCDIR)/, $(addsuffix /LC_MESSAGES/vdr-$(PLUGIN).mo, $(notdir $(foreach file, $(I18Npo), $(basename $(file)))))) I18Nmsgs = $(addprefix $(DESTDIR)$(LOCDIR)/, $(addsuffix /LC_MESSAGES/vdr-$(PLUGIN).mo, $(notdir $(foreach file, $(I18Npo), $(basename $(file))))))
I18Npot = $(PODIR)/$(PLUGIN).pot I18Npot = $(PODIR)/$(PLUGIN).pot
%.mo: %.po %.mo: %.po
@ -91,7 +91,7 @@ $(I18Npot): $(wildcard *.c)
msgmerge -U --no-wrap --no-location --backup=none -q -N $@ $< msgmerge -U --no-wrap --no-location --backup=none -q -N $@ $<
@touch $@ @touch $@
$(I18Nmsgs): $(LOCDIR)/%/LC_MESSAGES/vdr-$(PLUGIN).mo: $(PODIR)/%.mo $(I18Nmsgs): $(DESTDIR)$(LOCDIR)/%/LC_MESSAGES/vdr-$(PLUGIN).mo: $(PODIR)/%.mo
install -D -m644 $< $@ install -D -m644 $< $@
.PHONY: i18n .PHONY: i18n
@ -105,7 +105,7 @@ $(SOFILE): $(OBJS)
$(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(OBJS) -o $@ $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(OBJS) -o $@
install-lib: $(SOFILE) install-lib: $(SOFILE)
install -D $^ $(LIBDIR)/$^.$(APIVERSION) install -D $^ $(DESTDIR)$(LIBDIR)/$^.$(APIVERSION)
install: install-lib install-i18n install: install-lib install-i18n

View File

@ -1,7 +1,7 @@
# #
# Makefile for a Video Disk Recorder plugin # Makefile for a Video Disk Recorder plugin
# #
# $Id: Makefile 1.11 2012/12/29 10:29:09 kls Exp $ # $Id: Makefile 1.12 2013/01/06 10:19:53 kls Exp $
# The official name of this plugin. # The official name of this plugin.
# This name will be used in the '-P...' option of VDR to load the plugin. # This name will be used in the '-P...' option of VDR to load the plugin.
@ -17,7 +17,7 @@ VERSION = $(shell grep 'static const char \*VERSION *=' $(PLUGIN).c | awk '{ pri
# Use package data if installed...otherwise assume we're under the VDR source directory: # 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)) PKGCFG = $(if $(VDRDIR),$(shell pkg-config --variable=$(1) $(VDRDIR)/vdr.pc),$(shell pkg-config --variable=$(1) vdr || pkg-config --variable=$(1) ../../../vdr.pc))
LIBDIR = $(DESTDIR)$(call PKGCFG,libdir) LIBDIR = $(call PKGCFG,libdir)
PLGCFG = $(call PKGCFG,plgcfg) PLGCFG = $(call PKGCFG,plgcfg)
# #
TMPDIR ?= /tmp TMPDIR ?= /tmp
@ -68,7 +68,7 @@ all: $(SOFILE)
MAKEDEP = $(CXX) -MM -MG MAKEDEP = $(CXX) -MM -MG
DEPFILE = .dependencies DEPFILE = .dependencies
$(DEPFILE): Makefile $(DEPFILE): Makefile
@$(MAKEDEP) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@ @$(MAKEDEP) $(CXXFLAGS) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@
-include $(DEPFILE) -include $(DEPFILE)
@ -78,7 +78,7 @@ $(SOFILE): $(OBJS)
$(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(OBJS) -o $@ $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(OBJS) -o $@
install-lib: $(SOFILE) install-lib: $(SOFILE)
install -D $^ $(LIBDIR)/$^.$(APIVERSION) install -D $^ $(DESTDIR)$(LIBDIR)/$^.$(APIVERSION)
install: install-lib install: install-lib

View File

@ -1,7 +1,7 @@
# #
# Makefile for a Video Disk Recorder plugin # Makefile for a Video Disk Recorder plugin
# #
# $Id: Makefile 2.12 2012/12/29 10:29:15 kls Exp $ # $Id: Makefile 2.13 2013/01/06 10:19:53 kls Exp $
# The official name of this plugin. # The official name of this plugin.
# This name will be used in the '-P...' option of VDR to load the plugin. # This name will be used in the '-P...' option of VDR to load the plugin.
@ -18,7 +18,7 @@ VERSION = $(shell grep 'static const char \*VERSION *=' $(PLUGIN1).c | awk '{ pr
# Use package data if installed...otherwise assume we're under the VDR source directory: # 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)) PKGCFG = $(if $(VDRDIR),$(shell pkg-config --variable=$(1) $(VDRDIR)/vdr.pc),$(shell pkg-config --variable=$(1) vdr || pkg-config --variable=$(1) ../../../vdr.pc))
LIBDIR = $(DESTDIR)$(call PKGCFG,libdir) LIBDIR = $(call PKGCFG,libdir)
PLGCFG = $(call PKGCFG,plgcfg) PLGCFG = $(call PKGCFG,plgcfg)
# #
TMPDIR ?= /tmp TMPDIR ?= /tmp
@ -65,7 +65,7 @@ all: libvdr-$(PLUGIN1).so libvdr-$(PLUGIN2).so
MAKEDEP = $(CXX) -MM -MG MAKEDEP = $(CXX) -MM -MG
DEPFILE = .dependencies DEPFILE = .dependencies
$(DEPFILE): Makefile $(DEPFILE): Makefile
@$(MAKEDEP) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@ @$(MAKEDEP) $(CXXFLAGS) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@
-include $(DEPFILE) -include $(DEPFILE)
@ -78,8 +78,8 @@ libvdr-$(PLUGIN2).so: $(PLUGIN2).o
$(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(PLUGIN2).o -o $@ $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(PLUGIN2).o -o $@
install-lib: libvdr-$(PLUGIN1).so libvdr-$(PLUGIN2).so install-lib: libvdr-$(PLUGIN1).so libvdr-$(PLUGIN2).so
install -D libvdr-$(PLUGIN1).so $(LIBDIR)/libvdr-$(PLUGIN1).so.$(APIVERSION) install -D libvdr-$(PLUGIN1).so $(DESTDIR)$(LIBDIR)/libvdr-$(PLUGIN1).so.$(APIVERSION)
install -D libvdr-$(PLUGIN2).so $(LIBDIR)/libvdr-$(PLUGIN2).so.$(APIVERSION) install -D libvdr-$(PLUGIN2).so $(DESTDIR)$(LIBDIR)/libvdr-$(PLUGIN2).so.$(APIVERSION)
install: install-lib install: install-lib

View File

@ -1,7 +1,7 @@
# #
# Makefile for a Video Disk Recorder plugin # Makefile for a Video Disk Recorder plugin
# #
# $Id: Makefile 2.16 2012/12/28 10:09:36 kls Exp $ # $Id: Makefile 2.17 2013/01/06 10:19:53 kls Exp $
# The official name of this plugin. # The official name of this plugin.
# This name will be used in the '-P...' option of VDR to load the plugin. # This name will be used in the '-P...' option of VDR to load the plugin.
@ -17,8 +17,8 @@ VERSION = $(shell grep 'static const char \*VERSION *=' $(PLUGIN).c | awk '{ pri
# Use package data if installed...otherwise assume we're under the VDR source directory: # 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)) PKGCFG = $(if $(VDRDIR),$(shell pkg-config --variable=$(1) $(VDRDIR)/vdr.pc),$(shell pkg-config --variable=$(1) vdr || pkg-config --variable=$(1) ../../../vdr.pc))
LIBDIR = $(DESTDIR)$(call PKGCFG,libdir) LIBDIR = $(call PKGCFG,libdir)
LOCDIR = $(DESTDIR)$(call PKGCFG,locdir) LOCDIR = $(call PKGCFG,locdir)
PLGCFG = $(call PKGCFG,plgcfg) PLGCFG = $(call PKGCFG,plgcfg)
# #
TMPDIR ?= /tmp TMPDIR ?= /tmp
@ -69,7 +69,7 @@ all: $(SOFILE) i18n
MAKEDEP = $(CXX) -MM -MG MAKEDEP = $(CXX) -MM -MG
DEPFILE = .dependencies DEPFILE = .dependencies
$(DEPFILE): Makefile $(DEPFILE): Makefile
@$(MAKEDEP) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@ @$(MAKEDEP) $(CXXFLAGS) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@
-include $(DEPFILE) -include $(DEPFILE)
@ -78,7 +78,7 @@ $(DEPFILE): Makefile
PODIR = po PODIR = po
I18Npo = $(wildcard $(PODIR)/*.po) I18Npo = $(wildcard $(PODIR)/*.po)
I18Nmo = $(addsuffix .mo, $(foreach file, $(I18Npo), $(basename $(file)))) I18Nmo = $(addsuffix .mo, $(foreach file, $(I18Npo), $(basename $(file))))
I18Nmsgs = $(addprefix $(LOCDIR)/, $(addsuffix /LC_MESSAGES/vdr-$(PLUGIN).mo, $(notdir $(foreach file, $(I18Npo), $(basename $(file)))))) I18Nmsgs = $(addprefix $(DESTDIR)$(LOCDIR)/, $(addsuffix /LC_MESSAGES/vdr-$(PLUGIN).mo, $(notdir $(foreach file, $(I18Npo), $(basename $(file))))))
I18Npot = $(PODIR)/$(PLUGIN).pot I18Npot = $(PODIR)/$(PLUGIN).pot
%.mo: %.po %.mo: %.po
@ -91,7 +91,7 @@ $(I18Npot): $(wildcard *.c)
msgmerge -U --no-wrap --no-location --backup=none -q -N $@ $< msgmerge -U --no-wrap --no-location --backup=none -q -N $@ $<
@touch $@ @touch $@
$(I18Nmsgs): $(LOCDIR)/%/LC_MESSAGES/vdr-$(PLUGIN).mo: $(PODIR)/%.mo $(I18Nmsgs): $(DESTDIR)$(LOCDIR)/%/LC_MESSAGES/vdr-$(PLUGIN).mo: $(PODIR)/%.mo
install -D -m644 $< $@ install -D -m644 $< $@
.PHONY: i18n .PHONY: i18n
@ -105,7 +105,7 @@ $(SOFILE): $(OBJS)
$(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(OBJS) -lncursesw -o $@ $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(OBJS) -lncursesw -o $@
install-lib: $(SOFILE) install-lib: $(SOFILE)
install -D $^ $(LIBDIR)/$^.$(APIVERSION) install -D $^ $(DESTDIR)$(LIBDIR)/$^.$(APIVERSION)
install: install-lib install-i18n install: install-lib install-i18n

View File

@ -1,7 +1,7 @@
# #
# Makefile for a Video Disk Recorder plugin # Makefile for a Video Disk Recorder plugin
# #
# $Id: Makefile 2.13 2012/12/29 10:29:20 kls Exp $ # $Id: Makefile 2.14 2013/01/06 10:19:53 kls Exp $
# The official name of this plugin. # The official name of this plugin.
# This name will be used in the '-P...' option of VDR to load the plugin. # This name will be used in the '-P...' option of VDR to load the plugin.
@ -17,7 +17,7 @@ VERSION = $(shell grep 'static const char \*VERSION *=' $(PLUGIN).c | awk '{ pri
# Use package data if installed...otherwise assume we're under the VDR source directory: # 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)) PKGCFG = $(if $(VDRDIR),$(shell pkg-config --variable=$(1) $(VDRDIR)/vdr.pc),$(shell pkg-config --variable=$(1) vdr || pkg-config --variable=$(1) ../../../vdr.pc))
LIBDIR = $(DESTDIR)$(call PKGCFG,libdir) LIBDIR = $(call PKGCFG,libdir)
PLGCFG = $(call PKGCFG,plgcfg) PLGCFG = $(call PKGCFG,plgcfg)
# #
TMPDIR ?= /tmp TMPDIR ?= /tmp
@ -68,7 +68,7 @@ all: $(SOFILE)
MAKEDEP = $(CXX) -MM -MG MAKEDEP = $(CXX) -MM -MG
DEPFILE = .dependencies DEPFILE = .dependencies
$(DEPFILE): Makefile $(DEPFILE): Makefile
@$(MAKEDEP) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@ @$(MAKEDEP) $(CXXFLAGS) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@
-include $(DEPFILE) -include $(DEPFILE)
@ -78,7 +78,7 @@ $(SOFILE): $(OBJS)
$(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(OBJS) -o $@ $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(OBJS) -o $@
install-lib: $(SOFILE) install-lib: $(SOFILE)
install -D $^ $(LIBDIR)/$^.$(APIVERSION) install -D $^ $(DESTDIR)$(LIBDIR)/$^.$(APIVERSION)
install: install-lib install: install-lib

View File

@ -1,7 +1,7 @@
# #
# Makefile for a Video Disk Recorder plugin # Makefile for a Video Disk Recorder plugin
# #
# $Id: Makefile 2.13 2012/12/29 10:29:24 kls Exp $ # $Id: Makefile 2.14 2013/01/06 10:19:53 kls Exp $
# The official name of this plugin. # The official name of this plugin.
# This name will be used in the '-P...' option of VDR to load the plugin. # This name will be used in the '-P...' option of VDR to load the plugin.
@ -17,7 +17,7 @@ VERSION = $(shell grep 'static const char \*VERSION *=' $(PLUGIN).c | awk '{ pri
# Use package data if installed...otherwise assume we're under the VDR source directory: # 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)) PKGCFG = $(if $(VDRDIR),$(shell pkg-config --variable=$(1) $(VDRDIR)/vdr.pc),$(shell pkg-config --variable=$(1) vdr || pkg-config --variable=$(1) ../../../vdr.pc))
LIBDIR = $(DESTDIR)$(call PKGCFG,libdir) LIBDIR = $(call PKGCFG,libdir)
PLGCFG = $(call PKGCFG,plgcfg) PLGCFG = $(call PKGCFG,plgcfg)
# #
TMPDIR ?= /tmp TMPDIR ?= /tmp
@ -68,7 +68,7 @@ all: $(SOFILE)
MAKEDEP = $(CXX) -MM -MG MAKEDEP = $(CXX) -MM -MG
DEPFILE = .dependencies DEPFILE = .dependencies
$(DEPFILE): Makefile $(DEPFILE): Makefile
@$(MAKEDEP) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@ @$(MAKEDEP) $(CXXFLAGS) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@
-include $(DEPFILE) -include $(DEPFILE)
@ -78,7 +78,7 @@ $(SOFILE): $(OBJS)
$(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(OBJS) -o $@ $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(OBJS) -o $@
install-lib: $(SOFILE) install-lib: $(SOFILE)
install -D $^ $(LIBDIR)/$^.$(APIVERSION) install -D $^ $(DESTDIR)$(LIBDIR)/$^.$(APIVERSION)
install: install-lib install: install-lib

View File

@ -12,7 +12,7 @@
# See the main source file 'vdr.c' for copyright information and # See the main source file 'vdr.c' for copyright information and
# how to reach the author. # how to reach the author.
# #
# $Id: newplugin 2.15 2012/12/28 09:52:29 kls Exp $ # $Id: newplugin 2.16 2013/01/06 12:22:25 kls Exp $
$PLUGIN_NAME = $ARGV[0] || die "Usage: newplugin <name>\n"; $PLUGIN_NAME = $ARGV[0] || die "Usage: newplugin <name>\n";
@ -76,8 +76,8 @@ VERSION = \$(shell grep 'static const char \\*VERSION *=' \$(PLUGIN).c | awk '{
# Use package data if installed...otherwise assume we're under the VDR source directory: # 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)) PKGCFG = \$(if \$(VDRDIR),\$(shell pkg-config --variable=\$(1) \$(VDRDIR)/vdr.pc),\$(shell pkg-config --variable=\$(1) vdr || pkg-config --variable=\$(1) ../../../vdr.pc))
LIBDIR = \$(DESTDIR)\$(call PKGCFG,libdir) LIBDIR = \$(call PKGCFG,libdir)
LOCDIR = \$(DESTDIR)\$(call PKGCFG,locdir) LOCDIR = \$(call PKGCFG,locdir)
PLGCFG = \$(call PKGCFG,plgcfg) PLGCFG = \$(call PKGCFG,plgcfg)
# #
TMPDIR ?= /tmp TMPDIR ?= /tmp
@ -128,7 +128,7 @@ all: \$(SOFILE) i18n
MAKEDEP = \$(CXX) -MM -MG MAKEDEP = \$(CXX) -MM -MG
DEPFILE = .dependencies DEPFILE = .dependencies
\$(DEPFILE): Makefile \$(DEPFILE): Makefile
\@\$(MAKEDEP) \$(DEFINES) \$(INCLUDES) \$(OBJS:%.o=%.c) > \$\@ \@\$(MAKEDEP) \$(CXXFLAGS) \$(DEFINES) \$(INCLUDES) \$(OBJS:%.o=%.c) > \$\@
-include \$(DEPFILE) -include \$(DEPFILE)
@ -137,7 +137,7 @@ DEPFILE = .dependencies
PODIR = po PODIR = po
I18Npo = \$(wildcard \$(PODIR)/*.po) I18Npo = \$(wildcard \$(PODIR)/*.po)
I18Nmo = \$(addsuffix .mo, \$(foreach file, \$(I18Npo), \$(basename \$(file)))) I18Nmo = \$(addsuffix .mo, \$(foreach file, \$(I18Npo), \$(basename \$(file))))
I18Nmsgs = \$(addprefix \$(LOCDIR)/, \$(addsuffix /LC_MESSAGES/vdr-\$(PLUGIN).mo, \$(notdir \$(foreach file, \$(I18Npo), \$(basename \$(file)))))) I18Nmsgs = \$(addprefix \$(DESTDIR)\$(LOCDIR)/, \$(addsuffix /LC_MESSAGES/vdr-\$(PLUGIN).mo, \$(notdir \$(foreach file, \$(I18Npo), \$(basename \$(file))))))
I18Npot = \$(PODIR)/\$(PLUGIN).pot I18Npot = \$(PODIR)/\$(PLUGIN).pot
%.mo: %.po %.mo: %.po
@ -150,7 +150,7 @@ I18Npot = \$(PODIR)/\$(PLUGIN).pot
msgmerge -U --no-wrap --no-location --backup=none -q -N \$\@ \$< msgmerge -U --no-wrap --no-location --backup=none -q -N \$\@ \$<
\@touch \$\@ \@touch \$\@
\$(I18Nmsgs): \$(LOCDIR)/%/LC_MESSAGES/vdr-\$(PLUGIN).mo: \$(PODIR)/%.mo \$(I18Nmsgs): \$(DESTDIR)\$(LOCDIR)/%/LC_MESSAGES/vdr-\$(PLUGIN).mo: \$(PODIR)/%.mo
install -D -m644 \$< \$\@ install -D -m644 \$< \$\@
.PHONY: i18n .PHONY: i18n
@ -164,7 +164,7 @@ install-i18n: \$(I18Nmsgs)
\$(CXX) \$(CXXFLAGS) \$(LDFLAGS) -shared \$(OBJS) -o \$\@ \$(CXX) \$(CXXFLAGS) \$(LDFLAGS) -shared \$(OBJS) -o \$\@
install-lib: \$(SOFILE) install-lib: \$(SOFILE)
install -D \$^ \$(LIBDIR)/\$^.\$(APIVERSION) install -D \$^ \$(DESTDIR)\$(LIBDIR)/\$^.\$(APIVERSION)
install: install-lib install-i18n install: install-lib install-i18n