diff --git a/engine/Makefile b/engine/Makefile index 24e1f79f..d7beeff0 100644 --- a/engine/Makefile +++ b/engine/Makefile @@ -8,6 +8,8 @@ CPUOPTIMIZATIONS= BASE_DIR=. +SVNREVISION=-DSVNREVISION=`test -d .svn && svnversion || echo -` + #only limited forms of cross-making is supported #only the following 3 are supported #linux->win32 (FTE_TARGET=win32) RPM Package: "mingw32-gcc", DEB Package: "mingw32" @@ -233,7 +235,7 @@ else BASE_ASM_CFLAGS = -DNOASM endif -BASE_CFLAGS=$(BASE_ASM_CFLAGS) -Wall -Dstrnicmp=strncasecmp -Dstricmp=strcasecmp -I$(CLIENT_DIR) -I$(SERVER_DIR) -I$(COMMON_DIR) -I$(GL_DIR) -I$(D3D9_DIR) -I$(D3D7_DIR) -I$(PROGS_DIR) -I$(LIBS_DIR) -I$(LIBS_DIR)/dxsdk7/include -I$(LIBS_DIR)/sdl/include -I$(LIBS_DIR)/sdl/include/SDL -I./libs/freetype2/include -I./libs/freetype2/include/freetype -D_vsnprintf=vsnprintf -D_snprintf=snprintf +BASE_CFLAGS=$(BASE_ASM_CFLAGS) -Wall -Dstrnicmp=strncasecmp -Dstricmp=strcasecmp -I$(CLIENT_DIR) -I$(SERVER_DIR) -I$(COMMON_DIR) -I$(GL_DIR) -I$(D3D9_DIR) -I$(D3D7_DIR) -I$(PROGS_DIR) -I$(LIBS_DIR) -I$(LIBS_DIR)/dxsdk7/include -I$(LIBS_DIR)/sdl/include -I$(LIBS_DIR)/sdl/include/SDL -I./libs/freetype2/include -I./libs/freetype2/include/freetype -D_vsnprintf=vsnprintf -D_snprintf=snprintf $(SVNREVISION) CLIENT_ONLY_CFLAGS=-DCLIENTONLY SERVER_ONLY_CFLAGS=-DSERVERONLY JOINT_CFLAGS= diff --git a/engine/common/common.c b/engine/common/common.c index 1725c9c0..d3e7ab30 100644 --- a/engine/common/common.c +++ b/engine/common/common.c @@ -2946,6 +2946,12 @@ void COM_Version_f (void) Con_TPrintf (TL_EXEDATETIME, __DATE__, __TIME__); +#ifdef SVNREVISION + #define STRINGIFY2(arg) #arg + #define STRINGIFY(arg) STRINGIFY2(arg) + Con_Printf("SVN Revision: %s\n",STRINGIFY(SVNREVISION)); +#endif + #ifdef _DEBUG Con_Printf("debug build\n"); #endif