From 9de9b9dfbe6b00c63e44e5497718ae4fc77b8ffe Mon Sep 17 00:00:00 2001 From: Dave Chapman Date: Sun, 2 May 2010 09:54:14 +0000 Subject: Take version number from SVN, or via VERSION variable in Makefile - i.e. use "make VERSION=v1.0" to build with that version number. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25774 a1c6a512-1295-4272-9138-f99709370657 --- utils/tcctool/Makefile | 6 +++++- utils/tcctool/tcctool.c | 4 +--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/utils/tcctool/Makefile b/utils/tcctool/Makefile index 4e1ec476ab..7258f2f8cd 100644 --- a/utils/tcctool/Makefile +++ b/utils/tcctool/Makefile @@ -1,7 +1,11 @@ # This contains the file to upload ROMFILE=player.rom -CFLAGS=-Wall -W -I/usr/local/include +ifndef VERSION +VERSION=$(shell ../../tools/version.sh) +endif + +CFLAGS=-Wall -W -I/usr/local/include -DVERSION=\"$(VERSION)\" ifeq ($(findstring CYGWIN,$(shell uname)),CYGWIN) OUTPUT=tcctool.exe diff --git a/utils/tcctool/tcctool.c b/utils/tcctool/tcctool.c index a1d1b70dbc..9fd9863e8a 100644 --- a/utils/tcctool/tcctool.c +++ b/utils/tcctool/tcctool.c @@ -34,8 +34,6 @@ #include #include -#define VERSION "0.1" - #define MAX_FIRMWARESIZE (10*1024*1024) /* Arbitrary limit (for safety) */ /* For win32 compatibility: */ @@ -265,7 +263,7 @@ int main(int argc, char* argv[]) int fd; int device; - printf("tcctool v" VERSION " - (C) 2007 Dave Chapman\n"); + printf("tcctool " VERSION " - (C) 2007-2010 Dave Chapman\n"); printf("This is free software; see the source for copying conditions. There is NO\n"); printf("warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n"); -- cgit v1.2.3