diff options
author | Thomas Günther <tom@toms-cafe.de> | 2009-05-16 11:52:15 +0200 |
---|---|---|
committer | Thomas Günther <tom@toms-cafe.de> | 2009-05-16 11:52:15 +0200 |
commit | 371d910a0f31585797c1c7521a50f1945fe1d8d9 (patch) | |
tree | c66c666cc0cc1774035cf4981d6ba7c12cec319f /Makefile | |
parent | 28a6a2db0c02e6b87b4b8a3a189a24f7c840f9c6 (diff) | |
download | vdr-plugin-text2skin-371d910a0f31585797c1c7521a50f1945fe1d8d9.tar.gz vdr-plugin-text2skin-371d910a0f31585797c1c7521a50f1945fe1d8d9.tar.bz2 |
Locales for text2skin plug-in (VDR >= 1.5.7, skins + locale patch).
Patch from http://toms-cafe.de/vdr/download/text2skin-1.1-cvs-locale.diff
The skins have to be patched, too. The patches for DeepBlue, Enigma and
enElchi are ready for download from http://toms-cafe.de/vdr/download/.
To patch other skins the Makefile from these patches could be used
without any changes, missing translation entries should be added to the
*.skin file (e.g. as comments <!-- trans('Volume') -->)
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 64 |
1 files changed, 45 insertions, 19 deletions
@@ -19,6 +19,8 @@ HAVE_FREETYPE=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 = text2skin @@ -29,28 +31,28 @@ VERSION = $(shell grep 'const char \*cText2SkinPlugin::VERSION *=' $(PLUGIN).c | ### The C++ compiler and options: CXX ?= g++ -CXXFLAGS ?= -Wall -Woverloaded-virtual +CXXFLAGS ?= -fPIC -Wall -Woverloaded-virtual ### The directory environment: -DVBDIR = ../../../../DVB VDRDIR = ../../.. LIBDIR = ../../lib TMPDIR = /tmp -### The version number of VDR (taken from VDR's "config.h"): +### Allow user defined options to overwrite defaults: + +-include $(VDRDIR)/Make.config -VDRVERSION = $(shell grep 'define VDRVERSION ' $(VDRDIR)/config.h | awk '{ print $$3 }' | sed -e 's/"//g') +### 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) ### The name of the distribution archive: ARCHIVE = $(PLUGIN)-$(VERSION) PACKAGE = vdr-$(ARCHIVE) -### Allow user defined options to overwrite defaults: - --include $(VDRDIR)/Make.config - ### The object files (add further files here): OBJS = $(PLUGIN).o loader.o display.o render.o common.o bitmap.o \ @@ -95,43 +97,67 @@ ifdef BENCH endif endif -INCLUDES += -I$(VDRDIR)/include -I$(DVBDIR)/linux/include -I$(DVBDIR)/include -I. +INCLUDES += -I$(VDRDIR)/include -I. DEFINES += -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"$(PLUGIN)"' +### The main target: + +all: libvdr-$(PLUGIN).so i18n + ### Implicit rules: %.o: %.c $(CXX) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) -o $@ $< -# Dependencies: +### Dependencies: -MAKEDEP = g++ -MM -MG +MAKEDEP = $(CXX) -MM -MG DEPFILE = .dependencies $(DEPFILE): Makefile @$(MAKEDEP) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@ -include $(DEPFILE) -### Targets: +### Internationalization (I18N): + +PODIR = po +LOCALEDIR = $(VDRDIR)/locale +I18Npo = $(notdir $(wildcard $(PODIR)/*.po)) +I18Npot = $(PODIR)/$(PLUGIN).pot + +$(I18Npot): $(wildcard *.c) + xgettext -C -cTRANSLATORS --no-wrap --no-location -k -ktr -ktrNOOP \ + --msgid-bugs-address='<sascha@akv-soft.de>' -o $@ $^ + +%.po: $(I18Npot) + msgmerge -U --no-wrap --no-location --backup=none -q $@ $< + @touch $@ -all: libvdr-$(PLUGIN).so +$(LOCALEDIR)/%/LC_MESSAGES/vdr-$(PLUGIN).mo: $(PODIR)/%.po + @mkdir -p $(dir $@) + msgfmt -c -o $@ $< + +.PHONY: i18n +i18n: $(I18Npo:%.po=$(LOCALEDIR)/%/LC_MESSAGES/vdr-$(PLUGIN).mo) + +### Targets: libvdr-$(PLUGIN).so: $(OBJS) $(CXX) $(CXXFLAGS) -shared $(OBJS) $(LIBS) -o $@ - @cp $@ $(LIBDIR)/$@.$(VDRVERSION) + @cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION) ifndef DEBUG - strip $(LIBDIR)/$@.$(VDRVERSION) + strip $(LIBDIR)/$@.$(APIVERSION) endif dist: clean @-rm -rf $(TMPDIR)/$(ARCHIVE) @mkdir $(TMPDIR)/$(ARCHIVE) @cp -a * $(TMPDIR)/$(ARCHIVE) - @ln -s $(ARCHIVE) $(TMPDIR)/$(PLUGIN) - @tar czf $(PACKAGE).tgz -C $(TMPDIR) $(ARCHIVE) $(PLUGIN) - @-rm -rf $(TMPDIR)/$(ARCHIVE) $(TMPDIR)/$(PLUGIN) + @tar czf $(PACKAGE).tgz -C $(TMPDIR) \ + --exclude debian --exclude CVS --exclude .svn $(ARCHIVE) + @-rm -rf $(TMPDIR)/$(ARCHIVE) @echo Distribution package created as $(PACKAGE).tgz clean: - @-rm -f $(OBJS) $(DEPFILE) *.so *.tgz core* *~ SKINS SKINS.de + @-rm -f $(OBJS) $(DEPFILE) *.so $(I18Npot) *.tgz core* *~ SKINS SKINS.de |