From 5dd0c65e3519c21f79b0e8f69df01c28223e6283 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Fri, 1 Nov 2002 14:05:36 +0100 Subject: [PATCH] The Makefile now includes the file Make.config --- CONTRIBUTORS | 1 + HISTORY | 10 ++++++++++ INSTALL | 2 +- Make.config.template | 25 +++++++++++++++++++++++++ Makefile | 4 +++- PLUGINS/src/hello/HISTORY | 1 + PLUGINS/src/hello/Makefile | 21 ++++++++++++--------- PLUGINS/src/status/HISTORY | 1 + PLUGINS/src/status/Makefile | 21 ++++++++++++--------- newplugin | 21 ++++++++++++--------- 10 files changed, 78 insertions(+), 29 deletions(-) create mode 100644 Make.config.template diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 2af13e17..399ba30d 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -185,6 +185,7 @@ Andreas Schultz for reporting a problem with plugin Makefiles and the NEWSTRUCT driver for pointing out some unnecessary #includes in eit.c and a problem with cMenuRecordings::Del(), which caused warnings with gcc-3.2 + for suggesting a Make.config file Aaron Holtzman for writing 'ac3dec' diff --git a/HISTORY b/HISTORY index 98e562be..bc8b61f7 100644 --- a/HISTORY +++ b/HISTORY @@ -1685,3 +1685,13 @@ Video Disk Recorder Revision History - Updated channels.conf.terr (thanks to Uwe Scheffler). - Fixed displaying the group separators in the channel display (thanks to Martin Hammerschmid for pointing out this one). +- The Makefile now includes the file Make.config (if present in the VDR source + directory), which allows the user to overwrite several settings with individual + values (suggested by Andreas Schultz). The VDR distribution archive does not + contain this file in order to not overwrite a user defined file. There is a + Make.config.template which contains the default values of the macros the user + can overwrite. +- Since there have been changes to the 'newplugin' script authors of plugins + may want to newly create their plugins' Makefiles with the new version of this + script, and adapt them to their individual needs (make sure you don't overwrite + your existing plugin directory - make a backup copy first!). diff --git a/INSTALL b/INSTALL index 7518a3f0..da99593c 100644 --- a/INSTALL +++ b/INSTALL @@ -13,7 +13,7 @@ extracted into the directory /home/kls/vdr/DVB, then this package should be extracted into /home/kls/vdr/VDR. If you have the DVB driver source in a different location you will have to change the definition of DVBDIR in the -Makefile. +Makefile (see the file Make.config.template). VDR requires the Linux-DVB card driver version dated 2002-11-01 or higher to work properly. diff --git a/Make.config.template b/Make.config.template new file mode 100644 index 00000000..774abbf7 --- /dev/null +++ b/Make.config.template @@ -0,0 +1,25 @@ +# +# User defined Makefile options for the Video Disk Recorder +# +# Copy this file to 'Make.config' and change the parameters as necessary. +# +# See the main source file 'vdr.c' for copyright information and +# how to reach the author. +# +# $Id: Make.config.template 1.1 2002/11/01 14:05:36 kls Exp $ + +### The C compiler and options: + +CC = gcc +CFLAGS = -O2 + +CXX = g++ +CXXFLAGS = -g -O2 -Wall -Woverloaded-virtual + +### The directory environment: + +DVBDIR = ../DVB +MANDIR = /usr/local/man +BINDIR = /usr/local/bin + +VIDEODIR = /video diff --git a/Makefile b/Makefile index 7f2bc2d7..d3beb128 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ # See the main source file 'vdr.c' for copyright information and # how to reach the author. # -# $Id: Makefile 1.50 2002/11/01 10:07:35 kls Exp $ +# $Id: Makefile 1.51 2002/11/01 13:11:53 kls Exp $ .DELETE_ON_ERROR: @@ -23,6 +23,8 @@ PLUGINDIR= ./PLUGINS VIDEODIR = /video +-include Make.config + INCLUDES = -I$(DVBDIR)/include DTVLIB = $(DTVDIR)/libdtv.a diff --git a/PLUGINS/src/hello/HISTORY b/PLUGINS/src/hello/HISTORY index 61893d02..8639e056 100644 --- a/PLUGINS/src/hello/HISTORY +++ b/PLUGINS/src/hello/HISTORY @@ -36,3 +36,4 @@ VDR Plugin 'hello' Revision History - Completely switched to the new CVS HEAD version of the linux-dvb driver. The NEWSTRUCT compile time switch is now obsolete. The required driver is now the CVS HEAD version dated 2002-11-01 or later. +- Introduced Make.config. diff --git a/PLUGINS/src/hello/Makefile b/PLUGINS/src/hello/Makefile index 52a695a1..92ac45f8 100644 --- a/PLUGINS/src/hello/Makefile +++ b/PLUGINS/src/hello/Makefile @@ -1,7 +1,7 @@ # # Makefile for a Video Disk Recorder plugin # -# $Id: Makefile 1.6 2002/11/01 10:15:37 kls Exp $ +# $Id: Makefile 1.7 2002/11/01 13:44:11 kls Exp $ # The official name of this plugin. # This name will be used in the '-P...' option of VDR to load the plugin. @@ -13,14 +13,22 @@ PLUGIN = hello VERSION = $(shell grep 'static const char \*VERSION *=' $(PLUGIN).c | awk '{ print $$6 }' | sed -e 's/[";]//g') +### The C++ compiler and options: + +CXX = g++ +CXXFLAGS = -O2 -Wall -Woverloaded-virtual + ### The directory environment: -DVBDIR = ../../../../DVB/include +DVBDIR = ../../../../DVB VDRDIR = ../../.. -VDRINC = $(VDRDIR)/include LIBDIR = ../../lib TMPDIR = /tmp +### Allow user defined options to overwrite defaults: + +-include $(VDRDIR)/Make.config + ### The version number of VDR (taken from VDR's "config.h"): VDRVERSION = $(shell grep 'define VDRVERSION ' $(VDRDIR)/config.h | awk '{ print $$3 }' | sed -e 's/"//g') @@ -32,7 +40,7 @@ PACKAGE = vdr-$(ARCHIVE) ### Includes and Defines (add further entries here): -INCLUDES = -I$(VDRINC) -I$(DVBDIR) +INCLUDES += -I$(VDRDIR)/include -I$(DVBDIR)/include DEFINES += -DPLUGIN_NAME_I18N='"$(PLUGIN)"' @@ -40,11 +48,6 @@ DEFINES += -DPLUGIN_NAME_I18N='"$(PLUGIN)"' OBJS = $(PLUGIN).o i18n.o -### The C++ compiler and options: - -CXX = g++ -CXXFLAGS = -O2 -Wall -Woverloaded-virtual - ### Implicit rules: %.o: %.c diff --git a/PLUGINS/src/status/HISTORY b/PLUGINS/src/status/HISTORY index 45d0fe5c..45d42fbf 100644 --- a/PLUGINS/src/status/HISTORY +++ b/PLUGINS/src/status/HISTORY @@ -22,3 +22,4 @@ VDR Plugin 'status' Revision History - Completely switched to the new CVS HEAD version of the linux-dvb driver. The NEWSTRUCT compile time switch is now obsolete. The required driver is now the CVS HEAD version dated 2002-11-01 or later. +- Introduced Make.config. diff --git a/PLUGINS/src/status/Makefile b/PLUGINS/src/status/Makefile index a9676c11..00fd97b5 100644 --- a/PLUGINS/src/status/Makefile +++ b/PLUGINS/src/status/Makefile @@ -1,7 +1,7 @@ # # Makefile for a Video Disk Recorder plugin # -# $Id: Makefile 1.4 2002/11/01 10:15:44 kls Exp $ +# $Id: Makefile 1.5 2002/11/01 13:44:25 kls Exp $ # The official name of this plugin. # This name will be used in the '-P...' option of VDR to load the plugin. @@ -13,14 +13,22 @@ PLUGIN = status VERSION = $(shell grep 'static const char \*VERSION *=' $(PLUGIN).c | awk '{ print $$6 }' | sed -e 's/[";]//g') +### The C++ compiler and options: + +CXX = g++ +CXXFLAGS = -O2 -Wall -Woverloaded-virtual + ### The directory environment: -DVBDIR = ../../../../DVB/include +DVBDIR = ../../../../DVB VDRDIR = ../../.. -VDRINC = $(VDRDIR)/include LIBDIR = ../../lib TMPDIR = /tmp +### Allow user defined options to overwrite defaults: + +-include $(VDRDIR)/Make.config + ### The version number of VDR (taken from VDR's "config.h"): VDRVERSION = $(shell grep 'define VDRVERSION ' $(VDRDIR)/config.h | awk '{ print $$3 }' | sed -e 's/"//g') @@ -32,7 +40,7 @@ PACKAGE = vdr-$(ARCHIVE) ### Includes and Defines (add further entries here): -INCLUDES = -I$(VDRINC) -I$(DVBDIR) +INCLUDES += -I$(VDRDIR)/include -I$(DVBDIR)/include DEFINES += -DPLUGIN_NAME_I18N='"$(PLUGIN)"' @@ -40,11 +48,6 @@ DEFINES += -DPLUGIN_NAME_I18N='"$(PLUGIN)"' OBJS = $(PLUGIN).o -### The C++ compiler and options: - -CXX = g++ -CXXFLAGS = -O2 -Wall -Woverloaded-virtual - ### Implicit rules: %.o: %.c diff --git a/newplugin b/newplugin index 4032b4f0..c5a06af3 100755 --- a/newplugin +++ b/newplugin @@ -12,7 +12,7 @@ # See the main source file 'vdr.c' for copyright information and # how to reach the author. # -# $Id: newplugin 1.10 2002/11/01 10:06:32 kls Exp $ +# $Id: newplugin 1.11 2002/11/01 13:43:50 kls Exp $ $PLUGIN_NAME = $ARGV[0] || die "Usage: newplugin \n"; @@ -68,14 +68,22 @@ PLUGIN = $PLUGIN_NAME VERSION = \$(shell grep 'static const char \\*VERSION *=' \$(PLUGIN).c | awk '{ print \$\$6 }' | sed -e 's/[";]//g') +### The C++ compiler and options: + +CXX = g++ +CXXFLAGS = -O2 -Wall -Woverloaded-virtual + ### The directory environment: -DVBDIR = ../../../../DVB/include +DVBDIR = ../../../../DVB VDRDIR = ../../.. -VDRINC = \$(VDRDIR)/include LIBDIR = ../../lib TMPDIR = /tmp +### Allow user defined options to overwrite defaults: + +-include \$(VDRDIR)/Make.config + ### The version number of VDR (taken from VDR's "config.h"): VDRVERSION = \$(shell grep 'define VDRVERSION ' \$(VDRDIR)/config.h | awk '{ print \$\$3 }' | sed -e 's/"//g') @@ -87,7 +95,7 @@ PACKAGE = vdr-\$(ARCHIVE) ### Includes and Defines (add further entries here): -INCLUDES = -I\$(VDRINC) -I\$(DVBDIR) +INCLUDES += -I\$(VDRDIR)/include -I\$(DVBDIR)/include DEFINES += -DPLUGIN_NAME_I18N='"\$(PLUGIN)"' @@ -95,11 +103,6 @@ DEFINES += -DPLUGIN_NAME_I18N='"\$(PLUGIN)"' OBJS = \$(PLUGIN).o -### The C++ compiler and options: - -CXX = g++ -CXXFLAGS = -O2 -Wall -Woverloaded-virtual - ### Implicit rules: %.o: %.c