r448 - in trunk: code/qcommon code/unix web/include

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Tue Dec 27 14:46:01 EST 2005


Author: tma
Date: 2005-12-27 14:46:01 -0500 (Tue, 27 Dec 2005)
New Revision: 448

Modified:
   trunk/code/qcommon/q_platform.h
   trunk/code/unix/Makefile
   trunk/web/include/status.php
Log:
* NetBSD support patch from optical (alex at rigbo.se)


Modified: trunk/code/qcommon/q_platform.h
===================================================================
--- trunk/code/qcommon/q_platform.h	2005-12-27 10:53:55 UTC (rev 447)
+++ trunk/code/qcommon/q_platform.h	2005-12-27 19:46:01 UTC (rev 448)
@@ -192,6 +192,32 @@
 
 #endif
 
+//================================================================ NetBSD ===
+
+// This is very much like the FreeBSD one and can probably be merged
+#ifdef __NetBSD__
+
+#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
+#endif
+
+#if BYTE_ORDER == BIG_ENDIAN
+#define Q3_BIG_ENDIAN
+#else
+#define Q3_LITTLE_ENDIAN
+#endif
+
+#define DLL_EXT ".so"
+
+#endif
+
 //================================================================= SUNOS ===
 
 #ifdef __sun

Modified: trunk/code/unix/Makefile
===================================================================
--- trunk/code/unix/Makefile	2005-12-27 10:53:55 UTC (rev 447)
+++ trunk/code/unix/Makefile	2005-12-27 19:46:01 UTC (rev 448)
@@ -473,6 +473,47 @@
 else # ifeq freebsd
 
 #############################################################################
+# SETUP AND BUILD -- NETBSD
+#############################################################################
+
+ifeq ($(PLATFORM),netbsd)
+
+  ifeq ($(shell uname -m),i386)
+    ARCH=i386
+  endif
+
+  CC=gcc
+  LDFLAGS=-lm
+  SHLIBEXT=so
+  SHLIBCFLAGS=-fPIC
+  SHLIBLDFLAGS=-shared $(LDFLAGS)
+  THREAD_LDFLAGS=-lpthread
+
+  BASE_CFLAGS = -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes
+  DEBUG_CFLAGS=$(BASE_CFLAGS) -g
+
+  ifneq ($(ARCH),i386)
+    BASE_CFLAGS += -DNO_VM_COMPILED
+  endif
+
+  ifeq ($(ARCH),i386)
+    TARGETS=\
+      $(B)/baseq3/cgame$(ARCH).$(SHLIBEXT) \
+      $(B)/baseq3/qagame$(ARCH).$(SHLIBEXT) \
+      $(B)/baseq3/ui$(ARCH).$(SHLIBEXT) \
+      $(B)/missionpack/cgame$(ARCH).$(SHLIBEXT) \
+      $(B)/missionpack/qagame$(ARCH).$(SHLIBEXT) \
+      $(B)/missionpack/ui$(ARCH).$(SHLIBEXT) \
+      $(B)/$(PLATFORM)q3ded
+  else
+    TARGETS=\
+      $(B)/$(PLATFORM)q3ded
+
+  endif
+
+else # ifeq netbsd
+
+#############################################################################
 # SETUP AND BUILD -- IRIX
 #############################################################################
 
@@ -630,6 +671,7 @@
 endif #darwin
 endif #mingw32
 endif #FreeBSD
+endif #NetBSD
 endif #IRIX
 endif #SunOS
 

Modified: trunk/web/include/status.php
===================================================================
--- trunk/web/include/status.php	2005-12-27 10:53:55 UTC (rev 447)
+++ trunk/web/include/status.php	2005-12-27 19:46:01 UTC (rev 448)
@@ -74,6 +74,13 @@
 		<td></td> <!--Notes-->
 	</tr>
 	<tr>
+		<td scope="row">NetBSD</td> <!--OS-->
+		<td>gcc-x86</td> <!--Platform-->
+		<td>working</td> <!--Status-->
+		<td></td> <!--LKWR-->
+		<td>Dedicated server only with native libs.</td> <!--Notes-->
+	</tr>
+	<tr>
 		<td scope="row" rowspan="2">Solaris</td> <!--OS-->
 		<td>gcc-x86</td> <!--Platform-->
 		<td>working</td> <!--Status-->




More information about the quake3-commits mailing list