mirror of
https://github.com/rofafor/vdr-plugin-femon.git
synced 2023-10-10 11:36:53 +00:00
Updated for vdr-1.5.7.
This commit is contained in:
32
Makefile
32
Makefile
@@ -20,7 +20,7 @@ PLUGIN = femon
|
||||
|
||||
### The version number of this plugin (taken from the main source file):
|
||||
|
||||
VERSION = $(shell grep 'static const char VERSION\[\] *=' $(PLUGIN).h | awk '{ print $$6 }' | sed -e 's/[";]//g')
|
||||
VERSION = $(shell grep 'static const char VERSION\[\] *=' $(PLUGIN).c | awk '{ print $$6 }' | sed -e 's/[";]//g')
|
||||
|
||||
### The C++ compiler and options:
|
||||
|
||||
@@ -65,7 +65,7 @@ all-redirect: all
|
||||
|
||||
### The object files (add further files here):
|
||||
|
||||
OBJS = femon.o femonosd.o femonreceiver.o femoncfg.o femoni18n.o femontools.o
|
||||
OBJS = femon.o femonosd.o femonreceiver.o femoncfg.o femontools.o
|
||||
|
||||
### Implicit rules:
|
||||
|
||||
@@ -81,9 +81,34 @@ $(DEPFILE): Makefile
|
||||
|
||||
-include $(DEPFILE)
|
||||
|
||||
### Internationalization (I18N):
|
||||
|
||||
PODIR = po
|
||||
LOCALEDIR = $(VDRDIR)/locale
|
||||
I18Npo = $(wildcard $(PODIR)/*.po)
|
||||
I18Nmo = $(addsuffix .mo, $(foreach file, $(I18Npo), $(basename $(file))))
|
||||
I18Ndirs = $(notdir $(foreach file, $(I18Npo), $(basename $(file))))
|
||||
I18Npot = $(PODIR)/$(PLUGIN).pot
|
||||
|
||||
%.mo: %.po
|
||||
msgfmt -c -o $@ $<
|
||||
|
||||
$(I18Npot): $(wildcard *.c)
|
||||
xgettext -C -cTRANSLATORS --no-wrap -F -k -ktr -ktrNOOP --msgid-bugs-address='Rolf Ahrenberg' -o $@ $(wildcard *.c)
|
||||
|
||||
$(I18Npo): $(I18Npot)
|
||||
msgmerge -U --no-wrap -F --backup=none -q $@ $<
|
||||
|
||||
i18n: $(I18Nmo)
|
||||
@mkdir -p $(LOCALEDIR)
|
||||
for i in $(I18Ndirs); do\
|
||||
mkdir -p $(LOCALEDIR)/$$i/LC_MESSAGES;\
|
||||
cp $(PODIR)/$$i.mo $(LOCALEDIR)/$$i/LC_MESSAGES/$(PLUGIN).mo;\
|
||||
done
|
||||
|
||||
### Targets:
|
||||
|
||||
all: libvdr-$(PLUGIN).so
|
||||
all: libvdr-$(PLUGIN).so i18n
|
||||
|
||||
libvdr-$(PLUGIN).so: $(OBJS)
|
||||
$(CXX) $(CXXFLAGS) -shared $(OBJS) -o $@
|
||||
@@ -101,4 +126,5 @@ dist: clean
|
||||
@echo Distribution package created as $(PACKAGE).tgz
|
||||
|
||||
clean:
|
||||
@-rm -f $(PODIR)/*.mo $(PODIR)/*.pot
|
||||
@-rm -f $(OBJS) $(DEPFILE) *.so *.tgz core* *~
|
||||
|
||||
Reference in New Issue
Block a user