From fbe4f2a0568a1bf893f2bf970edcbb3d345e5db5 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Wed, 18 Jan 2012 12:40:17 +0100 Subject: [PATCH] Some improvements to the Makefiles --- CONTRIBUTORS | 4 ++++ HISTORY | 1 + Make.config.template | 33 ++++++++++++++++---------------- Makefile | 13 ++++++------- PLUGINS/src/dvbsddevice/Makefile | 8 ++++---- PLUGINS/src/hello/Makefile | 8 ++++---- PLUGINS/src/osddemo/Makefile | 10 +++++----- PLUGINS/src/pictures/Makefile | 8 ++++---- PLUGINS/src/servicedemo/Makefile | 10 +++++----- PLUGINS/src/skincurses/Makefile | 8 ++++---- PLUGINS/src/status/Makefile | 10 +++++----- PLUGINS/src/svdrpdemo/Makefile | 8 ++++---- libsi/Makefile | 8 ++++---- newplugin | 8 ++++---- 14 files changed, 71 insertions(+), 66 deletions(-) diff --git a/CONTRIBUTORS b/CONTRIBUTORS index cabaa825..586e8a54 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -2817,3 +2817,7 @@ Torsten Lang of EPG data from BSkyB's "MTV MUSIC" for suggesting to make BIDI support check at runtime whether the system runs with UTF-8 + +Christian Ruppert + for some improvements to the Makefiles + diff --git a/HISTORY b/HISTORY index b7762673..ce99e189 100644 --- a/HISTORY +++ b/HISTORY @@ -6849,3 +6849,4 @@ Video Disk Recorder Revision History a device that starts a recording on a different band. - Fixed the return type of cMyDeviceHook::DeviceProvidesTransponder() in PLUGINS.html. - Fixed a crash in a plugin using cDeviceHook when VDR ends (reported by Oliver Endriss). +- Some improvements to the Makefiles (thanks to Christian Ruppert). diff --git a/Make.config.template b/Make.config.template index 0de5bb97..f128c5b3 100644 --- a/Make.config.template +++ b/Make.config.template @@ -6,15 +6,15 @@ # See the main source file 'vdr.c' for copyright information and # how to reach the author. # -# $Id: Make.config.template 2.4 2011/12/04 14:41:00 kls Exp $ +# $Id: Make.config.template 2.5 2012/01/18 12:20:51 kls Exp $ ### The C compiler and options: -CC = gcc -CFLAGS = -g -O3 -Wall +CC ?= gcc +CFLAGS ?= -g -O3 -Wall -CXX = g++ -CXXFLAGS = -g -O3 -Wall -Woverloaded-virtual -Wno-parentheses +CXX ?= g++ +CXXFLAGS ?= -g -O3 -Wall -Woverloaded-virtual -Wno-parentheses ifdef PLUGIN CFLAGS += -fPIC @@ -23,23 +23,24 @@ endif ### The directory environment: -#DVBDIR = /usr/src/v4l-dvb/linux -MANDIR = /usr/local/man -BINDIR = /usr/local/bin +PREFIX ?= $(DESTDIR)/usr/local +#DVBDIR ?= /usr/src/v4l-dvb/linux +MANDIR ?= $(PREFIX)/man +BINDIR ?= $(PREFIX)/bin -LOCDIR = ./locale -PLUGINDIR= ./PLUGINS -PLUGINLIBDIR= $(PLUGINDIR)/lib -VIDEODIR = /video -CONFDIR = $(VIDEODIR) +LOCDIR ?= ./locale +PLUGINDIR ?= ./PLUGINS +PLUGINLIBDIR ?= $(PLUGINDIR)/lib +VIDEODIR ?= /video +CONFDIR ?= $(VIDEODIR) ### The remote control: -LIRC_DEVICE = /var/run/lirc/lircd -RCU_DEVICE = /dev/ttyS1 +LIRC_DEVICE ?= /var/run/lirc/lircd +RCU_DEVICE ?= /dev/ttyS1 ## Define if you want vdr to not run as root -#VDR_USER = vdr +#VDR_USER ?= vdr ### You don't need to touch the following: diff --git a/Makefile b/Makefile index ea34eac1..93a51125 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 2.23 2012/01/14 13:02:21 kls Exp $ +# $Id: Makefile 2.24 2012/01/18 12:19:37 kls Exp $ .DELETE_ON_ERROR: @@ -17,10 +17,10 @@ CXXFLAGS ?= -g -O3 -Wall -Woverloaded-virtual -Wno-parentheses LSIDIR = ./libsi DESTDIR ?= PREFIX ?= /usr/local -MANDIR = $(PREFIX)/share/man -BINDIR = $(PREFIX)/bin -INCDIR = $(PREFIX)/include -LOCDIR = ./locale +MANDIR ?= $(PREFIX)/share/man +BINDIR ?= $(PREFIX)/bin +INCDIR ?= $(PREFIX)/include +LOCDIR ?= ./locale LIBS = -ljpeg -lpthread -ldl -lcap -lrt $(shell pkg-config --libs freetype2 fontconfig) INCLUDES ?= $(shell pkg-config --cflags freetype2 fontconfig) @@ -30,7 +30,7 @@ PLUGINLIBDIR= $(PLUGINDIR)/lib VIDEODIR = /video CONFDIR = $(VIDEODIR) -DOXYGEN = /usr/bin/doxygen +DOXYGEN ?= /usr/bin/doxygen DOXYFILE = Doxyfile PCDIR ?= $(firstword $(subst :, , ${PKG_CONFIG_PATH}:$(shell pkg-config --variable=pc_path pkg-config):$(PREFIX)/lib/pkgconfig)) @@ -246,4 +246,3 @@ clean: -rm -rf include -rm -rf srcdoc CLEAN: clean - diff --git a/PLUGINS/src/dvbsddevice/Makefile b/PLUGINS/src/dvbsddevice/Makefile index 55299767..bf5f7173 100644 --- a/PLUGINS/src/dvbsddevice/Makefile +++ b/PLUGINS/src/dvbsddevice/Makefile @@ -1,7 +1,7 @@ # # Makefile for a Video Disk Recorder plugin # -# $Id: Makefile 1.7 2011/05/21 12:25:37 kls Exp $ +# $Id: Makefile 1.8 2012/01/18 12:28:43 kls Exp $ # The official name of this plugin. # This name will be used in the '-P...' option of VDR to load the plugin. @@ -22,9 +22,9 @@ CXXFLAGS ?= -g -O3 -Wall -Woverloaded-virtual -Wno-parentheses ### The directory environment: -VDRDIR = ../../.. -LIBDIR = ../../lib -TMPDIR = /tmp +VDRDIR ?= ../../.. +LIBDIR ?= ../../lib +TMPDIR ?= /tmp ### Make sure that necessary options are included: diff --git a/PLUGINS/src/hello/Makefile b/PLUGINS/src/hello/Makefile index b59d08ae..b1a5af11 100644 --- a/PLUGINS/src/hello/Makefile +++ b/PLUGINS/src/hello/Makefile @@ -1,7 +1,7 @@ # # Makefile for a Video Disk Recorder plugin # -# $Id: Makefile 2.7 2011/05/21 12:25:41 kls Exp $ +# $Id: Makefile 2.8 2012/01/18 12:29:09 kls Exp $ # The official name of this plugin. # This name will be used in the '-P...' option of VDR to load the plugin. @@ -22,9 +22,9 @@ CXXFLAGS ?= -g -O3 -Wall -Woverloaded-virtual -Wno-parentheses ### The directory environment: -VDRDIR = ../../.. -LIBDIR = ../../lib -TMPDIR = /tmp +VDRDIR ?= ../../.. +LIBDIR ?= ../../lib +TMPDIR ?= /tmp ### Make sure that necessary options are included: diff --git a/PLUGINS/src/osddemo/Makefile b/PLUGINS/src/osddemo/Makefile index d93d802d..d192b4ae 100644 --- a/PLUGINS/src/osddemo/Makefile +++ b/PLUGINS/src/osddemo/Makefile @@ -1,7 +1,7 @@ # # Makefile for a Video Disk Recorder plugin # -# $Id: Makefile 2.3 2011/02/27 10:05:01 kls Exp $ +# $Id: Makefile 2.4 2012/01/18 12:17:23 kls Exp $ # The official name of this plugin. # This name will be used in the '-P...' option of VDR to load the plugin. @@ -20,9 +20,9 @@ CXXFLAGS ?= -g -O3 -Wall -Woverloaded-virtual -Wno-parentheses ### The directory environment: -VDRDIR = ../../.. -LIBDIR = ../../lib -TMPDIR = /tmp +VDRDIR ?= ../../.. +LIBDIR ?= ../../lib +TMPDIR ?= /tmp ### Make sure that necessary options are included: @@ -62,7 +62,7 @@ all: libvdr-$(PLUGIN).so # Dependencies: -MAKEDEP = g++ -MM -MG +MAKEDEP = $(CXX) -MM -MG DEPFILE = .dependencies $(DEPFILE): Makefile @$(MAKEDEP) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@ diff --git a/PLUGINS/src/pictures/Makefile b/PLUGINS/src/pictures/Makefile index 456207bd..112586bc 100644 --- a/PLUGINS/src/pictures/Makefile +++ b/PLUGINS/src/pictures/Makefile @@ -1,7 +1,7 @@ # # Makefile for a Video Disk Recorder plugin # -# $Id: Makefile 2.7 2011/05/21 12:25:45 kls Exp $ +# $Id: Makefile 2.8 2012/01/18 12:30:05 kls Exp $ # The official name of this plugin. # This name will be used in the '-P...' option of VDR to load the plugin. @@ -22,9 +22,9 @@ CXXFLAGS ?= -g -O3 -Wall -Woverloaded-virtual -Wno-parentheses ### The directory environment: -VDRDIR = ../../.. -LIBDIR = ../../lib -TMPDIR = /tmp +VDRDIR ?= ../../.. +LIBDIR ?= ../../lib +TMPDIR ?= /tmp ### Make sure that necessary options are included: diff --git a/PLUGINS/src/servicedemo/Makefile b/PLUGINS/src/servicedemo/Makefile index 2c8b17b4..b2713ed7 100644 --- a/PLUGINS/src/servicedemo/Makefile +++ b/PLUGINS/src/servicedemo/Makefile @@ -1,7 +1,7 @@ # # Makefile for a Video Disk Recorder plugin # -# $Id: Makefile 2.3 2011/02/27 10:05:04 kls Exp $ +# $Id: Makefile 2.4 2012/01/18 12:17:23 kls Exp $ # The official name of this plugin. # This name will be used in the '-P...' option of VDR to load the plugin. @@ -22,9 +22,9 @@ CXXFLAGS ?= -g -O3 -Wall -Woverloaded-virtual -Wno-parentheses ### The directory environment: -VDRDIR = ../../.. -LIBDIR = ../../lib -TMPDIR = /tmp +VDRDIR ?= ../../.. +LIBDIR ?= ../../lib +TMPDIR ?= /tmp ### Make sure that necessary options are included: @@ -64,7 +64,7 @@ all: libvdr-$(PLUGIN1).so libvdr-$(PLUGIN2).so # Dependencies: -MAKEDEP = g++ -MM -MG +MAKEDEP = $(CXX) -MM -MG DEPFILE = .dependencies $(DEPFILE): Makefile @$(MAKEDEP) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@ diff --git a/PLUGINS/src/skincurses/Makefile b/PLUGINS/src/skincurses/Makefile index a765b654..62f5d257 100644 --- a/PLUGINS/src/skincurses/Makefile +++ b/PLUGINS/src/skincurses/Makefile @@ -1,7 +1,7 @@ # # Makefile for a Video Disk Recorder plugin # -# $Id: Makefile 2.7 2011/05/21 12:25:49 kls Exp $ +# $Id: Makefile 2.8 2012/01/18 12:30:52 kls Exp $ # The official name of this plugin. # This name will be used in the '-P...' option of VDR to load the plugin. @@ -22,9 +22,9 @@ CXXFLAGS ?= -g -O3 -Wall -Woverloaded-virtual -Wno-parentheses ### The directory environment: -VDRDIR = ../../.. -LIBDIR = ../../lib -TMPDIR = /tmp +VDRDIR ?= ../../.. +LIBDIR ?= ../../lib +TMPDIR ?= /tmp ### Make sure that necessary options are included: diff --git a/PLUGINS/src/status/Makefile b/PLUGINS/src/status/Makefile index f166981d..3e9b170d 100644 --- a/PLUGINS/src/status/Makefile +++ b/PLUGINS/src/status/Makefile @@ -1,7 +1,7 @@ # # Makefile for a Video Disk Recorder plugin # -# $Id: Makefile 2.3 2011/02/27 10:05:08 kls Exp $ +# $Id: Makefile 2.4 2012/01/18 12:17:23 kls Exp $ # The official name of this plugin. # This name will be used in the '-P...' option of VDR to load the plugin. @@ -20,9 +20,9 @@ CXXFLAGS ?= -g -O3 -Wall -Woverloaded-virtual -Wno-parentheses ### The directory environment: -VDRDIR = ../../.. -LIBDIR = ../../lib -TMPDIR = /tmp +VDRDIR ?= ../../.. +LIBDIR ?= ../../lib +TMPDIR ?= /tmp ### Make sure that necessary options are included: @@ -62,7 +62,7 @@ all: libvdr-$(PLUGIN).so # Dependencies: -MAKEDEP = g++ -MM -MG +MAKEDEP = $(CXX) -MM -MG DEPFILE = .dependencies $(DEPFILE): Makefile @$(MAKEDEP) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@ diff --git a/PLUGINS/src/svdrpdemo/Makefile b/PLUGINS/src/svdrpdemo/Makefile index 2c84920d..1f640b86 100644 --- a/PLUGINS/src/svdrpdemo/Makefile +++ b/PLUGINS/src/svdrpdemo/Makefile @@ -1,7 +1,7 @@ # # Makefile for a Video Disk Recorder plugin # -# $Id: Makefile 2.3 2011/02/27 10:05:10 kls Exp $ +# $Id: Makefile 2.4 2012/01/18 12:17:23 kls Exp $ # The official name of this plugin. # This name will be used in the '-P...' option of VDR to load the plugin. @@ -20,9 +20,9 @@ CXXFLAGS ?= -g -O3 -Wall -Woverloaded-virtual -Wno-parentheses ### The directory environment: -VDRDIR = ../../.. -LIBDIR = ../../lib -TMPDIR = /tmp +VDRDIR ?= ../../.. +LIBDIR ?= ../../lib +TMPDIR ?= /tmp ### Make sure that necessary options are included: diff --git a/libsi/Makefile b/libsi/Makefile index b24eb31d..9d2d40dd 100644 --- a/libsi/Makefile +++ b/libsi/Makefile @@ -1,15 +1,15 @@ # # Makefile for a libsi # -# $Id: Makefile 2.2 2011/12/04 14:18:38 kls Exp $ +# $Id: Makefile 2.3 2012/01/18 12:31:40 kls Exp $ ### The C++ compiler and options: CXX ?= g++ CXXFLAGS ?= -O2 -g -Wall -Woverloaded-virtual -AR = ar -ARFLAGS = ru -RANLIB = ranlib +AR ?= ar +ARFLAGS ?= ru +RANLIB ?= ranlib include ../Make.global -include ../Make.config diff --git a/newplugin b/newplugin index 19c7d7fd..53cbb73e 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 2.6 2011/02/27 10:06:06 kls Exp $ +# $Id: newplugin 2.7 2012/01/18 12:32:31 kls Exp $ $PLUGIN_NAME = $ARGV[0] || die "Usage: newplugin \n"; @@ -81,9 +81,9 @@ CXXFLAGS ?= -g -O3 -Wall -Woverloaded-virtual -Wno-parentheses ### The directory environment: -VDRDIR = ../../.. -LIBDIR = ../../lib -TMPDIR = /tmp +VDRDIR ?= ../../.. +LIBDIR ?= ../../lib +TMPDIR ?= /tmp ### Make sure that necessary options are included: