aboutsummaryrefslogtreecommitdiffstats
path: root/code/unix
diff options
context:
space:
mode:
authortma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea>2005-11-26 15:01:28 +0000
committertma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea>2005-11-26 15:01:28 +0000
commit59b6a5ccdb397cdd3a47c97d6cda5438a225a338 (patch)
tree2fab1bfb840fc08009145560102c678ccf79ed2c /code/unix
parent26b9cf5a0ca15a80690060daf5f3cbf0576ade28 (diff)
downloadioquake3-aero-59b6a5ccdb397cdd3a47c97d6cda5438a225a338.tar.gz
ioquake3-aero-59b6a5ccdb397cdd3a47c97d6cda5438a225a338.zip
* Disable ccache by default. If you want it, add USE_CCACHE=1 to Makefile.local
* Remove -gfull from linux section in Makefile -- it's darwin only * Cast away some warnings that surfaced from using "new" AL headers * Various whitespace and consistency fixes git-svn-id: svn://svn.icculus.org/quake3/trunk@375 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code/unix')
-rw-r--r--code/unix/Makefile33
-rw-r--r--code/unix/sdl_glimp.c4
-rw-r--r--code/unix/unix_main.c51
3 files changed, 39 insertions, 49 deletions
diff --git a/code/unix/Makefile b/code/unix/Makefile
index b4bfd15..3a7584d 100644
--- a/code/unix/Makefile
+++ b/code/unix/Makefile
@@ -54,7 +54,7 @@ DXSDK_DIR=C:/DXSDK
endif
ifndef USE_CCACHE
-USE_CCACHE=1
+USE_CCACHE=0
endif
export USE_CCACHE
@@ -118,7 +118,6 @@ ifeq ($(PLATFORM),linux)
GLIBC=-glibc
CC=gcc
- CXX=g++
ifeq ($(ARCH),alpha)
ARCH=axp
@@ -138,9 +137,6 @@ ifeq ($(PLATFORM),linux)
BASE_CFLAGS = -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes -pipe
- # Always include debug symbols...you can strip the binary later...
- BASE_CFLAGS += -gfull
-
ifeq ($(USE_OPENAL),1)
BASE_CFLAGS += -DUSE_OPENAL=1
ifeq ($(USE_OPENAL_DLOPEN),1)
@@ -244,12 +240,11 @@ else # ifeq Linux
ifeq ($(PLATFORM),darwin)
GLIBC=
CC=gcc
- CXX=g++
VM_PPC=vm_ppc_new
BASE_CFLAGS = -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes
- BASE_CFLAGS += -DMACOS_X=1 -fno-common -pipe
+ BASE_CFLAGS += -DMACOS_X -fno-common -pipe
# Always include debug symbols...you can strip the binary later...
BASE_CFLAGS += -gfull
@@ -269,7 +264,7 @@ ifeq ($(PLATFORM),darwin)
OPTIMIZE = -O3 -ffast-math -fomit-frame-pointer -falign-loops=16
ifeq ($(ARCH),ppc)
- BASE_CFLAGS += -faltivec
+ BASE_CFLAGS += -faltivec
ifneq ($(VM_PPC),)
HAVE_VM_COMPILED=true
endif
@@ -300,7 +295,7 @@ ifeq ($(PLATFORM),darwin)
ifeq ($(USE_SDL),1)
# We copy sdlmain before ranlib'ing it so that subversion doesn't think
# the file has been modified by each build.
- LIBSDLMAIN=$(B)/libSDLmain.a
+ LIBSDLMAIN=$(B)/libSDLmain.a
LIBSDLMAINSRC=../libs/macosx/libSDLmain.a
CLIENT_LDFLAGS=-framework Cocoa -framework OpenGL ../libs/macosx/libSDL-1.2.0.dylib
else
@@ -345,7 +340,6 @@ ifeq ($(PLATFORM),mingw32)
GLIBC=-mingw
CC=gcc
- CXX=g++
WINDRES=windres
ifeq ($(ARCH),i386)
@@ -508,7 +502,6 @@ ifeq ($(PLATFORM),SunOS)
GLIBC= #libc is irrelevant
CC=gcc
- CXX=g++
INSTALL=ginstall
MKDIR=gmkdir
COPYDIR="/usr/local/share/games/quake3"
@@ -636,7 +629,6 @@ endif #SunOS
ifeq ($(USE_CCACHE),1)
CC := ccache $(CC)
- CXX := ccache $(CXX)
endif
ifneq ($(BUILD_SERVER),1)
@@ -668,7 +660,6 @@ ifeq ($(GENERATE_DEPENDENCIES),1)
endif
DO_CC=$(CC) $(NOTSHLIBCFLAGS) $(CFLAGS) -o $@ -c $<
-DO_CXX=$(CXX) $(NOTSHLIBCFLAGS) $(CFLAGS) -o $@ -c $<
DO_SMP_CC=$(CC) $(NOTSHLIBCFLAGS) $(CFLAGS) -DSMP -o $@ -c $<
DO_BOT_CC=$(CC) $(NOTSHLIBCFLAGS) $(CFLAGS) -DBOTLIB -o $@ -c $< # $(SHLIBCFLAGS) # bk001212
DO_DEBUG_CC=$(CC) $(NOTSHLIBCFLAGS) $(DEBUG_CFLAGS) -o $@ -c $<
@@ -1007,11 +998,11 @@ ifeq ($(PLATFORM),darwin)
$(B)/client/sdl_snd.o \
ifeq ($(ARCH),i386)
- I386OBJS := \
- $(B)/client/ftola.o \
- $(B)/client/snapvectora.o \
- $(B)/client/snd_mixa.o \
- $(B)/client/matha.o \
+ I386OBJS := \
+ $(B)/client/ftola.o \
+ $(B)/client/snapvectora.o \
+ $(B)/client/snd_mixa.o \
+ $(B)/client/matha.o \
Q3POBJ += $(I386OBJS)
Q3POBJ_SMP += $(I386OBJS)
@@ -1344,7 +1335,7 @@ ifeq ($(ARCH),ppc)
endif
$(B)/$(PLATFORM)q3ded$(BINEXT): $(Q3DOBJ)
- $(CC) -o $@ $(Q3DOBJ) $(LDFLAGS)
+ $(CC) -o $@ $(Q3DOBJ) $(LDFLAGS)
$(B)/ded/sv_bot.o : $(SDIR)/sv_bot.c; $(DO_DED_CC)
$(B)/ded/sv_client.o : $(SDIR)/sv_client.c; $(DO_DED_CC)
@@ -1459,7 +1450,7 @@ Q3CGOBJ = $(Q3CGOBJ_) $(B)/baseq3/cgame/cg_syscalls.o
Q3CGVMOBJ = $(Q3CGOBJ_:%.o=%.asm) $(B)/baseq3/game/bg_lib.asm
$(B)/baseq3/cgame$(ARCH).$(SHLIBEXT) : $(Q3CGOBJ)
- $(CC) $(SHLIBLDFLAGS) -o $@ $(Q3CGOBJ)
+ $(CC) $(SHLIBLDFLAGS) -o $@ $(Q3CGOBJ)
$(B)/baseq3/vm/cgame.qvm: $(Q3CGVMOBJ) $(CGDIR)/cg_syscalls.asm
$(Q3ASM) -o $@ $(Q3CGVMOBJ) $(CGDIR)/cg_syscalls.asm
@@ -1550,7 +1541,7 @@ Q3GOBJ = $(Q3GOBJ_) $(B)/baseq3/game/g_syscalls.o
Q3GVMOBJ = $(Q3GOBJ_:%.o=%.asm) $(B)/baseq3/game/bg_lib.asm
$(B)/baseq3/qagame$(ARCH).$(SHLIBEXT) : $(Q3GOBJ)
- $(CC) $(SHLIBLDFLAGS) -o $@ $(Q3GOBJ)
+ $(CC) $(SHLIBLDFLAGS) -o $@ $(Q3GOBJ)
$(B)/baseq3/vm/qagame.qvm: $(Q3GVMOBJ) $(GDIR)/g_syscalls.asm
$(Q3ASM) -o $@ $(Q3GVMOBJ) $(GDIR)/g_syscalls.asm
diff --git a/code/unix/sdl_glimp.c b/code/unix/sdl_glimp.c
index 339dd79..5c690eb 100644
--- a/code/unix/sdl_glimp.c
+++ b/code/unix/sdl_glimp.c
@@ -267,10 +267,10 @@ static void install_grabs(void)
// This is a bug in the current SDL/macosx...have to toggle it a few
// times to get the cursor to hide.
- #if defined(MACOS_X)
+#if defined(MACOS_X)
SDL_ShowCursor(1);
SDL_ShowCursor(0);
- #endif
+#endif
}
static void uninstall_grabs(void)
diff --git a/code/unix/unix_main.c b/code/unix/unix_main.c
index 82c9a42..58e1a08 100644
--- a/code/unix/unix_main.c
+++ b/code/unix/unix_main.c
@@ -364,24 +364,22 @@ void Sys_Quit (void) {
static void Sys_DetectAltivec(void)
{
- extern cvar_t *com_altivec;
-
// Only detect if user hasn't forcibly disabled it.
if (com_altivec->integer) {
- #if idppc_altivec
- #if MACOS_X
- {
- long feat = 0;
- OSErr err = Gestalt(gestaltPowerPCProcessorFeatures, &feat);
- if ((err==noErr) && ((1 << gestaltPowerPCHasVectorInstructions) & feat))
- com_altivec->integer = 1;
- }
- #else // !!! FIXME: PowerPC Linux, etc: how to detect?
- com_altivec->integer = 1;
- #endif
- #else
- com_altivec->integer = 0; // not an Altivec system, so never use it.
- #endif
+#if idppc_altivec
+#ifdef MACOS_X
+ long feat = 0;
+ OSErr err = Gestalt(gestaltPowerPCProcessorFeatures, &feat);
+ if ((err==noErr) && ((1 << gestaltPowerPCHasVectorInstructions) & feat)) {
+ Cvar_Set( "com_altivec", "1" );
+ }
+#else // !!! FIXME: PowerPC Linux, etc: how to detect?
+ Cvar_Set( "com_altivec", "1" );
+#endif
+#else
+ // not an Altivec system, so never use it.
+ Cvar_Set( "com_altivec", "0" );
+#endif
}
}
@@ -705,9 +703,9 @@ void Sys_UnloadDll( void *dllHandle ) {
return;
}
- #if USE_SDL_VIDEO
+#if USE_SDL_VIDEO
SDL_UnloadObject(dllHandle);
- #else
+#else
dlclose( dllHandle );
{
const char* err; // rb010123 - now const
@@ -715,7 +713,7 @@ void Sys_UnloadDll( void *dllHandle ) {
if ( err != NULL )
Com_Printf ( "Sys_UnloadGame failed on dlclose: \"%s\"!\n", err );
}
- #endif
+#endif
}
@@ -745,11 +743,11 @@ static void* try_dlopen(const char* base, const char* gamedir, const char* fname
fn = FS_BuildOSPath( base, gamedir, fname );
Com_Printf( "Sys_LoadDll(%s)... \n", fn );
- #if USE_SDL_VIDEO
+#if USE_SDL_VIDEO
libHandle = SDL_LoadObject(fn);
- #else
+#else
libHandle = dlopen( fn, Q_RTLD );
- #endif
+#endif
if(!libHandle) {
Com_Printf( "Sys_LoadDll(%s) failed:\n\"%s\"\n", fn, do_dlerror() );
@@ -827,14 +825,15 @@ void *Sys_LoadDll( const char *name, char *fqpath ,
#else
Com_Printf ( "Sys_LoadDll(%s) failed dlsym(vmMain):\n\"%s\" !\n", name, err );
#endif
- #if USE_SDL_VIDEO
+#if USE_SDL_VIDEO
SDL_UnloadObject(libHandle);
- #else
+#else
dlclose( libHandle );
err = do_dlerror();
- if ( err != NULL )
+ if ( err != NULL ) {
Com_Printf ( "Sys_LoadDll(%s) failed dlcose:\n\"%s\"\n", name, err );
- #endif
+ }
+#endif
return NULL;
}