mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
The plugin Makefiles now have a separate 'install' target
This commit is contained in:
parent
4132f5e745
commit
62daedf95e
@ -2811,6 +2811,7 @@ Christopher Reimer <reimer.christopher@freenet.de>
|
||||
for contributing to a patch that implements FHS support
|
||||
for suggesting to remove some redundancy in the Makefile/Make.global/Make.config
|
||||
mechanism
|
||||
for suggesting to give the plugin Makefiles a separate 'install' target
|
||||
|
||||
Stefan Huskamp <coca_cola1@gmx.de>
|
||||
for suggesting to make entering characters via the number keys
|
||||
|
19
HISTORY
19
HISTORY
@ -7417,7 +7417,7 @@ Video Disk Recorder Revision History
|
||||
plugins to display these items in a more elaborate way than just a simple line of
|
||||
text.
|
||||
|
||||
2012-12-19: Version 1.7.34
|
||||
2012-12-21: Version 1.7.34
|
||||
|
||||
- Changed the type of the TimerMatch parameter in cSkinDisplayMenu::SetItemEvent() from
|
||||
'int' to 'eTimerEvent' (reported by Christoph Haubrich).
|
||||
@ -7433,6 +7433,19 @@ Video Disk Recorder Revision History
|
||||
by Christopher Reimer). The file Make.global is no longer used, and plugin Makefiles
|
||||
don't include the file Make.config any more. Instead they now retrieve all necessary
|
||||
information through calls to pkg-config.
|
||||
Plugin authors (and users) can apply the patch from
|
||||
- The plugin Makefiles now have a separate 'install' target (suggested by Christopher
|
||||
Reimer). In order to still allow the normal building of VDR (with all plugins in its
|
||||
./PLUGINS/src subdirectory, the plugin libraries in ./PLUGINS/lib and the i18n files in
|
||||
./locale) the VDR Makefile checks the settings of LIBDIR and LOCDIR when building the
|
||||
plugins from within the VDR source directory. If these macros have their default values,
|
||||
then the 'install' targets of the plugins' Makefiles are called. Otherwise the 'all'
|
||||
targets are called and the plugins are merely built, and will have to be installed by a
|
||||
call to 'make install-plugins'. This now also allows a user to copy a plugin source to
|
||||
any directory, change into that directory and do 'make' and 'make install' to have the
|
||||
plugin installed to wherever the local installation of VDR expects them.
|
||||
- Due to the changes to the plugin Makefiles, existing plugins will not build with this
|
||||
version of VDR any more. You can either use the new 'newplugin' script to generate a
|
||||
dummy plugin directory and use the Makefile from there (adapting it to your particular
|
||||
plugin), or apply the patch from
|
||||
ftp://ftp.tvdr.de/vdr/Developer/vdr-1.7.33-pluginmakefile.diff
|
||||
to their Makefile to make the necessary changes (see comments in that file for details).
|
||||
to your Makefile to make the necessary changes (see comments in that file for details).
|
||||
|
27
Makefile
27
Makefile
@ -4,7 +4,7 @@
|
||||
# See the main source file 'vdr.c' for copyright information and
|
||||
# how to reach the author.
|
||||
#
|
||||
# $Id: Makefile 2.32 2012/12/19 11:26:50 kls Exp $
|
||||
# $Id: Makefile 2.33 2012/12/20 13:43:41 kls Exp $
|
||||
|
||||
.DELETE_ON_ERROR:
|
||||
|
||||
@ -114,14 +114,13 @@ vdr: $(OBJS) $(SILIB)
|
||||
# The libsi library:
|
||||
|
||||
$(SILIB):
|
||||
$(MAKE) -C $(LSIDIR) CXXFLAGS="$(CXXFLAGS)" DEFINES="$(CDEFINES)" all
|
||||
$(MAKE) --no-print-directory -C $(LSIDIR) CXXFLAGS="$(CXXFLAGS)" DEFINES="$(CDEFINES)" all
|
||||
|
||||
# pkg-config file:
|
||||
|
||||
.PHONY: vdr.pc
|
||||
vdr.pc:
|
||||
@echo "bindir=$(BINDIR)" > $@
|
||||
@echo "incdir=$(INCDIR)" >> $@
|
||||
@echo "configdir=$(CONFDIRDEF)" >> $@
|
||||
@echo "videodir=$(VIDEODIR)" >> $@
|
||||
@echo "cachedir=$(CACHEDIRDEF)" >> $@
|
||||
@ -129,8 +128,8 @@ vdr.pc:
|
||||
@echo "libdir=$(LIBDIR)" >> $@
|
||||
@echo "locdir=$(LOCDIR)" >> $@
|
||||
@echo "apiversion=$(APIVERSION)" >> $@
|
||||
@echo "cflags=$(CFLAGS) $(CDEFINES)" >> $@
|
||||
@echo "cxxflags=$(CXXFLAGS) $(CDEFINES)" >> $@
|
||||
@echo "cflags=$(CFLAGS) $(CDEFINES) -I$(INCDIR)" >> $@
|
||||
@echo "cxxflags=$(CXXFLAGS) $(CDEFINES) -I$(INCDIR)" >> $@
|
||||
@echo "" >> $@
|
||||
@echo "Name: VDR" >> $@
|
||||
@echo "Description: Video Disk Recorder" >> $@
|
||||
@ -181,19 +180,23 @@ plugins: include-dir vdr.pc
|
||||
@failed="";\
|
||||
noapiv="";\
|
||||
for i in `ls $(PLUGINDIR)/src | grep -v '[^a-z0-9]'`; do\
|
||||
echo "Plugin $$i:";\
|
||||
echo "*** Plugin $$i:";\
|
||||
if ! grep -q "\$$(LIBDIR)/.*\$$(APIVERSION)" "$(PLUGINDIR)/src/$$i/Makefile" ; then\
|
||||
echo "ERROR: plugin $$i doesn't honor APIVERSION - not compiled!";\
|
||||
noapiv="$$noapiv $$i";\
|
||||
continue;\
|
||||
fi;\
|
||||
$(MAKE) -C "$(PLUGINDIR)/src/$$i" VDRDIR=$(CWD) all || failed="$$failed $$i";\
|
||||
target=all;\
|
||||
if [ "$(LIBDIR)" == "$(CWD)/PLUGINS/lib" ] && [ "$(LOCDIR)" == "$(CWD)/locale" ]; then\
|
||||
target=install;\
|
||||
fi;\
|
||||
$(MAKE) --no-print-directory -C "$(PLUGINDIR)/src/$$i" VDRDIR=$(CWD) $$target || failed="$$failed $$i";\
|
||||
done;\
|
||||
if [ -n "$$noapiv" ] ; then echo; echo "*** plugins without APIVERSION:$$noapiv"; echo; fi;\
|
||||
if [ -n "$$failed" ] ; then echo; echo "*** failed plugins:$$failed"; echo; exit 1; fi
|
||||
|
||||
clean-plugins:
|
||||
@for i in `ls $(PLUGINDIR)/src | grep -v '[^a-z0-9]'`; do $(MAKE) -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)
|
||||
|
||||
# Install the files:
|
||||
@ -229,8 +232,9 @@ install-doc:
|
||||
# Plugins:
|
||||
|
||||
install-plugins: plugins
|
||||
@mkdir -p $(DESTDIR)$(LIBDIR)
|
||||
@cp --remove-destination $(PLUGINDIR)/lib/lib*-*.so.$(APIVERSION) $(DESTDIR)$(LIBDIR)
|
||||
@for i in `ls $(PLUGINDIR)/src | grep -v '[^a-z0-9]'`; do\
|
||||
$(MAKE) --no-print-directory -C "$(PLUGINDIR)/src/$$i" VDRDIR=$(CWD) install;\
|
||||
done
|
||||
|
||||
# Includes:
|
||||
|
||||
@ -257,9 +261,10 @@ srcdoc:
|
||||
# Housekeeping:
|
||||
|
||||
clean:
|
||||
@$(MAKE) -C $(LSIDIR) clean
|
||||
@$(MAKE) --no-print-directory -C $(LSIDIR) clean
|
||||
@-rm -f $(OBJS) $(DEPFILE) vdr vdr.pc core* *~
|
||||
@-rm -rf $(LOCALEDIR) $(PODIR)/*.mo $(PODIR)/*.pot
|
||||
@-rm -rf include
|
||||
@-rm -rf srcdoc
|
||||
CLEAN: clean
|
||||
distclean: clean-plugins clean
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# Makefile for a Video Disk Recorder plugin
|
||||
#
|
||||
# $Id: Makefile 1.11 2012/12/19 11:16:48 kls Exp $
|
||||
# $Id: Makefile 1.12 2012/12/20 14:02:10 kls Exp $
|
||||
|
||||
# The official name of this plugin.
|
||||
# This name will be used in the '-P...' option of VDR to load the plugin.
|
||||
@ -17,7 +17,6 @@ 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:
|
||||
PKGCFG = $(if $(VDRDIR),$(shell pkg-config --variable=$(1) $(VDRDIR)/vdr.pc),$(shell pkg-config --variable=$(1) vdr || pkg-config --variable=$(1) ../../../vdr.pc))
|
||||
INCDIR ?= $(call PKGCFG,incdir)
|
||||
LIBDIR ?= $(call PKGCFG,libdir)
|
||||
LOCDIR ?= $(call PKGCFG,locdir)
|
||||
#
|
||||
@ -37,9 +36,13 @@ APIVERSION = $(call PKGCFG,apiversion)
|
||||
ARCHIVE = $(PLUGIN)-$(VERSION)
|
||||
PACKAGE = vdr-$(ARCHIVE)
|
||||
|
||||
### The name of the shared object file:
|
||||
|
||||
SOFILE = libvdr-$(PLUGIN).so
|
||||
|
||||
### Includes and Defines (add further entries here):
|
||||
|
||||
INCLUDES += -I$(INCDIR)
|
||||
INCLUDES +=
|
||||
|
||||
DEFINES += -DPLUGIN_NAME_I18N='"$(PLUGIN)"'
|
||||
|
||||
@ -49,7 +52,7 @@ OBJS = $(PLUGIN).o dvbsdffdevice.o dvbsdffosd.o
|
||||
|
||||
### The main target:
|
||||
|
||||
all: libvdr-$(PLUGIN).so
|
||||
all: $(SOFILE)
|
||||
|
||||
### Implicit rules:
|
||||
|
||||
@ -67,9 +70,14 @@ $(DEPFILE): Makefile
|
||||
|
||||
### Targets:
|
||||
|
||||
libvdr-$(PLUGIN).so: $(OBJS)
|
||||
$(SOFILE): $(OBJS)
|
||||
$(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(OBJS) -o $@
|
||||
@cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION)
|
||||
|
||||
install-lib: $(SOFILE)
|
||||
@mkdir -p $(LIBDIR)
|
||||
@cp --remove-destination $(SOFILE) $(LIBDIR)/$(SOFILE).$(APIVERSION)
|
||||
|
||||
install: install-lib
|
||||
|
||||
dist: clean
|
||||
@-rm -rf $(TMPDIR)/$(ARCHIVE)
|
||||
@ -80,4 +88,4 @@ dist: clean
|
||||
@echo Distribution package created as $(PACKAGE).tgz
|
||||
|
||||
clean:
|
||||
@-rm -f $(OBJS) $(DEPFILE) *.so *.tgz core* *~ $(PODIR)/*.mo $(PODIR)/*.pot
|
||||
@-rm -f $(OBJS) $(DEPFILE) *.so *.tgz core* *~
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# Makefile for a Video Disk Recorder plugin
|
||||
#
|
||||
# $Id: Makefile 1.4 2012/12/19 11:17:32 kls Exp $
|
||||
# $Id: Makefile 1.5 2012/12/20 14:02:17 kls Exp $
|
||||
|
||||
# The official name of this plugin.
|
||||
# This name will be used in the '-P...' option of VDR to load the plugin.
|
||||
@ -17,7 +17,6 @@ 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:
|
||||
PKGCFG = $(if $(VDRDIR),$(shell pkg-config --variable=$(1) $(VDRDIR)/vdr.pc),$(shell pkg-config --variable=$(1) vdr || pkg-config --variable=$(1) ../../../vdr.pc))
|
||||
INCDIR ?= $(call PKGCFG,incdir)
|
||||
LIBDIR ?= $(call PKGCFG,libdir)
|
||||
LOCDIR ?= $(call PKGCFG,locdir)
|
||||
#
|
||||
@ -37,9 +36,13 @@ APIVERSION = $(call PKGCFG,apiversion)
|
||||
ARCHIVE = $(PLUGIN)-$(VERSION)
|
||||
PACKAGE = vdr-$(ARCHIVE)
|
||||
|
||||
### The name of the shared object file:
|
||||
|
||||
SOFILE = libvdr-$(PLUGIN).so
|
||||
|
||||
### Includes and Defines (add further entries here):
|
||||
|
||||
INCLUDES += -I$(INCDIR)
|
||||
INCLUDES +=
|
||||
|
||||
DEFINES += -DPLUGIN_NAME_I18N='"$(PLUGIN)"'
|
||||
|
||||
@ -49,7 +52,7 @@ OBJS = $(PLUGIN).o
|
||||
|
||||
### The main target:
|
||||
|
||||
all: libvdr-$(PLUGIN).so
|
||||
all: $(SOFILE)
|
||||
|
||||
### Implicit rules:
|
||||
|
||||
@ -67,9 +70,14 @@ $(DEPFILE): Makefile
|
||||
|
||||
### Targets:
|
||||
|
||||
libvdr-$(PLUGIN).so: $(OBJS)
|
||||
$(SOFILE): $(OBJS)
|
||||
$(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(OBJS) -o $@
|
||||
@cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION)
|
||||
|
||||
install-lib: $(SOFILE)
|
||||
@mkdir -p $(LIBDIR)
|
||||
@cp --remove-destination $(SOFILE) $(LIBDIR)/$(SOFILE).$(APIVERSION)
|
||||
|
||||
install: install-lib
|
||||
|
||||
dist: clean
|
||||
@-rm -rf $(TMPDIR)/$(ARCHIVE)
|
||||
@ -80,4 +88,4 @@ dist: clean
|
||||
@echo Distribution package created as $(PACKAGE).tgz
|
||||
|
||||
clean:
|
||||
@-rm -f $(OBJS) $(DEPFILE) *.so *.tgz core* *~ $(PODIR)/*.mo $(PODIR)/*.pot
|
||||
@-rm -f $(OBJS) $(DEPFILE) *.so *.tgz core* *~
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# Makefile for a Video Disk Recorder plugin
|
||||
#
|
||||
# $Id: Makefile 2.11 2012/12/19 12:10:07 kls Exp $
|
||||
# $Id: Makefile 2.12 2012/12/20 13:34:41 kls Exp $
|
||||
|
||||
# The official name of this plugin.
|
||||
# This name will be used in the '-P...' option of VDR to load the plugin.
|
||||
@ -17,7 +17,6 @@ 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:
|
||||
PKGCFG = $(if $(VDRDIR),$(shell pkg-config --variable=$(1) $(VDRDIR)/vdr.pc),$(shell pkg-config --variable=$(1) vdr || pkg-config --variable=$(1) ../../../vdr.pc))
|
||||
INCDIR ?= $(call PKGCFG,incdir)
|
||||
LIBDIR ?= $(call PKGCFG,libdir)
|
||||
LOCDIR ?= $(call PKGCFG,locdir)
|
||||
#
|
||||
@ -37,9 +36,13 @@ APIVERSION = $(call PKGCFG,apiversion)
|
||||
ARCHIVE = $(PLUGIN)-$(VERSION)
|
||||
PACKAGE = vdr-$(ARCHIVE)
|
||||
|
||||
### The name of the shared object file:
|
||||
|
||||
SOFILE = libvdr-$(PLUGIN).so
|
||||
|
||||
### Includes and Defines (add further entries here):
|
||||
|
||||
INCLUDES += -I$(INCDIR)
|
||||
INCLUDES +=
|
||||
|
||||
DEFINES += -DPLUGIN_NAME_I18N='"$(PLUGIN)"'
|
||||
|
||||
@ -49,7 +52,7 @@ OBJS = $(PLUGIN).o
|
||||
|
||||
### The main target:
|
||||
|
||||
all: libvdr-$(PLUGIN).so i18n
|
||||
all: $(SOFILE) i18n
|
||||
|
||||
### Implicit rules:
|
||||
|
||||
@ -69,6 +72,7 @@ $(DEPFILE): Makefile
|
||||
|
||||
PODIR = po
|
||||
I18Npo = $(wildcard $(PODIR)/*.po)
|
||||
I18Nmo = $(addsuffix .mo, $(foreach file, $(I18Npo), $(basename $(file))))
|
||||
I18Nmsgs = $(addprefix $(LOCDIR)/, $(addsuffix /LC_MESSAGES/vdr-$(PLUGIN).mo, $(notdir $(foreach file, $(I18Npo), $(basename $(file))))))
|
||||
I18Npot = $(PODIR)/$(PLUGIN).pot
|
||||
|
||||
@ -87,13 +91,20 @@ $(I18Nmsgs): $(LOCDIR)/%/LC_MESSAGES/vdr-$(PLUGIN).mo: $(PODIR)/%.mo
|
||||
cp $< $@
|
||||
|
||||
.PHONY: i18n
|
||||
i18n: $(I18Nmsgs)
|
||||
i18n: $(I18Nmo) $(I18Npot)
|
||||
|
||||
install-i18n: $(I18Nmsgs)
|
||||
|
||||
### Targets:
|
||||
|
||||
libvdr-$(PLUGIN).so: $(OBJS)
|
||||
$(SOFILE): $(OBJS)
|
||||
$(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(OBJS) -o $@
|
||||
@cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION)
|
||||
|
||||
install-lib: $(SOFILE)
|
||||
@mkdir -p $(LIBDIR)
|
||||
@cp --remove-destination $(SOFILE) $(LIBDIR)/$(SOFILE).$(APIVERSION)
|
||||
|
||||
install: install-lib install-i18n
|
||||
|
||||
dist: $(I18Npo) clean
|
||||
@-rm -rf $(TMPDIR)/$(ARCHIVE)
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# Makefile for a Video Disk Recorder plugin
|
||||
#
|
||||
# $Id: Makefile 2.6 2012/12/18 13:35:25 kls Exp $
|
||||
# $Id: Makefile 2.7 2012/12/20 13:34:45 kls Exp $
|
||||
|
||||
# The official name of this plugin.
|
||||
|
||||
@ -15,7 +15,6 @@ 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:
|
||||
PKGCFG = $(if $(VDRDIR),$(shell pkg-config --variable=$(1) $(VDRDIR)/vdr.pc),$(shell pkg-config --variable=$(1) vdr || pkg-config --variable=$(1) ../../../vdr.pc))
|
||||
INCDIR ?= $(call PKGCFG,incdir)
|
||||
LIBDIR ?= $(call PKGCFG,libdir)
|
||||
LOCDIR ?= $(call PKGCFG,locdir)
|
||||
#
|
||||
@ -35,9 +34,13 @@ APIVERSION = $(call PKGCFG,apiversion)
|
||||
ARCHIVE = $(PLUGIN)-$(VERSION)
|
||||
PACKAGE = vdr-$(ARCHIVE)
|
||||
|
||||
### The name of the shared object file:
|
||||
|
||||
SOFILE = libvdr-$(PLUGIN).so
|
||||
|
||||
### Includes and Defines (add further entries here):
|
||||
|
||||
INCLUDES += -I$(INCDIR)
|
||||
INCLUDES +=
|
||||
|
||||
DEFINES += -DPLUGIN_NAME_I18N='"$(PLUGIN)"'
|
||||
|
||||
@ -47,7 +50,7 @@ OBJS = $(PLUGIN).o
|
||||
|
||||
### The main target:
|
||||
|
||||
all: libvdr-$(PLUGIN).so
|
||||
all: $(SOFILE)
|
||||
|
||||
### Implicit rules:
|
||||
|
||||
@ -65,9 +68,14 @@ $(DEPFILE): Makefile
|
||||
|
||||
### Targets:
|
||||
|
||||
libvdr-$(PLUGIN).so: $(OBJS)
|
||||
$(SOFILE): $(OBJS)
|
||||
$(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(OBJS) -o $@
|
||||
@cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION)
|
||||
|
||||
install-lib: $(SOFILE)
|
||||
@mkdir -p $(LIBDIR)
|
||||
@cp --remove-destination $(SOFILE) $(LIBDIR)/$(SOFILE).$(APIVERSION)
|
||||
|
||||
install: install-lib
|
||||
|
||||
dist: clean
|
||||
@-rm -rf $(TMPDIR)/$(ARCHIVE)
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# Makefile for a Video Disk Recorder plugin
|
||||
#
|
||||
# $Id: Makefile 2.11 2012/12/19 12:10:17 kls Exp $
|
||||
# $Id: Makefile 2.12 2012/12/20 14:00:40 kls Exp $
|
||||
|
||||
# The official name of this plugin.
|
||||
# This name will be used in the '-P...' option of VDR to load the plugin.
|
||||
@ -17,7 +17,6 @@ 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:
|
||||
PKGCFG = $(if $(VDRDIR),$(shell pkg-config --variable=$(1) $(VDRDIR)/vdr.pc),$(shell pkg-config --variable=$(1) vdr || pkg-config --variable=$(1) ../../../vdr.pc))
|
||||
INCDIR ?= $(call PKGCFG,incdir)
|
||||
LIBDIR ?= $(call PKGCFG,libdir)
|
||||
LOCDIR ?= $(call PKGCFG,locdir)
|
||||
#
|
||||
@ -37,9 +36,13 @@ APIVERSION = $(call PKGCFG,apiversion)
|
||||
ARCHIVE = $(PLUGIN)-$(VERSION)
|
||||
PACKAGE = vdr-$(ARCHIVE)
|
||||
|
||||
### The name of the shared object file:
|
||||
|
||||
SOFILE = libvdr-$(PLUGIN).so
|
||||
|
||||
### Includes and Defines (add further entries here):
|
||||
|
||||
INCLUDES += -I$(INCDIR)
|
||||
INCLUDES +=
|
||||
|
||||
DEFINES += -DPLUGIN_NAME_I18N='"$(PLUGIN)"'
|
||||
|
||||
@ -49,7 +52,7 @@ OBJS = $(PLUGIN).o entry.o menu.o player.o
|
||||
|
||||
### The main target:
|
||||
|
||||
all: libvdr-$(PLUGIN).so i18n
|
||||
all: $(SOFILE) i18n
|
||||
|
||||
### Implicit rules:
|
||||
|
||||
@ -69,6 +72,7 @@ $(DEPFILE): Makefile
|
||||
|
||||
PODIR = po
|
||||
I18Npo = $(wildcard $(PODIR)/*.po)
|
||||
I18Nmo = $(addsuffix .mo, $(foreach file, $(I18Npo), $(basename $(file))))
|
||||
I18Nmsgs = $(addprefix $(LOCDIR)/, $(addsuffix /LC_MESSAGES/vdr-$(PLUGIN).mo, $(notdir $(foreach file, $(I18Npo), $(basename $(file))))))
|
||||
I18Npot = $(PODIR)/$(PLUGIN).pot
|
||||
|
||||
@ -87,13 +91,20 @@ $(I18Nmsgs): $(LOCDIR)/%/LC_MESSAGES/vdr-$(PLUGIN).mo: $(PODIR)/%.mo
|
||||
cp $< $@
|
||||
|
||||
.PHONY: i18n
|
||||
i18n: $(I18Nmsgs) $(I18Npot)
|
||||
i18n: $(I18Nmo) $(I18Npot)
|
||||
|
||||
install-i18n: $(I18Nmsgs)
|
||||
|
||||
### Targets:
|
||||
|
||||
libvdr-$(PLUGIN).so: $(OBJS)
|
||||
$(SOFILE): $(OBJS)
|
||||
$(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(OBJS) -o $@
|
||||
@cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION)
|
||||
|
||||
install-lib: $(SOFILE)
|
||||
@mkdir -p $(LIBDIR)
|
||||
@cp --remove-destination $(SOFILE) $(LIBDIR)/$(SOFILE).$(APIVERSION)
|
||||
|
||||
install: install-lib install-i18n
|
||||
|
||||
dist: $(I18Npo) clean
|
||||
@-rm -rf $(TMPDIR)/$(ARCHIVE)
|
||||
@ -104,4 +115,5 @@ dist: $(I18Npo) clean
|
||||
@echo Distribution package created as $(PACKAGE).tgz
|
||||
|
||||
clean:
|
||||
@-rm -f $(OBJS) $(DEPFILE) *.so *.tgz core* *~ $(PODIR)/*.mo $(PODIR)/*.pot
|
||||
@-rm -f $(PODIR)/*.mo $(PODIR)/*.pot
|
||||
@-rm -f $(OBJS) $(DEPFILE) *.so *.tgz core* *~
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# Makefile for a Video Disk Recorder plugin
|
||||
#
|
||||
# $Id: Makefile 1.4 2012/12/19 11:17:56 kls Exp $
|
||||
# $Id: Makefile 1.5 2012/12/20 14:01:00 kls Exp $
|
||||
|
||||
# The official name of this plugin.
|
||||
# This name will be used in the '-P...' option of VDR to load the plugin.
|
||||
@ -17,7 +17,6 @@ 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:
|
||||
PKGCFG = $(if $(VDRDIR),$(shell pkg-config --variable=$(1) $(VDRDIR)/vdr.pc),$(shell pkg-config --variable=$(1) vdr || pkg-config --variable=$(1) ../../../vdr.pc))
|
||||
INCDIR ?= $(call PKGCFG,incdir)
|
||||
LIBDIR ?= $(call PKGCFG,libdir)
|
||||
LOCDIR ?= $(call PKGCFG,locdir)
|
||||
#
|
||||
@ -37,9 +36,13 @@ APIVERSION = $(call PKGCFG,apiversion)
|
||||
ARCHIVE = $(PLUGIN)-$(VERSION)
|
||||
PACKAGE = vdr-$(ARCHIVE)
|
||||
|
||||
### The name of the shared object file:
|
||||
|
||||
SOFILE = libvdr-$(PLUGIN).so
|
||||
|
||||
### Includes and Defines (add further entries here):
|
||||
|
||||
INCLUDES += -I$(INCDIR)
|
||||
INCLUDES +=
|
||||
|
||||
DEFINES += -DPLUGIN_NAME_I18N='"$(PLUGIN)"'
|
||||
|
||||
@ -49,7 +52,7 @@ OBJS = $(PLUGIN).o
|
||||
|
||||
### The main target:
|
||||
|
||||
all: libvdr-$(PLUGIN).so
|
||||
all: $(SOFILE)
|
||||
|
||||
### Implicit rules:
|
||||
|
||||
@ -67,9 +70,14 @@ $(DEPFILE): Makefile
|
||||
|
||||
### Targets:
|
||||
|
||||
libvdr-$(PLUGIN).so: $(OBJS)
|
||||
$(SOFILE): $(OBJS)
|
||||
$(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(OBJS) -o $@
|
||||
@cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION)
|
||||
|
||||
install-lib: $(SOFILE)
|
||||
@mkdir -p $(LIBDIR)
|
||||
@cp --remove-destination $(SOFILE) $(LIBDIR)/$(SOFILE).$(APIVERSION)
|
||||
|
||||
install: install-lib
|
||||
|
||||
dist: clean
|
||||
@-rm -rf $(TMPDIR)/$(ARCHIVE)
|
||||
@ -80,4 +88,4 @@ dist: clean
|
||||
@echo Distribution package created as $(PACKAGE).tgz
|
||||
|
||||
clean:
|
||||
@-rm -f $(OBJS) $(DEPFILE) *.so *.tgz core* *~ $(PODIR)/*.mo $(PODIR)/*.pot
|
||||
@-rm -f $(OBJS) $(DEPFILE) *.so *.tgz core* *~
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# Makefile for a Video Disk Recorder plugin
|
||||
#
|
||||
# $Id: Makefile 2.6 2012/12/18 13:35:40 kls Exp $
|
||||
# $Id: Makefile 2.7 2012/12/20 13:35:20 kls Exp $
|
||||
|
||||
# The official name of this plugin.
|
||||
# This name will be used in the '-P...' option of VDR to load the plugin.
|
||||
@ -18,7 +18,6 @@ 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:
|
||||
PKGCFG = $(if $(VDRDIR),$(shell pkg-config --variable=$(1) $(VDRDIR)/vdr.pc),$(shell pkg-config --variable=$(1) vdr || pkg-config --variable=$(1) ../../../vdr.pc))
|
||||
INCDIR ?= $(call PKGCFG,incdir)
|
||||
LIBDIR ?= $(call PKGCFG,libdir)
|
||||
LOCDIR ?= $(call PKGCFG,locdir)
|
||||
#
|
||||
@ -40,7 +39,7 @@ PACKAGE = vdr-$(ARCHIVE)
|
||||
|
||||
### Includes and Defines (add further entries here):
|
||||
|
||||
INCLUDES += -I$(INCDIR)
|
||||
INCLUDES +=
|
||||
|
||||
DEFINES += -DPLUGIN_NAME_I18N='"$(PLUGIN)"'
|
||||
|
||||
@ -70,11 +69,14 @@ $(DEPFILE): Makefile
|
||||
|
||||
libvdr-$(PLUGIN1).so: $(PLUGIN1).o
|
||||
$(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(PLUGIN1).o -o $@
|
||||
@cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION)
|
||||
|
||||
libvdr-$(PLUGIN2).so: $(PLUGIN2).o
|
||||
$(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(PLUGIN2).o -o $@
|
||||
@cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION)
|
||||
|
||||
install: libvdr-$(PLUGIN1).so libvdr-$(PLUGIN2).so
|
||||
@mkdir -p $(LIBDIR)
|
||||
@cp --remove-destination libvdr-$(PLUGIN1).so $(LIBDIR)/libvdr-$(PLUGIN1).so.$(APIVERSION)
|
||||
@cp --remove-destination libvdr-$(PLUGIN2).so $(LIBDIR)/libvdr-$(PLUGIN2).so.$(APIVERSION)
|
||||
|
||||
dist: clean
|
||||
@-rm -rf $(TMPDIR)/$(ARCHIVE)
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# Makefile for a Video Disk Recorder plugin
|
||||
#
|
||||
# $Id: Makefile 2.11 2012/12/19 12:10:28 kls Exp $
|
||||
# $Id: Makefile 2.12 2012/12/20 14:01:24 kls Exp $
|
||||
|
||||
# The official name of this plugin.
|
||||
# This name will be used in the '-P...' option of VDR to load the plugin.
|
||||
@ -17,7 +17,6 @@ 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:
|
||||
PKGCFG = $(if $(VDRDIR),$(shell pkg-config --variable=$(1) $(VDRDIR)/vdr.pc),$(shell pkg-config --variable=$(1) vdr || pkg-config --variable=$(1) ../../../vdr.pc))
|
||||
INCDIR ?= $(call PKGCFG,incdir)
|
||||
LIBDIR ?= $(call PKGCFG,libdir)
|
||||
LOCDIR ?= $(call PKGCFG,locdir)
|
||||
#
|
||||
@ -37,9 +36,13 @@ APIVERSION = $(call PKGCFG,apiversion)
|
||||
ARCHIVE = $(PLUGIN)-$(VERSION)
|
||||
PACKAGE = vdr-$(ARCHIVE)
|
||||
|
||||
### The name of the shared object file:
|
||||
|
||||
SOFILE = libvdr-$(PLUGIN).so
|
||||
|
||||
### Includes and Defines (add further entries here):
|
||||
|
||||
INCLUDES += -I$(INCDIR)
|
||||
INCLUDES +=
|
||||
|
||||
DEFINES += -DPLUGIN_NAME_I18N='"$(PLUGIN)"'
|
||||
|
||||
@ -49,7 +52,7 @@ OBJS = $(PLUGIN).o
|
||||
|
||||
### The main target:
|
||||
|
||||
all: libvdr-$(PLUGIN).so i18n
|
||||
all: $(SOFILE) i18n
|
||||
|
||||
### Implicit rules:
|
||||
|
||||
@ -69,6 +72,7 @@ $(DEPFILE): Makefile
|
||||
|
||||
PODIR = po
|
||||
I18Npo = $(wildcard $(PODIR)/*.po)
|
||||
I18Nmo = $(addsuffix .mo, $(foreach file, $(I18Npo), $(basename $(file))))
|
||||
I18Nmsgs = $(addprefix $(LOCDIR)/, $(addsuffix /LC_MESSAGES/vdr-$(PLUGIN).mo, $(notdir $(foreach file, $(I18Npo), $(basename $(file))))))
|
||||
I18Npot = $(PODIR)/$(PLUGIN).pot
|
||||
|
||||
@ -87,13 +91,20 @@ $(I18Nmsgs): $(LOCDIR)/%/LC_MESSAGES/vdr-$(PLUGIN).mo: $(PODIR)/%.mo
|
||||
cp $< $@
|
||||
|
||||
.PHONY: i18n
|
||||
i18n: $(I18Nmsgs) $(I18Npot)
|
||||
i18n: $(I18Nmo) $(I18Npot)
|
||||
|
||||
install-i18n: $(I18Nmsgs)
|
||||
|
||||
### Targets:
|
||||
|
||||
libvdr-$(PLUGIN).so: $(OBJS)
|
||||
$(SOFILE): $(OBJS)
|
||||
$(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(OBJS) -lncursesw -o $@
|
||||
@cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION)
|
||||
|
||||
install-lib: $(SOFILE)
|
||||
@mkdir -p $(LIBDIR)
|
||||
@cp --remove-destination $(SOFILE) $(LIBDIR)/$(SOFILE).$(APIVERSION)
|
||||
|
||||
install: install-lib install-i18n
|
||||
|
||||
dist: $(I18Npo) clean
|
||||
@-rm -rf $(TMPDIR)/$(ARCHIVE)
|
||||
@ -104,4 +115,5 @@ dist: $(I18Npo) clean
|
||||
@echo Distribution package created as $(PACKAGE).tgz
|
||||
|
||||
clean:
|
||||
@-rm -f $(OBJS) $(DEPFILE) *.so *.tgz core* *~ $(PODIR)/*.mo $(PODIR)/*.pot
|
||||
@-rm -f $(PODIR)/*.mo $(PODIR)/*.pot
|
||||
@-rm -f $(OBJS) $(DEPFILE) *.so *.tgz core* *~
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# Makefile for a Video Disk Recorder plugin
|
||||
#
|
||||
# $Id: Makefile 2.6 2012/12/18 13:35:47 kls Exp $
|
||||
# $Id: Makefile 2.7 2012/12/20 13:35:33 kls Exp $
|
||||
|
||||
# The official name of this plugin.
|
||||
# This name will be used in the '-P...' option of VDR to load the plugin.
|
||||
@ -17,7 +17,6 @@ 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:
|
||||
PKGCFG = $(if $(VDRDIR),$(shell pkg-config --variable=$(1) $(VDRDIR)/vdr.pc),$(shell pkg-config --variable=$(1) vdr || pkg-config --variable=$(1) ../../../vdr.pc))
|
||||
INCDIR ?= $(call PKGCFG,incdir)
|
||||
LIBDIR ?= $(call PKGCFG,libdir)
|
||||
LOCDIR ?= $(call PKGCFG,locdir)
|
||||
#
|
||||
@ -37,9 +36,13 @@ APIVERSION = $(call PKGCFG,apiversion)
|
||||
ARCHIVE = $(PLUGIN)-$(VERSION)
|
||||
PACKAGE = vdr-$(ARCHIVE)
|
||||
|
||||
### The name of the shared object file:
|
||||
|
||||
SOFILE = libvdr-$(PLUGIN).so
|
||||
|
||||
### Includes and Defines (add further entries here):
|
||||
|
||||
INCLUDES += -I$(INCDIR)
|
||||
INCLUDES +=
|
||||
|
||||
DEFINES += -DPLUGIN_NAME_I18N='"$(PLUGIN)"'
|
||||
|
||||
@ -49,7 +52,7 @@ OBJS = $(PLUGIN).o
|
||||
|
||||
### The main target:
|
||||
|
||||
all: libvdr-$(PLUGIN).so
|
||||
all: $(SOFILE)
|
||||
|
||||
### Implicit rules:
|
||||
|
||||
@ -67,9 +70,14 @@ $(DEPFILE): Makefile
|
||||
|
||||
### Targets:
|
||||
|
||||
libvdr-$(PLUGIN).so: $(OBJS)
|
||||
$(SOFILE): $(OBJS)
|
||||
$(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(OBJS) -o $@
|
||||
@cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION)
|
||||
|
||||
install-lib: $(SOFILE)
|
||||
@mkdir -p $(LIBDIR)
|
||||
@cp --remove-destination $(SOFILE) $(LIBDIR)/$(SOFILE).$(APIVERSION)
|
||||
|
||||
install: install-lib
|
||||
|
||||
dist: clean
|
||||
@-rm -rf $(TMPDIR)/$(ARCHIVE)
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# Makefile for a Video Disk Recorder plugin
|
||||
#
|
||||
# $Id: Makefile 2.6 2012/12/18 13:35:51 kls Exp $
|
||||
# $Id: Makefile 2.7 2012/12/20 13:35:36 kls Exp $
|
||||
|
||||
# The official name of this plugin.
|
||||
# This name will be used in the '-P...' option of VDR to load the plugin.
|
||||
@ -17,7 +17,6 @@ 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:
|
||||
PKGCFG = $(if $(VDRDIR),$(shell pkg-config --variable=$(1) $(VDRDIR)/vdr.pc),$(shell pkg-config --variable=$(1) vdr || pkg-config --variable=$(1) ../../../vdr.pc))
|
||||
INCDIR ?= $(call PKGCFG,incdir)
|
||||
LIBDIR ?= $(call PKGCFG,libdir)
|
||||
LOCDIR ?= $(call PKGCFG,locdir)
|
||||
#
|
||||
@ -37,9 +36,13 @@ APIVERSION = $(call PKGCFG,apiversion)
|
||||
ARCHIVE = $(PLUGIN)-$(VERSION)
|
||||
PACKAGE = vdr-$(ARCHIVE)
|
||||
|
||||
### The name of the shared object file:
|
||||
|
||||
SOFILE = libvdr-$(PLUGIN).so
|
||||
|
||||
### Includes and Defines (add further entries here):
|
||||
|
||||
INCLUDES += -I$(INCDIR)
|
||||
INCLUDES +=
|
||||
|
||||
DEFINES += -DPLUGIN_NAME_I18N='"$(PLUGIN)"'
|
||||
|
||||
@ -49,7 +52,7 @@ OBJS = $(PLUGIN).o
|
||||
|
||||
### The main target:
|
||||
|
||||
all: libvdr-$(PLUGIN).so
|
||||
all: $(SOFILE)
|
||||
|
||||
### Implicit rules:
|
||||
|
||||
@ -67,9 +70,14 @@ $(DEPFILE): Makefile
|
||||
|
||||
### Targets:
|
||||
|
||||
libvdr-$(PLUGIN).so: $(OBJS)
|
||||
$(SOFILE): $(OBJS)
|
||||
$(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(OBJS) -o $@
|
||||
@cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION)
|
||||
|
||||
install-lib: $(SOFILE)
|
||||
@mkdir -p $(LIBDIR)
|
||||
@cp --remove-destination $(SOFILE) $(LIBDIR)/$(SOFILE).$(APIVERSION)
|
||||
|
||||
install: install-lib
|
||||
|
||||
dist: clean
|
||||
@-rm -rf $(TMPDIR)/$(ARCHIVE)
|
||||
|
31
newplugin
31
newplugin
@ -12,7 +12,7 @@
|
||||
# See the main source file 'vdr.c' for copyright information and
|
||||
# how to reach the author.
|
||||
#
|
||||
# $Id: newplugin 2.10 2012/12/19 11:03:28 kls Exp $
|
||||
# $Id: newplugin 2.11 2012/12/20 13:58:05 kls Exp $
|
||||
|
||||
$PLUGIN_NAME = $ARGV[0] || die "Usage: newplugin <name>\n";
|
||||
|
||||
@ -76,9 +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:
|
||||
PKGCFG = \$(if \$(VDRDIR),\$(shell pkg-config --variable=\$(1) \$(VDRDIR)/vdr.pc),\$(shell pkg-config --variable=\$(1) vdr || pkg-config --variable=\$(1) ../../../vdr.pc))
|
||||
INCDIR ?= \$(call PKGCFG,includedir)
|
||||
LIBDIR ?= \$(call PKGCFG,libdir)
|
||||
LOCDIR ?= \$(call PKGCFG,localedir)
|
||||
LOCDIR ?= \$(call PKGCFG,locdir)
|
||||
#
|
||||
TMPDIR ?= /tmp
|
||||
|
||||
@ -96,9 +95,13 @@ APIVERSION = \$(call PKGCFG,apiversion)
|
||||
ARCHIVE = \$(PLUGIN)-\$(VERSION)
|
||||
PACKAGE = vdr-\$(ARCHIVE)
|
||||
|
||||
### The name of the shared object file:
|
||||
|
||||
SOFILE = libvdr-\$(PLUGIN).so
|
||||
|
||||
### Includes and Defines (add further entries here):
|
||||
|
||||
INCLUDES += -I\$(INCDIR)
|
||||
INCLUDES +=
|
||||
|
||||
DEFINES += -DPLUGIN_NAME_I18N='"\$(PLUGIN)"'
|
||||
|
||||
@ -108,7 +111,7 @@ OBJS = \$(PLUGIN).o
|
||||
|
||||
### The main target:
|
||||
|
||||
all: libvdr-\$(PLUGIN).so i18n
|
||||
all: \$(SOFILE) i18n
|
||||
|
||||
### Implicit rules:
|
||||
|
||||
@ -128,6 +131,7 @@ DEPFILE = .dependencies
|
||||
|
||||
PODIR = po
|
||||
I18Npo = \$(wildcard \$(PODIR)/*.po)
|
||||
I18Nmo = \$(addsuffix .mo, \$(foreach file, \$(I18Npo), \$(basename \$(file))))
|
||||
I18Nmsgs = \$(addprefix \$(LOCDIR)/, \$(addsuffix /LC_MESSAGES/vdr-\$(PLUGIN).mo, \$(notdir \$(foreach file, \$(I18Npo), \$(basename \$(file))))))
|
||||
I18Npot = \$(PODIR)/\$(PLUGIN).pot
|
||||
|
||||
@ -146,13 +150,20 @@ I18Npot = \$(PODIR)/\$(PLUGIN).pot
|
||||
cp \$< \$\@
|
||||
|
||||
.PHONY: i18n
|
||||
i18n: \$(I18Nmsgs) \$(I18Npot)
|
||||
i18n: \$(I18Nmo) \$(I18Npot)
|
||||
|
||||
install-i18n: \$(I18Nmsgs)
|
||||
|
||||
### Targets:
|
||||
|
||||
libvdr-\$(PLUGIN).so: \$(OBJS)
|
||||
\$(SOFILE): \$(OBJS)
|
||||
\$(CXX) \$(CXXFLAGS) \$(LDFLAGS) -shared \$(OBJS) -o \$\@
|
||||
\@cp --remove-destination \$\@ \$(LIBDIR)/\$\@.\$(APIVERSION)
|
||||
|
||||
install-lib: \$(SOFILE)
|
||||
\@mkdir -p \$(LIBDIR)
|
||||
\@cp --remove-destination \$(SOFILE) \$(LIBDIR)/\$(SOFILE).\$(APIVERSION)
|
||||
|
||||
install: install-lib install-i18n
|
||||
|
||||
dist: \$(I18Npo) clean
|
||||
\@-rm -rf \$(TMPDIR)/\$(ARCHIVE)
|
||||
@ -163,7 +174,8 @@ dist: \$(I18Npo) clean
|
||||
\@echo Distribution package created as \$(PACKAGE).tgz
|
||||
|
||||
clean:
|
||||
\@-rm -f \$(OBJS) \$(DEPFILE) *.so *.tgz core* *~ \$(PODIR)/*.mo \$(PODIR)/*.pot
|
||||
\@-rm -f \$(PODIR)/*.mo \$(PODIR)/*.pot
|
||||
\@-rm -f \$(OBJS) \$(DEPFILE) *.so *.tgz core* *~
|
||||
};
|
||||
|
||||
$MAIN = qq
|
||||
@ -342,4 +354,3 @@ sub CreateFile
|
||||
print FILE $Content;
|
||||
close(FILE);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user