Lines 46-54
Link Here
|
46 |
|
46 |
|
47 |
### The object files (add further files here): |
47 |
### The object files (add further files here): |
48 |
|
48 |
|
49 |
COMMONOBJS = i18n.o \ |
49 |
COMMONOBJS = tools/source.o tools/select.o tools/socket.o tools/tools.o |
50 |
\ |
|
|
51 |
tools/source.o tools/select.o tools/socket.o tools/tools.o |
52 |
|
50 |
|
53 |
|
51 |
|
54 |
SERVEROBJS = $(PLUGIN).o \ |
52 |
SERVEROBJS = $(PLUGIN).o \ |
Lines 87-95
Link Here
|
87 |
|
85 |
|
88 |
-include $(DEPFILE) |
86 |
-include $(DEPFILE) |
89 |
|
87 |
|
|
|
88 |
### Internationalization (I18N): |
89 |
|
90 |
PODIR = po |
91 |
LOCALEDIR = $(VDRDIR)/locale |
92 |
I18Npo = $(wildcard $(PODIR)/*.po) |
93 |
I18Nmo = $(addsuffix .mo, $(foreach file, $(I18Npo), $(basename $(file)))) |
94 |
I18Ndirs = $(notdir $(foreach file, $(I18Npo), $(basename $(file)))) |
95 |
I18Npot = $(PODIR)/$(PLUGIN).pot |
96 |
|
97 |
%.mo: %.po |
98 |
msgfmt -c -o $@ $< |
99 |
|
100 |
$(I18Npot): $(wildcard *.c) |
101 |
xgettext -C -cTRANSLATORS --no-wrap -F -k -ktr -ktrNOOP --msgid-bugs-address='<dev@erichseifert.de>' -o $@ $(wildcard *.c) |
102 |
|
103 |
$(I18Npo): $(I18Npot) |
104 |
msgmerge -U --no-wrap -F --backup=none -q $@ $< |
105 |
|
106 |
i18n: $(I18Nmo) |
107 |
@mkdir -p $(LOCALEDIR) |
108 |
for i in $(I18Ndirs); do\ |
109 |
mkdir -p $(LOCALEDIR)/$$i/LC_MESSAGES;\ |
110 |
cp $(PODIR)/$$i.mo $(LOCALEDIR)/$$i/LC_MESSAGES/vdr-$(PLUGIN).mo;\ |
111 |
done |
112 |
|
90 |
### Targets: |
113 |
### Targets: |
91 |
|
114 |
|
92 |
all: libvdr-$(PLUGIN).so |
115 |
all: libvdr-$(PLUGIN).so i18n |
93 |
|
116 |
|
94 |
libvdr-$(PLUGIN).so: $(SERVEROBJS) $(COMMONOBJS) |
117 |
libvdr-$(PLUGIN).so: $(SERVEROBJS) $(COMMONOBJS) |
95 |
|
118 |
|
Lines 106-109
Link Here
|
106 |
@echo Distribution package created as $(PACKAGE).tar.bz2 |
129 |
@echo Distribution package created as $(PACKAGE).tar.bz2 |
107 |
|
130 |
|
108 |
clean: |
131 |
clean: |
|
|
132 |
@-rm -f $(PODIR)/*.mo $(PODIR)/*.pot |
109 |
@-rm -f $(COMMONOBJS) $(SERVEROBJS) $(DEPFILE) *.so *.tar.bz2 core* *~ *.bak |
133 |
@-rm -f $(COMMONOBJS) $(SERVEROBJS) $(DEPFILE) *.so *.tar.bz2 core* *~ *.bak |