Linux version can display SVN revision number in help screen, ONLY IF svn is installed. Otherwise, the normal version number shows.

git-svn-id: https://svn.code.sf.net/p/vbam/code/trunk@346 a31d4220-a93d-0410-bf67-fe4944624d44
This commit is contained in:
mudlord 2008-01-30 10:47:10 +00:00
parent 0183f2a910
commit 2a7f28bf4f
1 changed files with 18 additions and 0 deletions

View File

@ -11,6 +11,7 @@ STRIP=strip -s
DEL=rm -f
OE=.o
OUT=vbam
BASEVERSION=1.8.0
ifeq ($(MACHINE),Darwin)
LFLAGS=-lz -lpng -framework OpenGL `sdl-config --libs`
@ -38,6 +39,23 @@ ifndef $(PREFIX)
PREFIX=/usr/local
endif
ifndef VERSION
SVNVERSION=$(shell test -d .svn && svnversion -n .)
BADCHARS=$(findstring :,$(SVNVERSION))$(findstring S,$(SVNVERSION))
ifeq ($(BADCHARS),)
ifneq ($(SVNVERSION),)
ifneq ($(SVNVERSION),exported)
VERSION=$(BASEVERSION)-r$(subst M,,$(SVNVERSION))
endif
endif
endif
endif
ifdef VERSION
CXXFLAGS+=-DVERSION=\"$(VERSION)\"
endif
MAINDIR=src
SDLDIR=src/sdl
DMGDIR=src/gb