From patchwork Sat Feb 23 12:43:21 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tobias Grimm X-Patchwork-Id: 16937 Received: from localhost ([127.0.0.1] helo=www.linuxtv.org) by www.linuxtv.org with esmtp (Exim 4.72) (envelope-from ) id 1U9ESD-0007i5-MM; Sat, 23 Feb 2013 13:43:49 +0100 Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.72) (envelope-from ) id 1U9ERm-0007Ya-UW for vdr@linuxtv.org; Sat, 23 Feb 2013 13:43:48 +0100 X-tubIT-Incoming-IP: 212.227.126.186 Received: from moutng.kundenserver.de ([212.227.126.186]) by mail.tu-berlin.de (exim-4.75/mailfrontend-3) with esmtps [TLSv1:RC4-SHA:128] for id 1U9ERm-0005yF-Ei; Sat, 23 Feb 2013 13:43:22 +0100 Received: from [192.168.30.29] (dslb-188-102-214-188.pools.arcor-ip.net [188.102.214.188]) by mrelayeu.kundenserver.de (node=mreu4) with ESMTP (Nemesis) id 0MJrd2-1UAKuT26zs-0018Ez; Sat, 23 Feb 2013 13:43:21 +0100 Message-ID: <5128B969.2000902@e-tobi.net> Date: Sat, 23 Feb 2013 13:43:21 +0100 From: Tobi User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.12) Gecko/20130116 Icedove/10.0.12 MIME-Version: 1.0 To: vdr@linuxtv.org X-Provags-ID: V02:K0:6GyXstKIwxfdJsJHjaQ5otbLn/AVhgjTmJAnvlpaHE6 hD60XNXg4BWP9eNBdm0Y74k6Nul6127ixTV5b+/01rFDcYVrqv RdzvZaeeWQHTzHBalUV4Y6HyjE8B4clUkafGQN/PyEZWpPaS6e +M7wIKdxQuXl1xflieKrfRSGxyEOZQ3eautXA51RgM9OLdqgxC qMlcltikz998Shncjn+XrIjSyNHxrc0TivC8evpmY2MN/Rwu/X T87uWmht6y4fpUxE0aMs/AI4zP0NETzYngw+FuUNVjBS4sNZFB DgaB4RRhutXE676abIQRpS+Pm6H87duqLN1dEzZAQafP1RQTUW XWUUjNS29I0evuZiCzlk= X-PMX-Version: 5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2013.2.23.123026 X-PMX-Spam: Gauge=IIIIIIIII, Probability=9%, Report=' RCVD_FROM_IP_DATE 0.1, FROM_NAME_ONE_WORD 0.05, HTML_00_01 0.05, HTML_00_10 0.05, MIME_TEXT_ONLY_MP_MIXED 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_10000_PLUS 0, NO_URI_FOUND 0, __BAT_BOUNDARY 0, __CT 0, __CTYPE_HAS_BOUNDARY 0, __CTYPE_MULTIPART 0, __CTYPE_MULTIPART_MIXED 0, __HAS_FROM 0, __HAS_MSGID 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __MOZILLA_MSGID 0, __MOZILLA_USER_AGENT 0, __SANE_MSGID 0, __SUBJ_ALPHA_END 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __USER_AGENT 0' X-LSpam-Score: -1.1 (-) X-LSpam-Report: No, score=-1.1 required=5.0 tests=BAYES_00=-1.9, RDNS_NONE=0.793 autolearn=no Subject: [vdr] RFC: Adding CPPFLAGS to Makefile X-BeenThere: vdr@linuxtv.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: VDR Mailing List List-Id: VDR Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: vdr-bounces@linuxtv.org Errors-To: vdr-bounces@linuxtv.org 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.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)