Index: code/unix/unix_glw.h =================================================================== --- code/unix/unix_glw.h (revision 1013) +++ code/unix/unix_glw.h (working copy) @@ -19,8 +19,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA =========================================================================== */ -#if !( defined __linux__ || defined __FreeBSD__ || defined __sun || defined MACOS_X ) -#error You should include this file only on Linux/FreeBSD/Solaris platforms +#if !( defined __linux__ || defined __FreeBSD__ || defined __sun || defined MACOS_X || defined __sgi ) +#error You should include this file only on Linux/FreeBSD/Solaris/IRIX platforms #endif #ifndef __GLW_LINUX_H__ Index: code/unix/sdl_glimp.c =================================================================== --- code/unix/sdl_glimp.c (revision 1013) +++ code/unix/sdl_glimp.c (working copy) @@ -783,10 +783,11 @@ { if ( r_ext_multitexture->value ) { +#ifndef __sgi qglMultiTexCoord2fARB = ( PFNGLMULTITEXCOORD2FARBPROC ) SDL_GL_GetProcAddress( "glMultiTexCoord2fARB" ); qglActiveTextureARB = ( PFNGLACTIVETEXTUREARBPROC ) SDL_GL_GetProcAddress( "glActiveTextureARB" ); qglClientActiveTextureARB = ( PFNGLCLIENTACTIVETEXTUREARBPROC ) SDL_GL_GetProcAddress( "glClientActiveTextureARB" ); - +#endif if ( qglActiveTextureARB ) { GLint glint = 0; Index: code/renderer/tr_types.h =================================================================== --- code/renderer/tr_types.h (revision 1013) +++ code/renderer/tr_types.h (working copy) @@ -227,7 +227,11 @@ #define _3DFX_DRIVER_NAME "libMesaVoodooGL.so" // https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=524 +#ifdef __sgi +#define OPENGL_DRIVER_NAME "libGL.so" +#else #define OPENGL_DRIVER_NAME "libGL.so.1" +#endif #endif // !defined _WIN32 Index: code/renderer/qgl.h =================================================================== --- code/renderer/qgl.h (revision 1013) +++ code/renderer/qgl.h (working copy) @@ -72,7 +72,7 @@ #include #endif -#elif defined( __sun ) +#elif defined( __sun ) || defined( __sgi ) #include #include @@ -191,7 +191,7 @@ //=========================================================================== // non-dlopening systems will just redefine qgl* to gl* -#if !defined( _WIN32 ) && !defined(MACOS_X) && !defined( __linux__ ) && !defined( __FreeBSD__ ) && !defined(__sun) // rb010123 +#if !defined( _WIN32 ) && !defined(MACOS_X) && !defined( __linux__ ) && !defined( __FreeBSD__ ) && !defined(__sun) && !defined(__sgi) // rb010123 #include "qgl_linked.h" Index: code/qcommon/q_platform.h =================================================================== --- code/qcommon/q_platform.h (revision 1013) +++ code/qcommon/q_platform.h (working copy) @@ -245,6 +245,22 @@ #endif +//================================================================== IRIX === + +#ifdef __sgi + +#define OS_STRING "irix" +#define ID_INLINE __inline +#define PATH_SEP '/' + +#define ARCH_STRING "mips" + +#define Q3_BIG_ENDIAN + +#define DLL_EXT ".so" + +#endif + //================================================================== Q3VM === #ifdef Q3_VM Index: Makefile =================================================================== --- Makefile (revision 1013) +++ Makefile (working copy) @@ -606,13 +606,16 @@ # SETUP AND BUILD -- IRIX ############################################################################# -ifeq ($(PLATFORM),irix) +ifeq ($(PLATFORM),irix64) - ARCH=mips #default to MIPS + ARCH=mips - CC=cc - 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 -mips4 \ + -nostdinc -I. -I$(ROOT)/usr/include -DNO_VM_COMPILED \ + $(shell sdl-config --cflags) -DUSE_SDL_VIDEO=1 -DUSE_SDL_SOUND=1 RELEASE_CFLAGS=$(BASE_CFLAGS) -O3 DEBUG_CFLAGS=$(BASE_CFLAGS) -g @@ -620,8 +623,8 @@ SHLIBCFLAGS= SHLIBLDFLAGS=-shared - LDFLAGS=-ldl -lm - CLIENT_LDFLAGS=-L/usr/X11/$(LIB) -lGL -lX11 -lXext -lm + LDFLAGS=-ldl -lm -lgen + CLIENT_LDFLAGS=-L/usr/X11/$(LIB) $(shell sdl-config --libs) -lGL -lX11 -lXext -lm -lgen else # ifeq IRIX @@ -841,9 +844,14 @@ tools: echo QVM tools not built when cross-compiling else -tools: + ifeq ($(PLATFORM),irix64) + tools: + @echo QVM tools not built on IRIX + else + tools: $(MAKE) -C $(TOOLSDIR)/lcc install $(MAKE) -C $(TOOLSDIR)/asm install + endif endif DO_Q3LCC=$(Q3LCC) -o $@ $< @@ -1837,9 +1845,9 @@ clean2: if [ -d $(B) ];then (find $(B) -name '*.d' -exec rm {} \;)fi - rm -f $(Q3OBJ) $(Q3POBJ) $(Q3POBJ_SMP) $(Q3DOBJ) \ - $(MPGOBJ) $(Q3GOBJ) $(Q3CGOBJ) $(MPCGOBJ) $(Q3UIOBJ) $(MPUIOBJ) \ - $(MPGVMOBJ) $(Q3GVMOBJ) $(Q3CGVMOBJ) $(MPCGVMOBJ) $(Q3UIVMOBJ) $(MPUIVMOBJ) + rm -f $(Q3OBJ) $(Q3POBJ) $(Q3POBJ_SMP) $(Q3DOBJ) + rm -f $(MPGOBJ) $(Q3GOBJ) $(Q3CGOBJ) $(MPCGOBJ) $(Q3UIOBJ) $(MPUIOBJ) + rm -f $(MPGVMOBJ) $(Q3GVMOBJ) $(Q3CGVMOBJ) $(MPCGVMOBJ) $(Q3UIVMOBJ) $(MPUIVMOBJ) rm -f $(TARGETS) clean-debug: