summaryrefslogtreecommitdiff
path: root/dist/epgdata2xmltv/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'dist/epgdata2xmltv/Makefile')
-rw-r--r--dist/epgdata2xmltv/Makefile83
1 files changed, 83 insertions, 0 deletions
diff --git a/dist/epgdata2xmltv/Makefile b/dist/epgdata2xmltv/Makefile
new file mode 100644
index 0000000..7c63b0c
--- /dev/null
+++ b/dist/epgdata2xmltv/Makefile
@@ -0,0 +1,83 @@
+#
+# Makefile for epgdata2xmltv
+#
+
+### The C++ compiler and options:
+
+CXX ?= g++
+CXXFLAGS ?= -g -rdynamic -O2 -Wall -Wextra -Woverloaded-virtual -Wno-parentheses
+PKG-CONFIG ?= pkg-config
+STRIP ?= strip
+
+### Includes and Defines (add further entries here):
+
+PKG-LIBS += libxml-2.0 libxslt libexslt libcurl libzip
+PKG-INCLUDES += libxml-2.0 libxslt libexslt libcurl libzip
+
+DEFINES += -D_GNU_SOURCE
+DEFINES += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
+DEFINES += -D__STDC_CONSTANT_MACROS -D__USE_XOPEN_EXTENDED
+
+INCLUDES += $(shell $(PKG-CONFIG) --cflags $(PKG-INCLUDES))
+LIBS += $(shell $(PKG-CONFIG) --libs $(PKG-LIBS))
+
+INCLUDES += -I..
+
+### directory environment
+
+TMPDIR = /tmp
+
+### install directory ###
+
+INSTALL = /usr/bin
+
+### The object files (add further files here):
+
+OBJS = epgdata2xmltv.o
+
+### The main target:
+
+all: epgdata2xmltv_xsl epgdata2xmltv
+
+### 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)
+
+### Targets:
+
+epgdata2xmltv_xsl:
+ echo -n "char xsl[]=\"" > epgdata2xmltv_xsl.h
+ sed -e "s/\"/\\\\\"/g;" epgdata2xmltv.xsl | awk '{ printf("%s",$$0); }' >> epgdata2xmltv_xsl.h
+ echo "\";" >> epgdata2xmltv_xsl.h
+
+epgdata2xmltv: $(OBJS)
+ $(CXX) $(CXXFLAGS) $(OBJS) $(LIBS) -o $@
+
+install: epgdata2xmltv_xsl epgdata2xmltv
+ @cp epgdata2xmltv $(INSTALL)
+ $(STRIP) $(INSTALL)/epgdata2xmltv
+ @mkdir -p /var/lib/epgsources
+ @cp epgdata2xmltv.dist /var/lib/epgsources/epgdata2xmltv
+
+dist: clean
+ @-rm -rf $(TMPDIR)/epgdata2xmltv
+ @mkdir $(TMPDIR)/epgdata2xmltv
+ @cp -a *.cpp *.h *.xsl epgdata2xmltv.dist Makefile $(TMPDIR)/epgdata2xmltv
+ @tar cfz epgdata2xmltv.tgz -C $(TMPDIR) epgdata2xmltv
+ @-rm -rf $(TMPDIR)/epgdata2xmltv
+
+clean:
+ @-rm -f $(OBJS) $(DEPFILE) epgdata2xmltv epgdata2xmltv_xsl.h
+
+distclean: clean
+ @-rm -f *~ *.tgz