* Got rid of that ugly -DLINUX_VERSION from the makefile,

instead source files now use config.h
This commit is contained in:
Jamie Wilkinson 2002-04-05 01:02:17 +00:00
parent ff75ee0460
commit 1c775689ab
7 changed files with 44 additions and 25 deletions

View file

@ -12,7 +12,7 @@ dnl echo restart configure
dnl exit 1
dnl )
AM_INIT_AUTOMAKE(quake2, 0.1, quake2-devel@quakeforge.net)
AM_INIT_AUTOMAKE(quake2, 0.1)
AM_MAINTAINER_MODE

View file

@ -48,7 +48,7 @@ ref_glx_so_SOURCES = $(REF_GL) gl_glx.c
#ref_sdlgl_so_SOURCES = $(REF_GL) rw_sdl.c
AM_CFLAGS = -Wall -Werror -pipe
AM_CPPFLAGS = -DLINUX_VERSION="\"$(VERSION)\"" -Dstricmp=strcasecmp -I../game
AM_CPPFLAGS = -Dstricmp=strcasecmp -I../game
ref_glx_so_CFLAGS = -fPIC
ref_glx_so_LDFLAGS = -shared

View file

@ -21,6 +21,10 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "qcommon.h"
#include <setjmp.h>
@ -1485,7 +1489,7 @@ void Qcommon_Init (int argc, char **argv)
/* lose the arch
s = va("%4.2f %s %s %s", VERSION, CPUSTRING, __DATE__, BUILDSTRING);
*/
s = va("%4.2f %s %s", VERSION, __DATE__, BUILDSTRING);
s = va("%s %s %s", VERSION, __DATE__, BUILDSTRING);
Cvar_Get ("version", s, CVAR_SERVERINFO|CVAR_NOSET);

View file

@ -19,8 +19,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
// console.c
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "client.h"
console_t con;
cvar_t *con_notifytime;
@ -588,7 +593,7 @@ void Con_DrawConsole (float frac)
SCR_AddDirtyPoint (0,0);
SCR_AddDirtyPoint (viddef.width-1,lines-1);
Com_sprintf (version, sizeof(version), "v%4.2f", VERSION);
Com_sprintf (version, sizeof(version), "v%s", VERSION);
for (x=0 ; x<5 ; x++)
re.DrawChar (viddef.width-44+x*8, lines-12, 128 + version[x] );

View file

@ -61,6 +61,10 @@
#define dlsym(X, Y) dlsym(X, "_"##Y)
#endif
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "qcommon.h"
#include "game.h"
#include "rw.h"
@ -325,7 +329,7 @@ int main (int argc, char **argv)
seteuid(getuid());
/* relnev 0.9 added -- jaq */
printf("Quake II -- Version %s\n", LINUX_VERSION);
printf("QuakeIIForge %s\n", VERSION);
Qcommon_Init(argc, argv);

View file

@ -24,7 +24,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "q_shared.h"
#define VERSION 3.21
/* we define this in config.h now */
/* #define VERSION 3.21 */
#define BASEDIRNAME "baseq2"

View file

@ -1,23 +1,28 @@
/*
Copyright (C) 1997-2001 Id Software, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
/* $Id$
*
* Copyright (C) 1997-2001 Id Software, Inc.
* Copyright (c) 2002 The Quakeforge Project.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "server.h"
netadr_t master_adr[MAX_MASTERS]; // address of group servers
@ -284,7 +289,7 @@ void SVC_DirectConnect (void)
version = atoi(Cmd_Argv(1));
if (version != PROTOCOL_VERSION)
{
Netchan_OutOfBandPrint (NS_SERVER, adr, "print\nServer is version %4.2f.\n", VERSION);
Netchan_OutOfBandPrint (NS_SERVER, adr, "print\nServer is version %s.\n", VERSION);
Com_DPrintf (" rejected connect from version %i\n", version);
return;
}