summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorMidas <vdrportal_midas@gmx.de>2011-07-21 07:40:35 +0200
committerMidas <vdrportal_midas@gmx.de>2011-07-21 07:40:35 +0200
commit393b71268991b320406f1fd38bb5cf04663a7ae8 (patch)
tree3cedffc421aa2429e340530c86f4211c5013a1c5 /Makefile
parentbacf88d79eac8dec11cbb53bd1efa5992b63fc01 (diff)
downloadvdr-plugin-sleeptimer-393b71268991b320406f1fd38bb5cf04663a7ae8.tar.gz
vdr-plugin-sleeptimer-393b71268991b320406f1fd38bb5cf04663a7ae8.tar.bz2
Support of keymacros.conf and several other new
features. Internationalization. Repaired COPYING. Bugfixes. Debian directory.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile30
1 files changed, 28 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 8c2829c..a5f962a 100644
--- a/Makefile
+++ b/Makefile
@@ -20,7 +20,7 @@ APIVERSION = $(shell sed -ne '/define APIVERSION/s/^.*"\(.*\)".*$$/\1/p' $(VDRDI
### The C++ compiler and options:
CXX ?= g++
-CXXFLAGS ?= -O2 -Wall -Woverloaded-virtual
+CXXFLAGS ?= -fPIC -O2 -Wall -Woverloaded-virtual
### The directory environment:
@@ -66,9 +66,34 @@ $(DEPFILE): Makefile
-include $(DEPFILE)
+### 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
+
+%.mo: %.po
+ msgfmt -c -o $@ $<
+
+$(I18Npot): $(wildcard *.c)
+ xgettext -C -cTRANSLATORS --no-wrap --no-location -k -ktr -ktrNOOP --msgid-bugs-address='<vdrportal_midas <at> gmx <dot> de>' -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)
+
### Targets:
-all: libvdr-$(PLUGIN).so
+all: libvdr-$(PLUGIN).so i18n
libvdr-$(PLUGIN).so: $(OBJS)
$(CXX) $(CXXFLAGS) -shared $(OBJS) -o $@
@@ -83,4 +108,5 @@ dist: clean
@echo Distribution package created as $(PACKAGE).tgz
clean:
+ @-rm -f $(PODIR)/*.mo $(PODIR)/*.pot
@-rm -f $(OBJS) $(DEPFILE) *.so *.tgz core* *~