diff options
author | Thomas Günther <tom@toms-cafe.de> | 2006-04-25 02:09:14 +0200 |
---|---|---|
committer | Thomas Günther <tom@toms-cafe.de> | 2006-04-25 02:09:14 +0200 |
commit | 613de17b03f8653219716f6d25745df7e02ac44d (patch) | |
tree | a6b51c104b3efe79ad4b13c581e34e130f7677fd | |
parent | e9bf999004a4698c75d8aefa9033af87fc086e64 (diff) | |
download | vdr-plugin-sudoku-613de17b03f8653219716f6d25745df7e02ac44d.tar.gz vdr-plugin-sudoku-613de17b03f8653219716f6d25745df7e02ac44d.tar.bz2 |
Added support for APIVERSION define in Makefile
-rw-r--r-- | Doxyfile | 2 | ||||
-rw-r--r-- | Makefile | 23 | ||||
-rw-r--r-- | tools/Makefile | 8 |
3 files changed, 15 insertions, 18 deletions
@@ -986,7 +986,7 @@ INCLUDE_FILE_PATTERNS = # undefined via #undef or recursively expanded use the := operator # instead of the = operator. -PREDEFINED = VDRVERSNUM=$(VDRVERSNUM) +PREDEFINED = # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then # this tag can be used to specify a list of macro names that should be expanded. @@ -3,7 +3,7 @@ # # See the README file for copyright information and how to reach the author. # -# $Id: Makefile 11 2005-10-28 01:00:01Z tom $ +# $Id: Makefile 28 2006-04-25 00:09:14Z tom $ # The official name of this plugin. # This name will be used in the '-P...' option of VDR to load the plugin. @@ -13,17 +13,16 @@ PLUGIN = sudoku ### The version number of this plugin (taken from the main source file): -VERSION = $(shell grep 'static const char\* VERSION *=' $(PLUGIN).cpp | \ - awk '{ print $$6 }' | sed -e 's/[";]//g') +VERSION = $(shell sed -ne '/static .* VERSION *=/s/^.*"\(.*\)".*$$/\1/p' \ + $(PLUGIN).cpp) ### The C++ compiler and options: CXX ?= g++ -CXXFLAGS ?= -fPIC -O2 -Wall -Woverloaded-virtual +CXXFLAGS ?= -fPIC -g -O2 -Wall -Woverloaded-virtual ### The directory environment: -DVBDIR = ../../../../DVB VDRDIR = ../../.. LIBDIR = ../../lib TMPDIR = /tmp @@ -32,12 +31,10 @@ TMPDIR = /tmp -include $(VDRDIR)/Make.config -### The version number of VDR (taken from VDR's "config.h"): +### The version number of VDR's plugin API (taken from VDR's "config.h"): -VDRVERSION = $(shell grep 'define VDRVERSION ' $(VDRDIR)/config.h | \ - awk '{ print $$3 }' | sed -e 's/"//g') -VDRVERSNUM = $(shell grep 'define VDRVERSNUM ' $(VDRDIR)/config.h | \ - awk '{ print $$3 }') +APIVERSION = $(shell sed -ne '/define APIVERSION/s/^.*"\(.*\)".*$$/\1/p' \ + $(VDRDIR)/config.h) ### The name of the distribution archive: @@ -46,7 +43,7 @@ PACKAGE = vdr-$(ARCHIVE) ### Includes and Defines (add further entries here): -INCLUDES += -I$(VDRDIR)/include -I$(DVBDIR)/include +INCLUDES += -I$(VDRDIR)/include DEFINES += -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"$(PLUGIN)"' @@ -76,7 +73,7 @@ all: libvdr-$(PLUGIN).so libvdr-$(PLUGIN).so: $(OBJS) $(CXX) $(CXXFLAGS) -shared $(OBJS) -o $@ - @cp $@ $(LIBDIR)/$@.$(VDRVERSION) + @cp $@ $(LIBDIR)/$@.$(APIVERSION) dist: clean @-rm -rf $(TMPDIR)/$(ARCHIVE) @@ -88,7 +85,7 @@ dist: clean @echo Distribution package created as $(PACKAGE).tgz srcdoc: Doxyfile $(OBJS:%.o=%.cpp) $(OBJS:%.o=%.h) - VERSION=$(VERSION) VDRVERSNUM=$(VDRVERSNUM) /usr/bin/doxygen + VERSION=$(VERSION) /usr/bin/doxygen clean: @-rm -f $(OBJS) $(DEPFILE) *.so* *.tgz core* *~ diff --git a/tools/Makefile b/tools/Makefile index cd02cfb..3dbc685 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -3,7 +3,7 @@ # # See the README file for copyright information and how to reach the author. # -# $Id: Makefile 11 2005-10-28 01:00:01Z tom $ +# $Id: Makefile 28 2006-04-25 00:09:14Z tom $ # Define STATIC_LINK=1 to force static linking #STATIC_LINK = 1 @@ -15,11 +15,11 @@ PROGRAM = sudoku_generator SRCS = ../puzzle.cpp ../generator.cpp ../solver.cpp ../backtrack.cpp -VERSION = $(shell grep 'static const char\* VERSION *=' ../sudoku.cpp | \ - awk '{ print $$6 }' | sed -e 's/[";]//g') +VERSION = $(shell sed -ne '/static .* VERSION *=/s/^.*"\(.*\)".*$$/\1/p' \ + ../sudoku.cpp) CXX ?= g++ -CXXFLAGS ?= -O2 -Wall -Woverloaded-virtual +CXXFLAGS ?= -g -O2 -Wall -Woverloaded-virtual DEFINES += -D_GNU_SOURCE -DVERSION=\"$(VERSION)\" ifdef STATIC_LINK |