--- Makefile +++ Makefile @@ -1,10 +1,10 @@ -RELEASE_CFLAGS=-Dstricmp=strcasecmp -mcpu=i586 -march=i586 -O6 -ffast-math -funroll-loops -fomit-frame-pointer -fexpensive-optimizations +RELEASE_CFLAGS=-Dstricmp=strcasecmp $(OPTFLAGS) -DGENTOO_LIBDIR='\"$(GENTOO_LIBDIR)\"' -DGENTOO_DATADIR='\"$(GENTOO_DATADIR)\"' DEBUG_CFLAGS=-Dstricmp=strcasecmp -g CFLAGS=$(RELEASE_CFLAGS) -DR_FLAGS=-DGLQUAKE -D_DLL_BUILD -shared +DR_FLAGS=-DGLQUAKE -D_DLL_BUILD -shared -fPIC renderers=build/dr_default.so build/brush.so build/bprint.so build/sketch.so --- NPRQuakeSrc/common.c +++ NPRQuakeSrc/common.c @@ -1775,11 +1775,16 @@ // start up with GAMENAME by default (id1) // COM_AddGameDirectory (va("%s/"GAMENAME, basedir) ); + COM_AddGameDirectory (GENTOO_DATADIR"/"GAMENAME); - if (COM_CheckParm ("-rogue")) + if (COM_CheckParm ("-rogue")) { COM_AddGameDirectory (va("%s/rogue", basedir) ); - if (COM_CheckParm ("-hipnotic")) + COM_AddGameDirectory (GENTOO_DATADIR"/rogue"); + } + if (COM_CheckParm ("-hipnotic")) { COM_AddGameDirectory (va("%s/hipnotic", basedir) ); + COM_AddGameDirectory (GENTOO_DATADIR"/hipnotic"); + } // // -game @@ -1790,6 +1795,7 @@ { com_modified = true; COM_AddGameDirectory (va("%s/%s", basedir, com_argv[i+1])); + COM_AddGameDirectory (va(GENTOO_DATADIR"/%s", com_argv[i+1])); } // --- NPRQuakeSrc/gl_rmisc.c +++ NPRQuakeSrc/gl_rmisc.c @@ -563,13 +563,15 @@ // this should be as big as the number of functions we pull out. void * tf[25]; + char * libz0r[1024]; memset( tf, 0, sizeof( void * ) * 25 ); #ifdef _WIN32 //JG hnewlib = LoadLibrary( lib ); #else - hnewlib = dlopen( lib, RTLD_LAZY | RTLD_GLOBAL ); + sprintf(libz0r, GENTOO_LIBDIR "/%s", lib); + hnewlib = dlopen( libz0r, RTLD_LAZY | RTLD_GLOBAL ); #endif if( hnewlib == NULL ) { --- NPRQuakeSrc/Makefile +++ NPRQuakeSrc/Makefile @@ -29,7 +29,7 @@ CC=gcc -RELEASE_CFLAGS=$(BASE_CFLAGS) -mcpu=i586 -march=i586 -O6 -ffast-math -funroll-loops -fomit-frame-pointer -fexpensive-optimizations +RELEASE_CFLAGS=$(BASE_CFLAGS) $(OPTFLAGS) -DGENTOO_LIBDIR='\"$(GENTOO_LIBDIR)\"' -DGENTOO_DATADIR='\"$(GENTOO_DATADIR)\"' DEBUG_CFLAGS=$(BASE_CFLAGS) -g LDFLAGS=-lm CFLAGS=$(RELEASE_CFLAGS) @@ -176,7 +176,7 @@ $(DO_GL_CC) $(BUILDDIR)/glquake/common.o : common.c - $(DO_GL_DEBUG_CC) + $(DO_GL_CC) $(BUILDDIR)/glquake/console.o : console.c $(DO_GL_CC) --- NPRQuakeSrc/sys_linux.c +++ NPRQuakeSrc/sys_linux.c @@ -86,7 +86,7 @@ void Sys_Printf (char *fmt, ...) { va_list argptr; - char text[2048]; + char text[4096]; unsigned char *p; va_start (argptr,fmt);