[quake3-commits] r1855 - in trunk: . code/qcommon

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Fri Feb 4 12:31:12 EST 2011


Author: thilo
Date: 2011-02-04 12:31:12 -0500 (Fri, 04 Feb 2011)
New Revision: 1855

Modified:
   trunk/Makefile
   trunk/code/qcommon/q_platform.h
Log:
Support GNU/kFreeBSD, patch by Cyril Brulebois. Thanks.


Modified: trunk/Makefile
===================================================================
--- trunk/Makefile	2011-02-04 17:22:42 UTC (rev 1854)
+++ trunk/Makefile	2011-02-04 17:31:12 UTC (rev 1855)
@@ -4,7 +4,7 @@
 # GNU Make required
 #
 
-COMPILE_PLATFORM=$(shell uname|sed -e s/_.*//|tr '[:upper:]' '[:lower:]')
+COMPILE_PLATFORM=$(shell uname|sed -e s/_.*//|tr '[:upper:]' '[:lower:]'|sed -e 's/\//_/g')
 
 COMPILE_ARCH=$(shell uname -m | sed -e s/i.86/i386/)
 
@@ -239,7 +239,7 @@
 INSTALL=install
 MKDIR=mkdir
 
-ifeq ($(PLATFORM),linux)
+ifneq (,findstring($(PLATFORM),linux gnu_kfreebsd kfreebsd-gnu))
 
   ifeq ($(ARCH),alpha)
     ARCH=axp

Modified: trunk/code/qcommon/q_platform.h
===================================================================
--- trunk/code/qcommon/q_platform.h	2011-02-04 17:22:42 UTC (rev 1854)
+++ trunk/code/qcommon/q_platform.h	2011-02-04 17:31:12 UTC (rev 1855)
@@ -154,11 +154,16 @@
 
 //================================================================= LINUX ===
 
-#ifdef __linux__
+#if defined(__linux__) || defined(__FreeBSD_kernel__)
 
 #include <endian.h>
 
+#if defined(__linux__)
 #define OS_STRING "linux"
+#else
+#define OS_STRING "kFreeBSD"
+#endif
+
 #define ID_INLINE inline
 #define PATH_SEP '/'
 



More information about the quake3-commits mailing list