summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile127
-rw-r--r--command/Makefile88
-rw-r--r--command/audio.cpp (renamed from audio.cpp)0
-rw-r--r--command/audio.h (renamed from audio.h)0
-rw-r--r--command/debug.h (renamed from debug.h)0
-rw-r--r--command/decoder.cpp (renamed from decoder.cpp)0
-rw-r--r--command/decoder.h (renamed from decoder.h)0
-rw-r--r--command/demux.cpp (renamed from demux.cpp)0
-rw-r--r--command/demux.h (renamed from demux.h)0
-rw-r--r--command/global.h (renamed from global.h)0
-rw-r--r--command/markad-standalone.cpp (renamed from markad-standalone.cpp)0
-rw-r--r--command/markad-standalone.h (renamed from markad-standalone.h)0
-rw-r--r--command/marks.cpp (renamed from marks.cpp)0
-rw-r--r--command/marks.h (renamed from marks.h)0
-rw-r--r--command/pes2es.cpp (renamed from pes2es.cpp)0
-rw-r--r--command/pes2es.h (renamed from pes2es.h)0
-rw-r--r--command/queue.cpp (renamed from queue.cpp)0
-rw-r--r--command/queue.h (renamed from queue.h)0
-rw-r--r--command/streaminfo.cpp (renamed from streaminfo.cpp)0
-rw-r--r--command/streaminfo.h (renamed from streaminfo.h)0
-rw-r--r--command/ts2pkt.cpp (renamed from ts2pkt.cpp)0
-rw-r--r--command/ts2pkt.h (renamed from ts2pkt.h)0
-rw-r--r--command/vdr2pkt.cpp (renamed from vdr2pkt.cpp)0
-rw-r--r--command/vdr2pkt.h (renamed from vdr2pkt.h)0
-rw-r--r--command/video.cpp (renamed from video.cpp)0
-rw-r--r--command/video.h (renamed from video.h)0
-rw-r--r--plugin/Makefile105
-rw-r--r--plugin/markad.cpp (renamed from markad.cpp)0
-rw-r--r--plugin/markad.h (renamed from markad.h)0
-rw-r--r--plugin/po/de_DE.po (renamed from po/de_DE.po)0
-rw-r--r--plugin/po/it_IT.po (renamed from po/it_IT.po)0
-rw-r--r--plugin/status.cpp (renamed from status.cpp)0
-rw-r--r--plugin/status.h (renamed from status.h)0
33 files changed, 213 insertions, 107 deletions
diff --git a/Makefile b/Makefile
index 8184867..f77a297 100644
--- a/Makefile
+++ b/Makefile
@@ -1,124 +1,37 @@
#
-# Makefile for a Video Disk Recorder plugin
+# Makefile for a Video Disk Recorder plugin + program
#
-# $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.
-# 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 = markad
-
-### The version number of this plugin (taken from the main source file):
+DIRS = command plugin
VERSION = $(shell grep 'static const char \*VERSION *=' version.h | awk '{ print $$6 }' | sed -e 's/[";]//g')
-### The C++ compiler and options:
-
-CXX ?= g++
-CXXFLAGS ?= -fPIC -g -O2 -Wall -Wextra -Woverloaded-virtual -Wno-parentheses
-PKG-CONFIG ?= pkg-config
-
-### The directory environment:
-
-VDRDIR = ../../..
-LIBDIR = ../../lib
TMPDIR = /tmp
-
-### Allow user defined options to overwrite defaults:
-
--include $(VDRDIR)/Make.config
-
-### 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)
+ARCHIVE = markad-$(VERSION)
PACKAGE = vdr-$(ARCHIVE)
-### Includes and Defines (add further entries here):
-
-PKG-LIBS += libavcodec
-PKG-INCLUDES += libavcodec
-
-INCLUDES += -I$(VDRDIR)/include
-
-DEFINES += -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"$(PLUGIN)"'
-DEFINES += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
-
-INCLUDES += $(shell $(PKG-CONFIG) --cflags $(PKG-INCLUDES))
-LIBS-CMD += $(shell $(PKG-CONFIG) --libs $(PKG-LIBS))
-
-### The object files (add further files here):
-
-OBJS-CMD = markad-standalone.o decoder.o marks.o streaminfo.o video.o audio.o demux.o queue.o vdr2pkt.o ts2pkt.o pes2es.o
-OBJS = $(PLUGIN).o status.o
-
-### The main target:
-
-all: libvdr-$(PLUGIN).so $(PLUGIN) i18n
-
-### Implicit rules:
-
-%.o: %.cpp
- $(CXX) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) $<
-
-### Dependencies:
-
-MAKEDEP = $(CXX) -MM -MG
-DEPFILE = .dependencies
-$(DEPFILE): Makefile
- @$(MAKEDEP) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.cpp) > $@
- @$(MAKEDEP) $(DEFINES) $(INCLUDES) $(OBJS-CMD:%.o=%.cpp) >> $@
-
--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): $(wildcard *.cpp *.h)
- xgettext -C -cTRANSLATORS --no-wrap --no-location -k -ktr -ktrNOOP --msgid-bugs-address='<see README>' -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 $< $@
-
-.PHONY: i18n
-i18n: $(I18Nmsgs) $(I18Npot)
-
-### Targets:
-
-libvdr-$(PLUGIN).so: $(OBJS)
- $(CXX) $(CXXFLAGS) -shared $(OBJS) $(LIBS) -o $@
- @cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION)
+all:
+ for i in $(DIRS); do make -C $$i; done
-$(PLUGIN): $(OBJS-CMD)
- $(CXX) $(CXXFLAGS) $(OBJS-CMD) $(LIBS-CMD) -o $@
+install:
+ for i in $(DIRS); do make -C $$i install; done
-dist: clean
+dist:
@-rm -rf $(TMPDIR)/$(ARCHIVE)
@mkdir $(TMPDIR)/$(ARCHIVE)
- @cp -a *.cpp *.h $(TMPDIR)/$(ARCHIVE)
- @cp -a logos po COPYING HISTORY README Makefile $(TMPDIR)/$(ARCHIVE)
- @tar czf $(PACKAGE).tgz -C $(TMPDIR) --exclude debian --exclude CVS --exclude .svn --exclude markad.kdevelop --exclude markad.kdevelop.filelist --exclude markad.kdevelop.pcs --exclude markad.kdevses --exclude Doxyfile --exclude test $(ARCHIVE)
+ @mkdir $(TMPDIR)/$(ARCHIVE)/plugin
+ @mkdir $(TMPDIR)/$(ARCHIVE)/plugin/po
+ @mkdir $(TMPDIR)/$(ARCHIVE)/command
+ @mkdir $(TMPDIR)/$(ARCHIVE)/command/logos
+ @cp -a plugin/*.cpp plugin/*.h plugin/Makefile $(TMPDIR)/$(ARCHIVE)/plugin
+ @cp -a plugin/po/*.po $(TMPDIR)/$(ARCHIVE)/plugin/po
+ @cp -a command/*.cpp command/*.h command/Makefile $(TMPDIR)/$(ARCHIVE)/command
+ @cp -a command/logos/*.pgm $(TMPDIR)/$(ARCHIVE)/command/logos
+ @cp -a *.h COPYING HISTORY README INSTALL Makefile $(TMPDIR)/$(ARCHIVE)
+ @tar czf $(PACKAGE).tgz -C $(TMPDIR) $(ARCHIVE)
@-rm -rf $(TMPDIR)/$(ARCHIVE)
@echo Distribution package created as $(PACKAGE).tgz
clean:
- @-rm -f $(OBJS) $(OBJS-COMMON) $(OBJS-CMD) $(DEPFILE) $(PLUGIN) *.so *.so.* *.tgz core* *~ $(PODIR)/*.mo $(PODIR)/*.pot
+ for i in $(DIRS); do make -C $$i clean; done
+ @-rm -f $(PACKAGE).tgz
diff --git a/command/Makefile b/command/Makefile
new file mode 100644
index 0000000..6091c55
--- /dev/null
+++ b/command/Makefile
@@ -0,0 +1,88 @@
+#
+# Makefile for a Video Disk Recorder addon
+#
+
+### The version number of this plugin (taken from the main source file):
+
+VERSION = $(shell grep 'static const char \*VERSION *=' ../version.h | awk '{ print $$6 }' | sed -e 's/[";]//g')
+
+### The C++ compiler and options:
+
+CXX ?= g++
+CXXFLAGS ?= -g -O2 -Wall -Wextra -Woverloaded-virtual -Wno-parentheses
+PKG-CONFIG ?= pkg-config
+
+### Includes and Defines (add further entries here):
+
+PKG-LIBS += libavcodec
+PKG-INCLUDES += libavcodec
+
+DEFINES += -D_GNU_SOURCE
+DEFINES += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
+
+INCLUDES += $(shell $(PKG-CONFIG) --cflags $(PKG-INCLUDES))
+LIBS += $(shell $(PKG-CONFIG) --libs $(PKG-LIBS))
+
+INCLUDES += -I..
+
+### The object files (add further files here):
+
+OBJS = markad-standalone.o decoder.o marks.o streaminfo.o video.o audio.o demux.o queue.o vdr2pkt.o ts2pkt.o pes2es.o
+
+### The main target:
+
+all: markad i18n
+
+### Implicit rules:
+
+%.o: %.cpp
+ $(CXX) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) $<
+
+### Dependencies:
+
+MAKEDEP = $(CXX) -MM -MG
+DEPFILE = .dependencies
+$(DEPFILE): Makefile
+ @$(MAKEDEP) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.cpp) > $@
+
+-include $(DEPFILE)
+
+### Internationalization (I18N):
+
+PODIR = po
+LOCALEDIR = $(DESTDIR)/usr/share/locale
+I18Npo = $(wildcard $(PODIR)/*.po)
+I18Nmsgs = $(addprefix $(LOCALEDIR)/, $(addsuffix /LC_MESSAGES/markad.mo, $(notdir $(foreach file, $(I18Npo), $(basename $(file))))))
+I18Npot = $(PODIR)/markad.pot
+
+%.mo: %.po
+ msgfmt -c -o $@ $<
+
+$(I18Npot): $(wildcard *.cpp *.h)
+ xgettext -C -cTRANSLATORS --no-wrap --no-location -k -ktr -ktrNOOP --msgid-bugs-address='<see README>' -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 $< $@
+
+.PHONY: i18n
+i18n: $(I18Nmsgs) $(I18Npot)
+
+### Targets:
+
+markad: $(OBJS)
+ $(CXX) $(CXXFLAGS) $(OBJS) $(LIBS) -o $@
+
+install: markad
+ @cp --remove-destination markad $(DESTDIR)/usr/bin/markad
+ @strip $(DESTDIR)/usr/bin/markad
+ @mkdir -p $(DESTDIR)/var/lib/markad
+ @cp logos/* $(DESTDIR)/var/lib/markad
+ @echo markad installed
+
+clean:
+ @-rm -f $(OBJS) $(DEPFILE) markad *.so *.so.* *.tgz core* *~ $(PODIR)/*.mo $(PODIR)/*.pot
diff --git a/audio.cpp b/command/audio.cpp
index bd35ddc..bd35ddc 100644
--- a/audio.cpp
+++ b/command/audio.cpp
diff --git a/audio.h b/command/audio.h
index 8995732..8995732 100644
--- a/audio.h
+++ b/command/audio.h
diff --git a/debug.h b/command/debug.h
index a12a972..a12a972 100644
--- a/debug.h
+++ b/command/debug.h
diff --git a/decoder.cpp b/command/decoder.cpp
index 6b01404..6b01404 100644
--- a/decoder.cpp
+++ b/command/decoder.cpp
diff --git a/decoder.h b/command/decoder.h
index 46e9f74..46e9f74 100644
--- a/decoder.h
+++ b/command/decoder.h
diff --git a/demux.cpp b/command/demux.cpp
index 55113a8..55113a8 100644
--- a/demux.cpp
+++ b/command/demux.cpp
diff --git a/demux.h b/command/demux.h
index 3cb85cc..3cb85cc 100644
--- a/demux.h
+++ b/command/demux.h
diff --git a/global.h b/command/global.h
index 1034ded..1034ded 100644
--- a/global.h
+++ b/command/global.h
diff --git a/markad-standalone.cpp b/command/markad-standalone.cpp
index 9d4cb82..9d4cb82 100644
--- a/markad-standalone.cpp
+++ b/command/markad-standalone.cpp
diff --git a/markad-standalone.h b/command/markad-standalone.h
index 01f381a..01f381a 100644
--- a/markad-standalone.h
+++ b/command/markad-standalone.h
diff --git a/marks.cpp b/command/marks.cpp
index 543ed0d..543ed0d 100644
--- a/marks.cpp
+++ b/command/marks.cpp
diff --git a/marks.h b/command/marks.h
index 611f6b7..611f6b7 100644
--- a/marks.h
+++ b/command/marks.h
diff --git a/pes2es.cpp b/command/pes2es.cpp
index 64565a7..64565a7 100644
--- a/pes2es.cpp
+++ b/command/pes2es.cpp
diff --git a/pes2es.h b/command/pes2es.h
index 6b7c6bc..6b7c6bc 100644
--- a/pes2es.h
+++ b/command/pes2es.h
diff --git a/queue.cpp b/command/queue.cpp
index a50e925..a50e925 100644
--- a/queue.cpp
+++ b/command/queue.cpp
diff --git a/queue.h b/command/queue.h
index 20cac32..20cac32 100644
--- a/queue.h
+++ b/command/queue.h
diff --git a/streaminfo.cpp b/command/streaminfo.cpp
index fb2bc9c..fb2bc9c 100644
--- a/streaminfo.cpp
+++ b/command/streaminfo.cpp
diff --git a/streaminfo.h b/command/streaminfo.h
index e08ac7f..e08ac7f 100644
--- a/streaminfo.h
+++ b/command/streaminfo.h
diff --git a/ts2pkt.cpp b/command/ts2pkt.cpp
index 0d13df7..0d13df7 100644
--- a/ts2pkt.cpp
+++ b/command/ts2pkt.cpp
diff --git a/ts2pkt.h b/command/ts2pkt.h
index a485d5b..a485d5b 100644
--- a/ts2pkt.h
+++ b/command/ts2pkt.h
diff --git a/vdr2pkt.cpp b/command/vdr2pkt.cpp
index 8d5a18f..8d5a18f 100644
--- a/vdr2pkt.cpp
+++ b/command/vdr2pkt.cpp
diff --git a/vdr2pkt.h b/command/vdr2pkt.h
index e83013e..e83013e 100644
--- a/vdr2pkt.h
+++ b/command/vdr2pkt.h
diff --git a/video.cpp b/command/video.cpp
index f32faa9..f32faa9 100644
--- a/video.cpp
+++ b/command/video.cpp
diff --git a/video.h b/command/video.h
index e5e35d4..e5e35d4 100644
--- a/video.h
+++ b/command/video.h
diff --git a/plugin/Makefile b/plugin/Makefile
new file mode 100644
index 0000000..9f721a4
--- /dev/null
+++ b/plugin/Makefile
@@ -0,0 +1,105 @@
+#
+# Makefile for a Video Disk Recorder plugin
+#
+
+# 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 = markad
+
+### The version number of this plugin (taken from the main source file):
+
+VERSION = $(shell grep 'static const char \*VERSION *=' ../version.h | awk '{ print $$6 }' | sed -e 's/[";]//g')
+
+### The C++ compiler and options:
+
+CXX ?= g++
+CXXFLAGS ?= -fPIC -g -O2 -Wall -Wextra -Woverloaded-virtual -Wno-parentheses
+
+### The directory environment:
+
+VDRDIR = ../../../..
+LIBDIR = ../../../lib
+TMPDIR = /tmp
+
+### Allow user defined options to overwrite defaults:
+
+-include $(VDRDIR)/Make.config
+
+### 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)
+
+### Includes and Defines (add further entries here):
+
+INCLUDES += -I$(VDRDIR)/include
+INCLUDES += -I..
+
+DEFINES += -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"$(PLUGIN)"'
+DEFINES += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
+
+### The object files (add further files here):
+
+OBJS = $(PLUGIN).o status.o
+
+### The main target:
+
+all: libvdr-$(PLUGIN).so i18n
+
+### Implicit rules:
+
+%.o: %.cpp
+ $(CXX) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) $<
+
+### Dependencies:
+
+MAKEDEP = $(CXX) -MM -MG
+DEPFILE = .dependencies
+$(DEPFILE): Makefile
+ @$(MAKEDEP) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.cpp) > $@
+
+-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): $(wildcard *.cpp *.h)
+ xgettext -C -cTRANSLATORS --no-wrap --no-location -k -ktr -ktrNOOP --msgid-bugs-address='<see README>' -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 $< $@
+
+.PHONY: i18n
+i18n: $(I18Nmsgs) $(I18Npot)
+
+### Targets:
+
+install:
+
+libvdr-$(PLUGIN).so: $(OBJS)
+ $(CXX) $(CXXFLAGS) -shared $(OBJS) $(LIBS) -o $@
+ @cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION)
+
+clean:
+ @-rm -f $(OBJS) $(DEPFILE) *.so *.so.* *.tgz core* *~ $(PODIR)/*.mo $(PODIR)/*.pot
diff --git a/markad.cpp b/plugin/markad.cpp
index 4bf9a9c..4bf9a9c 100644
--- a/markad.cpp
+++ b/plugin/markad.cpp
diff --git a/markad.h b/plugin/markad.h
index 4c45abd..4c45abd 100644
--- a/markad.h
+++ b/plugin/markad.h
diff --git a/po/de_DE.po b/plugin/po/de_DE.po
index e3f8891..e3f8891 100644
--- a/po/de_DE.po
+++ b/plugin/po/de_DE.po
diff --git a/po/it_IT.po b/plugin/po/it_IT.po
index b504784..b504784 100644
--- a/po/it_IT.po
+++ b/plugin/po/it_IT.po
diff --git a/status.cpp b/plugin/status.cpp
index 8cf4966..8cf4966 100644
--- a/status.cpp
+++ b/plugin/status.cpp
diff --git a/status.h b/plugin/status.h
index fbdd7c7..fbdd7c7 100644
--- a/status.h
+++ b/plugin/status.h