r1218 - in trunk: . code/qcommon code/sys misc/msvc

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Mon Nov 26 15:18:54 EST 2007


Author: tma
Date: 2007-11-26 15:18:53 -0500 (Mon, 26 Nov 2007)
New Revision: 1218

Modified:
   trunk/Makefile
   trunk/code/qcommon/net_ip.c
   trunk/code/qcommon/q_platform.h
   trunk/code/sys/con_tty.c
   trunk/code/sys/sys_local.h
   trunk/misc/msvc/quake3.vcproj
Log:
* Move MINSDL_ values to sys_local.h from Makefile/VC project
* Merge *BSD platform definitions in q_platform.h
* IRIX support (Patrick Baggett <baggett.patrick at figglesoftware.com>)


Modified: trunk/Makefile
===================================================================
--- trunk/Makefile	2007-11-25 23:41:01 UTC (rev 1217)
+++ trunk/Makefile	2007-11-26 20:18:53 UTC (rev 1218)
@@ -636,12 +636,15 @@
 # SETUP AND BUILD -- IRIX
 #############################################################################
 
-ifeq ($(PLATFORM),irix)
+ifeq ($(PLATFORM),irix64)
 
   ARCH=mips  #default to MIPS
 
-  BASE_CFLAGS=-Dstricmp=strcasecmp -Xcpluscomm -woff 1185 -mips3 \
-    -nostdinc -I. -I$(ROOT)/usr/include -DNO_VM_COMPILED
+  CC = c99
+  MKDIR = mkdir -p
+
+  BASE_CFLAGS=-Dstricmp=strcasecmp -Xcpluscomm -woff 1185 \
+    -I. $(shell sdl-config --cflags) -I$(ROOT)/usr/include -DNO_VM_COMPILED
   RELEASE_CFLAGS=$(BASE_CFLAGS) -O3
   DEBUG_CFLAGS=$(BASE_CFLAGS) -g
 
@@ -649,8 +652,10 @@
   SHLIBCFLAGS=
   SHLIBLDFLAGS=-shared
 
-  LDFLAGS=-ldl -lm
-  CLIENT_LDFLAGS=-L/usr/X11/$(LIB) -lGL -lX11 -lXext -lm
+  LDFLAGS=-ldl -lm -lgen
+  # FIXME: The X libraries probably aren't necessary?
+  CLIENT_LDFLAGS=-L/usr/X11/$(LIB) $(shell sdl-config --libs) -lGL \
+    -lX11 -lXext -lm
 
 else # ifeq IRIX
 
@@ -794,9 +799,6 @@
   BASE_CFLAGS += -DSVN_VERSION=\\\"$(SVN_VERSION)\\\"
 endif
 
-# Require a minimum version of SDL
-BASE_CFLAGS += -DMINSDL_MAJOR=1 -DMINSDL_MINOR=2 -DMINSDL_PATCH=7
-
 ifeq ($(V),1)
 echo_cmd=@:
 Q=

Modified: trunk/code/qcommon/net_ip.c
===================================================================
--- trunk/code/qcommon/net_ip.c	2007-11-25 23:41:01 UTC (rev 1217)
+++ trunk/code/qcommon/net_ip.c	2007-11-26 20:18:53 UTC (rev 1218)
@@ -50,6 +50,7 @@
 #include <sys/ioctl.h>
 #include <sys/socket.h>
 #include <sys/types.h>
+#include <sys/time.h>
 #include <unistd.h>
 
 #ifdef MACOS_X

Modified: trunk/code/qcommon/q_platform.h
===================================================================
--- trunk/code/qcommon/q_platform.h	2007-11-25 23:41:01 UTC (rev 1217)
+++ trunk/code/qcommon/q_platform.h	2007-11-26 20:18:53 UTC (rev 1218)
@@ -19,7 +19,7 @@
 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 ===========================================================================
 */
-//
+
 #ifndef __Q_PLATFORM_H
 #define __Q_PLATFORM_H
 
@@ -168,73 +168,28 @@
 
 #endif
 
-//=============================================================== FreeBSD ===
+//=================================================================== BSD ===
 
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
 
 #include <sys/types.h>
 #include <machine/endian.h>
 
+#if defined(__FreeBSD__)
 #define OS_STRING "freebsd"
-#define ID_INLINE inline
-#define PATH_SEP '/'
-
-#ifdef __i386__
-#define ARCH_STRING "i386"
-#elif defined __axp__
-#define ARCH_STRING "alpha"
-#endif
-
-#if BYTE_ORDER == BIG_ENDIAN
-#define Q3_BIG_ENDIAN
-#else
-#define Q3_LITTLE_ENDIAN
-#endif
-
-#define DLL_EXT ".so"
-
-#endif
-
-//=============================================================== OpenBSD ===
-
-#ifdef __OpenBSD__
-
-#include <sys/types.h>
-#include <machine/endian.h>
-
+#elif defined(__OpenBSD__)
 #define OS_STRING "openbsd"
-#define ID_INLINE inline
-#define PATH_SEP '/'
-
-#ifdef __i386__
-#define ARCH_STRING "i386"
+#elif defined(__NetBSD__)
+#define OS_STRING "netbsd"
 #endif
 
-#if BYTE_ORDER == BIG_ENDIAN
-#define Q3_BIG_ENDIAN
-#else
-#define Q3_LITTLE_ENDIAN
-#endif
-
-#define DLL_EXT ".so"
-
-#endif
-
-//================================================================ NetBSD ===
-
-// This is very much like the FreeBSD one and can probably be merged
-#ifdef __NetBSD__
-
-#include <sys/types.h>
-#include <machine/endian.h>
-
-#define OS_STRING "netbsd"
 #define ID_INLINE inline
 #define PATH_SEP '/'
 
 #ifdef __i386__
 #define ARCH_STRING "i386"
-// Netbsd has alot of platforms
+#elif defined __axp__
+#define ARCH_STRING "alpha"
 #endif
 
 #if BYTE_ORDER == BIG_ENDIAN
@@ -274,6 +229,22 @@
 
 #endif
 
+//================================================================== IRIX ===
+
+#ifdef __sgi
+
+#define OS_STRING "irix"
+#define ID_INLINE __inline
+#define PATH_SEP '/'
+
+#define ARCH_STRING "mips"
+
+#define Q3_BIG_ENDIAN // SGI's MIPS are always big endian
+
+#define DLL_EXT ".so"
+
+#endif
+
 //================================================================== Q3VM ===
 
 #ifdef Q3_VM

Modified: trunk/code/sys/con_tty.c
===================================================================
--- trunk/code/sys/con_tty.c	2007-11-25 23:41:01 UTC (rev 1217)
+++ trunk/code/sys/con_tty.c	2007-11-26 20:18:53 UTC (rev 1218)
@@ -27,6 +27,7 @@
 #include <signal.h>
 #include <termios.h>
 #include <fcntl.h>
+#include <sys/time.h>
 
 /*
 =============================================================

Modified: trunk/code/sys/sys_local.h
===================================================================
--- trunk/code/sys/sys_local.h	2007-11-25 23:41:01 UTC (rev 1217)
+++ trunk/code/sys/sys_local.h	2007-11-26 20:18:53 UTC (rev 1218)
@@ -23,6 +23,11 @@
 #include "../qcommon/q_shared.h"
 #include "../qcommon/qcommon.h"
 
+// Require a minimum version of SDL
+#define MINSDL_MAJOR 1
+#define MINSDL_MINOR 2
+#define MINSDL_PATCH 7
+
 // Input subsystem
 void IN_Init (void);
 void IN_Frame (void);

Modified: trunk/misc/msvc/quake3.vcproj
===================================================================
--- trunk/misc/msvc/quake3.vcproj	2007-11-25 23:41:01 UTC (rev 1217)
+++ trunk/misc/msvc/quake3.vcproj	2007-11-26 20:18:53 UTC (rev 1218)
@@ -46,7 +46,7 @@
 				Name="VCCLCompilerTool"
 				Optimization="2"
 				InlineFunctionExpansion="2"
-				PreprocessorDefinitions="_WIN32;WIN32;NDEBUG;_WINDOWS;USE_OPENAL;_CRT_SECURE_NO_DEPRECATE;MINSDL_MAJOR=1;MINSDL_MINOR=2;MINSDL_PATCH=7;BOTLIB;USE_ICON;USE_CURL"
+				PreprocessorDefinitions="_WIN32;WIN32;NDEBUG;_WINDOWS;USE_OPENAL;_CRT_SECURE_NO_DEPRECATE;BOTLIB;USE_ICON;USE_CURL"
 				StringPooling="true"
 				RuntimeLibrary="2"
 				EnableFunctionLevelLinking="true"




More information about the quake3-commits mailing list