mirror of
https://github.com/UberGames/ioef.git
synced 2025-05-31 17:30:48 +00:00
* Allow CC to be overridden externally to the Makefile
* Make cross-make-mingw.sh more generic using the above * Update README to reflect changes * Fix a couple of warnings in the Windows input layer
This commit is contained in:
parent
5aac275de2
commit
4a82d86070
4 changed files with 19 additions and 21 deletions
18
Makefile
18
Makefile
|
@ -51,6 +51,10 @@ ifndef ARCH
|
||||||
ARCH=$(COMPILE_ARCH)
|
ARCH=$(COMPILE_ARCH)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifndef CC
|
||||||
|
CC=gcc
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(ARCH),powerpc)
|
ifeq ($(ARCH),powerpc)
|
||||||
ARCH=ppc
|
ARCH=ppc
|
||||||
endif
|
endif
|
||||||
|
@ -173,8 +177,6 @@ MKDIR=mkdir
|
||||||
|
|
||||||
ifeq ($(PLATFORM),linux)
|
ifeq ($(PLATFORM),linux)
|
||||||
|
|
||||||
CC=gcc
|
|
||||||
|
|
||||||
ifeq ($(ARCH),alpha)
|
ifeq ($(ARCH),alpha)
|
||||||
ARCH=axp
|
ARCH=axp
|
||||||
else
|
else
|
||||||
|
@ -292,7 +294,6 @@ else # ifeq Linux
|
||||||
#############################################################################
|
#############################################################################
|
||||||
|
|
||||||
ifeq ($(PLATFORM),darwin)
|
ifeq ($(PLATFORM),darwin)
|
||||||
CC=gcc
|
|
||||||
VM_PPC=vm_ppc_new
|
VM_PPC=vm_ppc_new
|
||||||
HAVE_VM_COMPILED=true
|
HAVE_VM_COMPILED=true
|
||||||
BASE_CFLAGS=
|
BASE_CFLAGS=
|
||||||
|
@ -428,8 +429,9 @@ else # ifeq darwin
|
||||||
|
|
||||||
ifeq ($(PLATFORM),mingw32)
|
ifeq ($(PLATFORM),mingw32)
|
||||||
|
|
||||||
CC=gcc
|
ifndef WINDRES
|
||||||
WINDRES=windres
|
WINDRES=windres
|
||||||
|
endif
|
||||||
|
|
||||||
ARCH=x86
|
ARCH=x86
|
||||||
|
|
||||||
|
@ -527,13 +529,11 @@ ifeq ($(PLATFORM),freebsd)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(ARCH),axp)
|
ifeq ($(ARCH),axp)
|
||||||
CC=gcc
|
|
||||||
BASE_CFLAGS += -DNO_VM_COMPILED
|
BASE_CFLAGS += -DNO_VM_COMPILED
|
||||||
RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG -O3 -ffast-math -funroll-loops \
|
RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG -O3 -ffast-math -funroll-loops \
|
||||||
-fomit-frame-pointer -fexpensive-optimizations
|
-fomit-frame-pointer -fexpensive-optimizations
|
||||||
else
|
else
|
||||||
ifeq ($(ARCH),i386)
|
ifeq ($(ARCH),i386)
|
||||||
CC=gcc
|
|
||||||
RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG -O3 -mtune=pentiumpro \
|
RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG -O3 -mtune=pentiumpro \
|
||||||
-march=pentium -fomit-frame-pointer -pipe -ffast-math \
|
-march=pentium -fomit-frame-pointer -pipe -ffast-math \
|
||||||
-falign-loops=2 -falign-jumps=2 -falign-functions=2 \
|
-falign-loops=2 -falign-jumps=2 -falign-functions=2 \
|
||||||
|
@ -583,7 +583,6 @@ ifeq ($(PLATFORM),netbsd)
|
||||||
ARCH=i386
|
ARCH=i386
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CC=gcc
|
|
||||||
LDFLAGS=-lm
|
LDFLAGS=-lm
|
||||||
SHLIBEXT=so
|
SHLIBEXT=so
|
||||||
SHLIBCFLAGS=-fPIC
|
SHLIBCFLAGS=-fPIC
|
||||||
|
@ -610,7 +609,6 @@ ifeq ($(PLATFORM),irix)
|
||||||
|
|
||||||
ARCH=mips #default to MIPS
|
ARCH=mips #default to MIPS
|
||||||
|
|
||||||
CC=cc
|
|
||||||
BASE_CFLAGS=-Dstricmp=strcasecmp -Xcpluscomm -woff 1185 -mips3 \
|
BASE_CFLAGS=-Dstricmp=strcasecmp -Xcpluscomm -woff 1185 -mips3 \
|
||||||
-nostdinc -I. -I$(ROOT)/usr/include -DNO_VM_COMPILED
|
-nostdinc -I. -I$(ROOT)/usr/include -DNO_VM_COMPILED
|
||||||
RELEASE_CFLAGS=$(BASE_CFLAGS) -O3
|
RELEASE_CFLAGS=$(BASE_CFLAGS) -O3
|
||||||
|
@ -631,7 +629,6 @@ else # ifeq IRIX
|
||||||
|
|
||||||
ifeq ($(PLATFORM),sunos)
|
ifeq ($(PLATFORM),sunos)
|
||||||
|
|
||||||
CC=gcc
|
|
||||||
INSTALL=ginstall
|
INSTALL=ginstall
|
||||||
MKDIR=gmkdir
|
MKDIR=gmkdir
|
||||||
COPYDIR="/usr/local/share/games/quake3"
|
COPYDIR="/usr/local/share/games/quake3"
|
||||||
|
@ -705,7 +702,6 @@ else # ifeq sunos
|
||||||
#############################################################################
|
#############################################################################
|
||||||
# SETUP AND BUILD -- GENERIC
|
# SETUP AND BUILD -- GENERIC
|
||||||
#############################################################################
|
#############################################################################
|
||||||
CC=cc
|
|
||||||
BASE_CFLAGS=-DNO_VM_COMPILED
|
BASE_CFLAGS=-DNO_VM_COMPILED
|
||||||
DEBUG_CFLAGS=$(BASE_CFLAGS) -g
|
DEBUG_CFLAGS=$(BASE_CFLAGS) -g
|
||||||
RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG -O3
|
RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG -O3
|
||||||
|
|
9
README
9
README
|
@ -75,9 +75,12 @@ Installation, for *nix
|
||||||
It is also possible to cross compile for Windows under *nix using MinGW. A
|
It is also possible to cross compile for Windows under *nix using MinGW. A
|
||||||
script is available to build a cross compilation environment from
|
script is available to build a cross compilation environment from
|
||||||
http://www.libsdl.org/extras/win32/cross/build-cross.sh. The gcc/binutils
|
http://www.libsdl.org/extras/win32/cross/build-cross.sh. The gcc/binutils
|
||||||
version numbers that the script downloads may need to be altered. After you
|
version numbers that the script downloads may need to be altered.
|
||||||
have successfully run this script cross compiling is simply a case of using
|
Alternatively, your distribution may have mingw32 packages available. On
|
||||||
'./cross-make-mingw.sh' in place of 'make'.
|
debian/Ubuntu, these are mingw32, mingw32-runtime and mingw32-binutils. Cross
|
||||||
|
compiling is simply a case of using './cross-make-mingw.sh' in place of 'make',
|
||||||
|
though you may find you need to change the value of the variables in this
|
||||||
|
script to match your environment.
|
||||||
|
|
||||||
If the make based build system is being used (i.e. *nix or MinGW), the
|
If the make based build system is being used (i.e. *nix or MinGW), the
|
||||||
following variables may be set, either on the command line or in
|
following variables may be set, either on the command line or in
|
||||||
|
|
|
@ -937,8 +937,8 @@ void IN_JoyMove( void ) {
|
||||||
|
|
||||||
if ( in_debugJoystick->integer ) {
|
if ( in_debugJoystick->integer ) {
|
||||||
Com_Printf( "%8x %5i %5.2f %5.2f %5.2f %5.2f %6i %6i\n",
|
Com_Printf( "%8x %5i %5.2f %5.2f %5.2f %5.2f %6i %6i\n",
|
||||||
joy.ji.dwButtons,
|
JoyToI( joy.ji.dwButtons ),
|
||||||
joy.ji.dwPOV,
|
JoyToI( joy.ji.dwPOV ),
|
||||||
JoyToF( joy.ji.dwXpos ), JoyToF( joy.ji.dwYpos ),
|
JoyToF( joy.ji.dwXpos ), JoyToF( joy.ji.dwYpos ),
|
||||||
JoyToF( joy.ji.dwZpos ), JoyToF( joy.ji.dwRpos ),
|
JoyToF( joy.ji.dwZpos ), JoyToF( joy.ji.dwRpos ),
|
||||||
JoyToI( joy.ji.dwUpos ), JoyToI( joy.ji.dwVpos ) );
|
JoyToI( joy.ji.dwUpos ), JoyToI( joy.ji.dwVpos ) );
|
||||||
|
@ -1130,7 +1130,8 @@ static void IN_StartupMIDI( void )
|
||||||
( unsigned long ) NULL,
|
( unsigned long ) NULL,
|
||||||
CALLBACK_FUNCTION ) != MMSYSERR_NOERROR )
|
CALLBACK_FUNCTION ) != MMSYSERR_NOERROR )
|
||||||
{
|
{
|
||||||
Com_Printf( "WARNING: could not open MIDI device %d: '%s'\n", in_mididevice->integer , s_midiInfo.caps[( int ) in_mididevice->value] );
|
Com_Printf( "WARNING: could not open MIDI device %d: '%s'\n",
|
||||||
|
in_mididevice->integer , s_midiInfo.caps[( int ) in_mididevice->value].szPname );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
PREFIX=/usr/local/cross-tools
|
export CC=i586-mingw32msvc-gcc
|
||||||
TARGET=i386-mingw32msvc
|
export WINDRES=i586-mingw32msvc-windres
|
||||||
PATH="$PREFIX/bin:$PREFIX/$TARGET/bin:$PATH"
|
|
||||||
export PATH
|
|
||||||
export PLATFORM=mingw32
|
export PLATFORM=mingw32
|
||||||
exec make $*
|
exec make $*
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue