From 23f4f2114e7d48bb4bbe5e50aa6ddce0f1c21bd2 Mon Sep 17 00:00:00 2001 From: Martin Prochnow Date: Sat, 22 Mar 2008 16:45:02 +0100 Subject: =?UTF-8?q?Version=201.2-test1=20-=20added=20italian=20translation?= =?UTF-8?q?;=20thanks=20to=20Diego=20-=20added=20support=20for=20GraphTFT-?= =?UTF-8?q?plugin;=20thanks=20to=20J=F6rg=20Wendel=20for=20the=20patch=20-?= =?UTF-8?q?=20added=20support=20for=20true=20type=20fonts=20and=20UTF-8;?= =?UTF-8?q?=20thanks=20to=20Andreas=20Mair=20for=20the=20true=20type=20fon?= =?UTF-8?q?t=20and=20the=20patch=20-=20removed=20patch=20font=20routine=20?= =?UTF-8?q?because=20it=20is=20useless=20now=20-=20added=20true=20type=20f?= =?UTF-8?q?ont=20containing=20the=20needed=20icons=20-=20changed=20i18n=20?= =?UTF-8?q?support=20to=20gettext?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Makefile | 58 ++++++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 40 insertions(+), 18 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index cf2413a..8a25a19 100644 --- a/Makefile +++ b/Makefile @@ -1,14 +1,13 @@ -############################################################################### # -# uncomment if you use the pin-plugin and want to protect your recordings -#WITHPINPLUGIN=1 +# Makefile for a Video Disk Recorder plugin # -############################################################################### - +# $Id$ # 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 = extrecmenu @@ -19,7 +18,7 @@ VERSION = $(shell grep 'static const char \*VERSION *=' $(PLUGIN).c | awk '{ pri ### The C++ compiler and options: CXX ?= g++ -CXXFLAGS ?= -fPIC -g -O2 -Wall -Woverloaded-virtual +CXXFLAGS ?= -fPIC -g -O2 -Wall -Woverloaded-virtual -Wno-parentheses ### The directory environment: @@ -31,7 +30,7 @@ TMPDIR = /tmp -include $(VDRDIR)/Make.config -### The version number of VDR / VDR's plugin API (taken from VDR's "config.h"): +### The version number of VDR's plugin API (taken from VDR's "config.h"): APIVERSION = $(shell sed -ne '/define APIVERSION/s/^.*"\(.*\)".*$$/\1/p' $(VDRDIR)/config.h) @@ -46,21 +45,21 @@ INCLUDES += -I$(VDRDIR)/include DEFINES += -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"$(PLUGIN)"' -ifdef WITHPINPLUGIN - DEFINES+=-DWITHPINPLUGIN -endif - ### The object files (add further files here): -OBJS = $(PLUGIN).o mymenurecordings.o myreplaycontrol.o i18n.o \ - mymenusetup.o mymenucommands.o patchfont.o tools.o mymenueditrecording.o +OBJS = $(PLUGIN).o mymenurecordings.o mymenueditrecording.o myreplaycontrol.o \ + mymenucommands.o mymenusetup.o tools.o i18n.o + +### The main target: + +all: libvdr-$(PLUGIN).so i18n ### Implicit rules: %.o: %.c $(CXX) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) $< -# Dependencies: +### Dependencies: MAKEDEP = $(CXX) -MM -MG DEPFILE = .dependencies @@ -69,13 +68,36 @@ $(DEPFILE): Makefile -include $(DEPFILE) -### Targets: +### Internationalization (I18N): + +PODIR = po +LOCALEDIR = $(VDRDIR)/locale +I18Npo = $(wildcard $(PODIR)/*.po) +I18Nmsgs = $(addprefix $(LOCALEDIR)/, $(addsuffix /LC_MESSAGES/vdr-$(PLUGIN).mo, $(notdir $(foreach file, $(I18Npo), $(basename $(file)))))) +I18Npot = $(PODIR)/$(PLUGIN).pot -all: libvdr-$(PLUGIN).so +%.mo: %.po + msgfmt -c -o $@ $< + +$(I18Npot): $(wildcard *.c) + xgettext -C -cTRANSLATORS --no-wrap --no-location -k -ktr -ktrNOOP --msgid-bugs-address='' -o $@ $^ + +%.po: $(I18Npot) + msgmerge -U --no-wrap --no-location --backup=none -q $@ $< + @touch $@ + +$(I18Nmsgs): $(LOCALEDIR)/%/LC_MESSAGES/vdr-$(PLUGIN).mo: $(PODIR)/%.mo + @mkdir -p $(dir $@) + cp $< $@ + +.PHONY: i18n +i18n: $(I18Nmsgs) $(I18Npot) + +### Targets: libvdr-$(PLUGIN).so: $(OBJS) $(CXX) $(CXXFLAGS) -shared $(OBJS) -o $@ - @cp $@ $(LIBDIR)/$@.$(APIVERSION) + @cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION) dist: clean @-rm -rf $(TMPDIR)/$(ARCHIVE) @@ -86,4 +108,4 @@ dist: clean @echo Distribution package created as $(PACKAGE).tgz clean: - @-rm -f $(OBJS) $(DEPFILE) *.so *.tgz core* *~ + @-rm -f $(OBJS) $(DEPFILE) *.so *.tgz core* *~ $(PODIR)/*.mo $(PODIR)/*.pot -- cgit v1.2.3