Hello!
Klaus asked me to put this up for discussion:
At least Debian and Debian derivatives provide standard values for
CFLAGS/CXXFLAGS/LDFLAGS/CPPFLAGS/FFLAGS.
VDR's Makefile does not use CPPFLAGS (C-Pre-Processor flags) right now.
Not a big deal and easy to work-around, but for the sake of providing a
"standards-conform" Makefile I suggest adding CPPFLAGS as well.
Please see the attached patch.
It's only a suggestions and Klaus already indicated that such a change
might not make it into 2.0.0, so please don't panic, that all
plugin-Makefiles must be changed once again :-)
bye,
Tobias
Description: Add CPPFLAGS to Makefiles
Author: Tobias Grimm
Index: vdr/Makefile
===
--- vdr.orig/Makefile 2013-02-23 08:23:41.0 +0100
+++ vdr/Makefile 2013-02-23 08:27:58.0 +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.0 +0100
+++ vdr/PLUGINS/src/dvbhddevice/Makefile 2013-02-23 08:27:58.0 +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.0 +0100
+++ vdr/PLUGINS/src/dvbhddevice/libhdffcmd/Makefile 2013-02-23 08:27:58.0 +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.0 +0100
+++ vdr/PLUGINS/src/dvbsddevice/Makefile 2013-02-23 08:27:58.0 +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.0 +0100
+++ vdr/PLUGINS/src/epgtableid0/Makefile 2013-02-23 08:27:58.0 +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