diff options
author | Frank Schmirler <vdr@schmirler.de> | 2013-02-27 13:11:23 +0100 |
---|---|---|
committer | Frank Schmirler <vdr@schmirler.de> | 2013-02-27 13:11:23 +0100 |
commit | 08198729ac2717a1638a9a20f128bc71705c21cf (patch) | |
tree | 877275c97f42e4f8e8e72aedfdbf841da6a797d9 /server | |
parent | 10db11acd9a9785443182da1ec032c1d83db271a (diff) | |
download | vdr-plugin-streamdev-08198729ac2717a1638a9a20f128bc71705c21cf.tar.gz vdr-plugin-streamdev-08198729ac2717a1638a9a20f128bc71705c21cf.tar.bz2 |
Adapted Makefiles to VDR 1.7.36+ (thanks to macmenot). Old makefiles have
been renamed to Makefile-1.7.33 (fixes #1199)
Diffstat (limited to 'server')
-rw-r--r-- | server/Makefile | 45 | ||||
-rw-r--r-- | server/Makefile-1.7.33 | 82 |
2 files changed, 108 insertions, 19 deletions
diff --git a/server/Makefile b/server/Makefile index 00c471c..37cd4bb 100644 --- a/server/Makefile +++ b/server/Makefile @@ -1,14 +1,18 @@ # # Makefile for a Video Disk Recorder plugin # -# $Id: Makefile,v 1.2 2010/07/19 13:49:31 schmirl Exp $ +# $Id: $ # 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. -# + PLUGIN = streamdev-server +### The name of the shared object file: + +SOFILE = libvdr-$(PLUGIN).so + ### Includes and Defines (add further entries here): DEFINES += -DPLUGIN_NAME_I18N='"$(PLUGIN)"' @@ -27,8 +31,7 @@ SERVEROBJS = $(PLUGIN).o \ ### The main target: -.PHONY: all i18n clean -all: libvdr-$(PLUGIN).so i18n +all: $(SOFILE) i18n ### Implicit rules: @@ -39,44 +42,48 @@ all: libvdr-$(PLUGIN).so i18n MAKEDEP = $(CXX) -MM -MG DEPFILE = .dependencies - $(DEPFILE): Makefile - @$(MAKEDEP) $(DEFINES) $(INCLUDES) $(SERVEROBJS:%.o=%.c) $(COMMONOBJS:%.o=%.c) > $@ + @$(MAKEDEP) $(CXXFLAGS) $(DEFINES) $(INCLUDES) $(SERVEROBJS:%.o=%.c) $(COMMONOBJS:%.o=%.c) > $@ -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)))))) +I18Nmo = $(addsuffix .mo, $(foreach file, $(I18Npo), $(basename $(file)))) +I18Nmsgs = $(addprefix $(DESTDIR)$(LOCDIR)/, $(addsuffix /LC_MESSAGES/vdr-$(PLUGIN).mo, $(notdir $(foreach file, $(I18Npo), $(basename $(file)))))) I18Npot = $(PODIR)/$(PLUGIN).pot %.mo: %.po msgfmt -c -o $@ $< $(I18Npot): $(SERVEROBJS:%.o=%.c) - xgettext -C -cTRANSLATORS --no-wrap --no-location -k -ktr -ktrNOOP --msgid-bugs-address='<http://www.vdr-developer.org/mantisbt/>' -o $@ $^ + 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 $^` %.po: $(I18Npot) - msgmerge -U --no-wrap --no-location --backup=none -q $@ $< + msgmerge -U --no-wrap --no-location --backup=none -q -N $@ $< @touch $@ -$(I18Nmsgs): $(LOCALEDIR)/%/LC_MESSAGES/vdr-$(PLUGIN).mo: $(PODIR)/%.mo - @mkdir -p $(dir $@) - cp $< $@ +$(I18Nmsgs): $(DESTDIR)$(LOCDIR)/%/LC_MESSAGES/vdr-$(PLUGIN).mo: $(PODIR)/%.mo + install -D -m644 $< $@ + +.PHONY: i18n +i18n: $(I18Nmo) $(I18Npot) -i18n: $(I18Nmsgs) +install-i18n: $(I18Nmsgs) ### Targets: -libvdr-$(PLUGIN).so: $(SERVEROBJS) $(COMMONOBJS) \ +$(SOFILE): $(SERVEROBJS) $(COMMONOBJS) \ ../tools/sockettools.a ../remux/remux.a ../libdvbmpeg/libdvbmpegtools.a + $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $^ -o $@ + +install-lib: $(SOFILE) + install -D $^ $(DESTDIR)$(LIBDIR)/$^.$(APIVERSION) -%.so: - $(CXX) $(CXXFLAGS) -shared $^ -o $@ - @cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION) +install: install-lib install-i18n clean: - @-rm -f $(COMMONOBJS) $(SERVEROBJS) $(DEPFILE) $(PODIR)/*.mo $(PODIR)/*.pot *.so *.tgz core* *~ + @-rm -f $(PODIR)/*.mo $(PODIR)/*.pot + @-rm -f $(COMMONOBJS) $(SERVEROBJS) $(DEPFILE) *.so *.tgz core* *~ diff --git a/server/Makefile-1.7.33 b/server/Makefile-1.7.33 new file mode 100644 index 0000000..00c471c --- /dev/null +++ b/server/Makefile-1.7.33 @@ -0,0 +1,82 @@ +# +# Makefile for a Video Disk Recorder plugin +# +# $Id: Makefile,v 1.2 2010/07/19 13:49:31 schmirl Exp $ + +# 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. +# +PLUGIN = streamdev-server + +### 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 \ + streamer.o livestreamer.o livefilter.o recstreamer.o recplayer.o \ + menu.o suspend.o setup.o + +### The main target: + +.PHONY: all i18n clean +all: libvdr-$(PLUGIN).so i18n + +### Implicit rules: + +%.o: %.c + $(CXX) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) -o $@ $< + +### Dependencies: + +MAKEDEP = $(CXX) -MM -MG +DEPFILE = .dependencies + +$(DEPFILE): Makefile + @$(MAKEDEP) $(DEFINES) $(INCLUDES) $(SERVEROBJS:%.o=%.c) $(COMMONOBJS:%.o=%.c) > $@ + +-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): $(SERVEROBJS:%.o=%.c) + xgettext -C -cTRANSLATORS --no-wrap --no-location -k -ktr -ktrNOOP --msgid-bugs-address='<http://www.vdr-developer.org/mantisbt/>' -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 $< $@ + +i18n: $(I18Nmsgs) + +### Targets: + +libvdr-$(PLUGIN).so: $(SERVEROBJS) $(COMMONOBJS) \ + ../tools/sockettools.a ../remux/remux.a ../libdvbmpeg/libdvbmpegtools.a + +%.so: + $(CXX) $(CXXFLAGS) -shared $^ -o $@ + @cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION) + +clean: + @-rm -f $(COMMONOBJS) $(SERVEROBJS) $(DEPFILE) $(PODIR)/*.mo $(PODIR)/*.pot *.so *.tgz core* *~ |