2010-12-02 09:57:17 +01:00
|
|
|
#
|
|
|
|
# Makefile for a Video Disk Recorder plugin
|
|
|
|
#
|
2013-02-27 13:11:23 +01:00
|
|
|
# $Id: $
|
2010-12-02 09:57:17 +01:00
|
|
|
|
|
|
|
# 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.
|
2013-02-27 13:11:23 +01:00
|
|
|
|
2010-12-02 09:57:17 +01:00
|
|
|
PLUGIN = streamdev-server
|
|
|
|
|
2013-02-27 13:11:23 +01:00
|
|
|
### The name of the shared object file:
|
|
|
|
|
|
|
|
SOFILE = libvdr-$(PLUGIN).so
|
|
|
|
|
2010-12-02 09:57:17 +01:00
|
|
|
### Includes and Defines (add further entries here):
|
|
|
|
|
|
|
|
DEFINES += -DPLUGIN_NAME_I18N='"$(PLUGIN)"'
|
|
|
|
|
|
|
|
### The object files (add further files here):
|
|
|
|
|
|
|
|
COMMONOBJS = ../common.o
|
|
|
|
|
|
|
|
SERVEROBJS = $(PLUGIN).o \
|
|
|
|
server.o component.o connection.o \
|
|
|
|
componentVTP.o connectionVTP.o \
|
|
|
|
componentHTTP.o connectionHTTP.o menuHTTP.o \
|
|
|
|
componentIGMP.o connectionIGMP.o \
|
2012-12-16 13:29:15 +01:00
|
|
|
streamer.o livestreamer.o livefilter.o recstreamer.o recplayer.o \
|
2011-11-28 16:23:57 +01:00
|
|
|
menu.o suspend.o setup.o
|
2010-12-02 09:57:17 +01:00
|
|
|
|
|
|
|
### The main target:
|
|
|
|
|
2013-02-27 13:11:23 +01:00
|
|
|
all: $(SOFILE) i18n
|
2010-12-02 09:57:17 +01:00
|
|
|
|
|
|
|
### Implicit rules:
|
|
|
|
|
|
|
|
%.o: %.c
|
|
|
|
$(CXX) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) -o $@ $<
|
|
|
|
|
|
|
|
### Dependencies:
|
|
|
|
|
|
|
|
MAKEDEP = $(CXX) -MM -MG
|
|
|
|
DEPFILE = .dependencies
|
|
|
|
$(DEPFILE): Makefile
|
2013-02-27 13:11:23 +01:00
|
|
|
@$(MAKEDEP) $(CXXFLAGS) $(DEFINES) $(INCLUDES) $(SERVEROBJS:%.o=%.c) $(COMMONOBJS:%.o=%.c) > $@
|
2010-12-02 09:57:17 +01:00
|
|
|
|
|
|
|
-include $(DEPFILE)
|
|
|
|
|
|
|
|
### Internationalization (I18N):
|
|
|
|
|
|
|
|
PODIR = po
|
|
|
|
I18Npo = $(wildcard $(PODIR)/*.po)
|
2013-02-27 13:11:23 +01:00
|
|
|
I18Nmo = $(addsuffix .mo, $(foreach file, $(I18Npo), $(basename $(file))))
|
|
|
|
I18Nmsgs = $(addprefix $(DESTDIR)$(LOCDIR)/, $(addsuffix /LC_MESSAGES/vdr-$(PLUGIN).mo, $(notdir $(foreach file, $(I18Npo), $(basename $(file))))))
|
2010-12-02 09:57:17 +01:00
|
|
|
I18Npot = $(PODIR)/$(PLUGIN).pot
|
|
|
|
|
|
|
|
%.mo: %.po
|
|
|
|
msgfmt -c -o $@ $<
|
|
|
|
|
|
|
|
$(I18Npot): $(SERVEROBJS:%.o=%.c)
|
2013-02-27 13:11:23 +01:00
|
|
|
xgettext -C -cTRANSLATORS --no-wrap --no-location -k -ktr -ktrNOOP --package-name=vdr-$(PLUGIN) --package-version=$(VERSION) --msgid-bugs-address='<vdrdev@schmirler.de>' -o $@ `ls $^`
|
2010-12-02 09:57:17 +01:00
|
|
|
|
|
|
|
%.po: $(I18Npot)
|
2013-02-27 13:11:23 +01:00
|
|
|
msgmerge -U --no-wrap --no-location --backup=none -q -N $@ $<
|
2010-12-02 09:57:17 +01:00
|
|
|
@touch $@
|
|
|
|
|
2013-02-27 13:11:23 +01:00
|
|
|
$(I18Nmsgs): $(DESTDIR)$(LOCDIR)/%/LC_MESSAGES/vdr-$(PLUGIN).mo: $(PODIR)/%.mo
|
|
|
|
install -D -m644 $< $@
|
|
|
|
|
|
|
|
.PHONY: i18n
|
|
|
|
i18n: $(I18Nmo) $(I18Npot)
|
2010-12-02 09:57:17 +01:00
|
|
|
|
2013-02-27 13:11:23 +01:00
|
|
|
install-i18n: $(I18Nmsgs)
|
2010-12-02 09:57:17 +01:00
|
|
|
|
|
|
|
### Targets:
|
|
|
|
|
2013-02-27 13:11:23 +01:00
|
|
|
$(SOFILE): $(SERVEROBJS) $(COMMONOBJS) \
|
2010-12-02 09:57:17 +01:00
|
|
|
../tools/sockettools.a ../remux/remux.a ../libdvbmpeg/libdvbmpegtools.a
|
2013-02-27 13:11:23 +01:00
|
|
|
$(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $^ -o $@
|
|
|
|
|
|
|
|
install-lib: $(SOFILE)
|
|
|
|
install -D $^ $(DESTDIR)$(LIBDIR)/$^.$(APIVERSION)
|
2010-12-02 09:57:17 +01:00
|
|
|
|
2013-02-27 13:11:23 +01:00
|
|
|
install: install-lib install-i18n
|
2010-12-02 09:57:17 +01:00
|
|
|
|
|
|
|
clean:
|
2013-02-27 13:11:23 +01:00
|
|
|
@-rm -f $(PODIR)/*.mo $(PODIR)/*.pot
|
|
|
|
@-rm -f $(COMMONOBJS) $(SERVEROBJS) $(DEPFILE) *.so *.tgz core* *~
|