Description: Add CPPFLAGS to Makefiles
Author: Tobias Grimm <tg@e-tobi.net>

Index: vdr/Makefile
===================================================================
--- vdr.orig/Makefile	2013-02-23 08:23:41.000000000 +0100
+++ vdr/Makefile	2013-02-23 08:27:58.000000000 +0100
@@ -114,14 +114,14 @@
 # Implicit rules:
 
 %.o: %.c
-	$(CXX) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) -o $@ $<
+	$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) -o $@ $<
 
 # Dependencies:
 
 MAKEDEP = $(CXX) -MM -MG
 DEPFILE = .dependencies
 $(DEPFILE): Makefile
-	@$(MAKEDEP) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@
+	@$(MAKEDEP) $(CPPFLAGS) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@
 
 -include $(DEPFILE)
 
@@ -133,7 +133,7 @@
 # The libsi library:
 
 $(SILIB):
-	$(MAKE) --no-print-directory -C $(LSIDIR) CXXFLAGS="$(CXXFLAGS)" DEFINES="$(CDEFINES)" all
+	$(MAKE) --no-print-directory -C $(LSIDIR) CPPFLAGS="$(CPPFLAGS)" CXXFLAGS="$(CXXFLAGS)" DEFINES="$(CDEFINES)" all
 
 # pkg-config file:
 
@@ -213,7 +213,7 @@
 	    if ! grep -q "PKGCFG" "$(PLUGINDIR)/src/$$i/Makefile" ; then\
 	       echo "WARNING: plugin $$i is using an old Makefile!";\
 	       oldmakefile="$$oldmakefile $$i";\
-	       $(MAKE) --no-print-directory -C "$(PLUGINDIR)/src/$$i" CFLAGS="$(CFLAGS) $(CDEFINES) $(CINCLUDES)" CXXFLAGS="$(CXXFLAGS) $(CDEFINES) $(CINCLUDES)" LIBDIR="$(PLUGINDIR)/lib" VDRDIR="$(CWD)" all || failed="$$failed $$i";\
+	       $(MAKE) --no-print-directory -C "$(PLUGINDIR)/src/$$i" CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS) $(CDEFINES) $(CINCLUDES)" CXXFLAGS="$(CXXFLAGS) $(CDEFINES) $(CINCLUDES)" LIBDIR="$(PLUGINDIR)/lib" VDRDIR="$(CWD)" all || failed="$$failed $$i";\
 	       continue;\
 	       fi;\
 	    # New Makefile\
Index: vdr/PLUGINS/src/dvbhddevice/Makefile
===================================================================
--- vdr.orig/PLUGINS/src/dvbhddevice/Makefile	2013-02-23 08:23:41.000000000 +0100
+++ vdr/PLUGINS/src/dvbhddevice/Makefile	2013-02-23 08:27:58.000000000 +0100
@@ -62,14 +62,14 @@
 ### Implicit rules:
 
 %.o: %.c
-	$(CXX) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) -o $@ $<
+	$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) -o $@ $<
 
 ### Dependencies:
 
 MAKEDEP = $(CXX) -MM -MG
 DEPFILE = .dependencies
 $(DEPFILE): Makefile
-	@$(MAKEDEP) $(CXXFLAGS) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@
+	@$(MAKEDEP) $(CPPFLAGS) $(CXXFLAGS) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@
 
 -include $(DEPFILE)
 
Index: vdr/PLUGINS/src/dvbhddevice/libhdffcmd/Makefile
===================================================================
--- vdr.orig/PLUGINS/src/dvbhddevice/libhdffcmd/Makefile	2013-02-23 08:23:41.000000000 +0100
+++ vdr/PLUGINS/src/dvbhddevice/libhdffcmd/Makefile	2013-02-23 08:27:58.000000000 +0100
@@ -27,14 +27,14 @@
 ### Implicit rules:
 
 %.o: %.c
-	$(CC) $(CFLAGS) -c $(DEFINES) $(INCLUDES) $<
+	$(CC) $(CPPFLAGS) $(CFLAGS) -c $(DEFINES) $(INCLUDES) $<
 
 ### Dependencies:
 
 MAKEDEP = $(CC) -MM -MG
 DEPFILE = .dependencies
 $(DEPFILE): Makefile
-	@$(MAKEDEP) $(DEFINES) $(INCLUDES) $(LIB_OBJS:%.o=%.c) > $@
+	@$(MAKEDEP) $(CPPFLAGS) $(DEFINES) $(INCLUDES) $(LIB_OBJS:%.o=%.c) > $@
 
 -include $(DEPFILE)
 
Index: vdr/PLUGINS/src/dvbsddevice/Makefile
===================================================================
--- vdr.orig/PLUGINS/src/dvbsddevice/Makefile	2013-02-23 08:23:41.000000000 +0100
+++ vdr/PLUGINS/src/dvbsddevice/Makefile	2013-02-23 08:27:58.000000000 +0100
@@ -61,14 +61,14 @@
 ### Implicit rules:
 
 %.o: %.c
-	$(CXX) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) -o $@ $<
+	$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) -o $@ $<
 
 ### Dependencies:
 
 MAKEDEP = $(CXX) -MM -MG
 DEPFILE = .dependencies
 $(DEPFILE): Makefile
-	@$(MAKEDEP) $(CXXFLAGS) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@
+	@$(MAKEDEP) $(CPPFLAGS) $(CXXFLAGS) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@
 
 -include $(DEPFILE)
 
Index: vdr/PLUGINS/src/epgtableid0/Makefile
===================================================================
--- vdr.orig/PLUGINS/src/epgtableid0/Makefile	2013-02-23 08:23:41.000000000 +0100
+++ vdr/PLUGINS/src/epgtableid0/Makefile	2013-02-23 08:27:58.000000000 +0100
@@ -61,14 +61,14 @@
 ### Implicit rules:
 
 %.o: %.c
-	$(CXX) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) -o $@ $<
+	$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) -o $@ $<
 
 ### Dependencies:
 
 MAKEDEP = $(CXX) -MM -MG
 DEPFILE = .dependencies
 $(DEPFILE): Makefile
-	@$(MAKEDEP) $(CXXFLAGS) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@
+	@$(MAKEDEP) $(CPPFLAGS) $(CXXFLAGS) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@
 
 -include $(DEPFILE)
 
Index: vdr/PLUGINS/src/hello/Makefile
===================================================================
--- vdr.orig/PLUGINS/src/hello/Makefile	2013-02-23 08:23:41.000000000 +0100
+++ vdr/PLUGINS/src/hello/Makefile	2013-02-23 08:27:58.000000000 +0100
@@ -62,14 +62,14 @@
 ### Implicit rules:
 
 %.o: %.c
-	$(CXX) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) -o $@ $<
+	$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) -o $@ $<
 
 ### Dependencies:
 
 MAKEDEP = $(CXX) -MM -MG
 DEPFILE = .dependencies
 $(DEPFILE): Makefile
-	@$(MAKEDEP) $(CXXFLAGS) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@
+	@$(MAKEDEP) $(CPPFLAGS) $(CXXFLAGS) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@
 
 -include $(DEPFILE)
 
Index: vdr/PLUGINS/src/osddemo/Makefile
===================================================================
--- vdr.orig/PLUGINS/src/osddemo/Makefile	2013-02-23 08:23:41.000000000 +0100
+++ vdr/PLUGINS/src/osddemo/Makefile	2013-02-23 08:27:58.000000000 +0100
@@ -61,14 +61,14 @@
 ### Implicit rules:
 
 %.o: %.c
-	$(CXX) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) -o $@ $<
+	$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) -o $@ $<
 
 ### Dependencies:
 
 MAKEDEP = $(CXX) -MM -MG
 DEPFILE = .dependencies
 $(DEPFILE): Makefile
-	@$(MAKEDEP) $(CXXFLAGS) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@
+	@$(MAKEDEP) $(CPPFLAGS) $(CXXFLAGS) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@
 
 -include $(DEPFILE)
 
Index: vdr/PLUGINS/src/pictures/Makefile
===================================================================
--- vdr.orig/PLUGINS/src/pictures/Makefile	2013-02-23 08:23:41.000000000 +0100
+++ vdr/PLUGINS/src/pictures/Makefile	2013-02-23 08:27:58.000000000 +0100
@@ -62,14 +62,14 @@
 ### Implicit rules:
 
 %.o: %.c
-	$(CXX) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) -o $@ $<
+	$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) -o $@ $<
 
 ### Dependencies:
 
 MAKEDEP = $(CXX) -MM -MG
 DEPFILE = .dependencies
 $(DEPFILE): Makefile
-	@$(MAKEDEP) $(CXXFLAGS) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@
+	@$(MAKEDEP) $(CPPFLAGS) $(CXXFLAGS) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@
 
 -include $(DEPFILE)
 
Index: vdr/PLUGINS/src/rcu/Makefile
===================================================================
--- vdr.orig/PLUGINS/src/rcu/Makefile	2013-02-23 08:23:41.000000000 +0100
+++ vdr/PLUGINS/src/rcu/Makefile	2013-02-23 08:27:58.000000000 +0100
@@ -61,14 +61,14 @@
 ### Implicit rules:
 
 %.o: %.c
-	$(CXX) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) -o $@ $<
+	$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) -o $@ $<
 
 ### Dependencies:
 
 MAKEDEP = $(CXX) -MM -MG
 DEPFILE = .dependencies
 $(DEPFILE): Makefile
-	@$(MAKEDEP) $(CXXFLAGS) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@
+	@$(MAKEDEP) $(CPPFLAGS) $(CXXFLAGS) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@
 
 -include $(DEPFILE)
 
Index: vdr/PLUGINS/src/servicedemo/Makefile
===================================================================
--- vdr.orig/PLUGINS/src/servicedemo/Makefile	2013-02-23 08:23:41.000000000 +0100
+++ vdr/PLUGINS/src/servicedemo/Makefile	2013-02-23 08:27:58.000000000 +0100
@@ -58,14 +58,14 @@
 ### Implicit rules:
 
 %.o: %.c
-	$(CXX) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) -o $@ $<
+	$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) -o $@ $<
 
 ### Dependencies:
 
 MAKEDEP = $(CXX) -MM -MG
 DEPFILE = .dependencies
 $(DEPFILE): Makefile
-	@$(MAKEDEP) $(CXXFLAGS) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@
+	@$(MAKEDEP) $(CPPFLAGS) $(CXXFLAGS) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@
 
 -include $(DEPFILE)
 
Index: vdr/PLUGINS/src/skincurses/Makefile
===================================================================
--- vdr.orig/PLUGINS/src/skincurses/Makefile	2013-02-23 08:23:41.000000000 +0100
+++ vdr/PLUGINS/src/skincurses/Makefile	2013-02-23 08:27:58.000000000 +0100
@@ -62,14 +62,14 @@
 ### Implicit rules:
 
 %.o: %.c
-	$(CXX) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) -o $@ $<
+	$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) -o $@ $<
 
 ### Dependencies:
 
 MAKEDEP = $(CXX) -MM -MG
 DEPFILE = .dependencies
 $(DEPFILE): Makefile
-	@$(MAKEDEP) $(CXXFLAGS) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@
+	@$(MAKEDEP) $(CPPFLAGS) $(CXXFLAGS) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@
 
 -include $(DEPFILE)
 
Index: vdr/PLUGINS/src/status/Makefile
===================================================================
--- vdr.orig/PLUGINS/src/status/Makefile	2013-02-23 08:23:41.000000000 +0100
+++ vdr/PLUGINS/src/status/Makefile	2013-02-23 08:27:58.000000000 +0100
@@ -61,14 +61,14 @@
 ### Implicit rules:
 
 %.o: %.c
-	$(CXX) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) -o $@ $<
+	$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) -o $@ $<
 
 ### Dependencies:
 
 MAKEDEP = $(CXX) -MM -MG
 DEPFILE = .dependencies
 $(DEPFILE): Makefile
-	@$(MAKEDEP) $(CXXFLAGS) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@
+	@$(MAKEDEP) $(CPPFLAGS) $(CXXFLAGS) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@
 
 -include $(DEPFILE)
 
Index: vdr/PLUGINS/src/svdrpdemo/Makefile
===================================================================
--- vdr.orig/PLUGINS/src/svdrpdemo/Makefile	2013-02-23 08:23:41.000000000 +0100
+++ vdr/PLUGINS/src/svdrpdemo/Makefile	2013-02-23 08:27:58.000000000 +0100
@@ -61,14 +61,14 @@
 ### Implicit rules:
 
 %.o: %.c
-	$(CXX) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) -o $@ $<
+	$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) -o $@ $<
 
 ### Dependencies:
 
 MAKEDEP = $(CXX) -MM -MG
 DEPFILE = .dependencies
 $(DEPFILE): Makefile
-	@$(MAKEDEP) $(CXXFLAGS) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@
+	@$(MAKEDEP) $(CPPFLAGS) $(CXXFLAGS) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@
 
 -include $(DEPFILE)
 
Index: vdr/libsi/Makefile
===================================================================
--- vdr.orig/libsi/Makefile	2013-02-23 08:23:41.000000000 +0100
+++ vdr/libsi/Makefile	2013-02-23 08:27:58.000000000 +0100
@@ -18,14 +18,14 @@
 ### Implicit rules:
 
 %.o: %.c
-	$(CXX) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) $<
+	$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) $<
 
 ### Dependencies:
 
 MAKEDEP = $(CXX) -MM -MG
 DEPFILE = .dependencies
 $(DEPFILE): Makefile
-	@$(MAKEDEP) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@
+	@$(MAKEDEP) $(CPPFLAGS) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@
 
 -include $(DEPFILE)
 
Index: vdr/newplugin
===================================================================
--- vdr.orig/newplugin	2013-02-23 08:27:55.000000000 +0100
+++ vdr/newplugin	2013-02-23 08:31:21.000000000 +0100
@@ -121,14 +121,14 @@
 ### Implicit rules:
 
 %.o: %.c
-	\$(CXX) \$(CXXFLAGS) -c \$(DEFINES) \$(INCLUDES) -o \$\@ \$<
+	\$(CXX) \$(CPPFLAGS) \$(CXXFLAGS) -c \$(DEFINES) \$(INCLUDES) -o \$\@ \$<
 
 ### Dependencies:
 
 MAKEDEP = \$(CXX) -MM -MG
 DEPFILE = .dependencies
 \$(DEPFILE): Makefile
-	\@\$(MAKEDEP) \$(CXXFLAGS) \$(DEFINES) \$(INCLUDES) \$(OBJS:%.o=%.c) > \$\@
+	\@\$(MAKEDEP) \$(CPPFLAGS) \$(CXXFLAGS) \$(DEFINES) \$(INCLUDES) \$(OBJS:%.o=%.c) > \$\@
 
 -include \$(DEPFILE)
 
