mirror of
https://github.com/DrBeef/ioq3quest.git
synced 2024-11-10 14:52:00 +00:00
* Deleted code/unix/vm_x86.c - wtf was that about anyway?
* Removed HAVE_VM_NATIVE * Removed DLL_ONLY * Replace HAVE_VM_COMPILED with NO_VM_COMPILED -- this means the JIT compiler should be enabled on the OS X and VC builds now * Remove the remainder of the freetype building stuff
This commit is contained in:
parent
090f4d7266
commit
ffdc69f138
5 changed files with 13 additions and 97 deletions
|
@ -543,7 +543,6 @@ vm_t *VM_Create( const char *module, long (*systemCalls)(long *),
|
|||
Q_strncpyz( vm->name, module, sizeof( vm->name ) );
|
||||
vm->systemCall = systemCalls;
|
||||
|
||||
#if defined(HAVE_VM_NATIVE)
|
||||
// never allow dll loading with a demo
|
||||
if ( interpret == VMI_NATIVE ) {
|
||||
if ( Cvar_VariableValue( "fs_restrict" ) ) {
|
||||
|
@ -562,12 +561,6 @@ vm_t *VM_Create( const char *module, long (*systemCalls)(long *),
|
|||
Com_Printf( "Failed to load dll, looking for qvm.\n" );
|
||||
interpret = VMI_COMPILED;
|
||||
}
|
||||
#else
|
||||
if ( interpret == VMI_NATIVE ) {
|
||||
Com_Printf("Architecture doesn't support native dll's, using qvm\n");
|
||||
interpret = VMI_COMPILED;
|
||||
}
|
||||
#endif
|
||||
|
||||
// load the image
|
||||
if( !( header = VM_LoadQVM( vm, qtrue ) ) ) {
|
||||
|
@ -581,7 +574,7 @@ vm_t *VM_Create( const char *module, long (*systemCalls)(long *),
|
|||
// copy or compile the instructions
|
||||
vm->codeLength = header->codeLength;
|
||||
|
||||
#if !defined(HAVE_VM_COMPILED)
|
||||
#ifdef NO_VM_COMPILED
|
||||
if(interpret >= VMI_COMPILED) {
|
||||
Com_Printf("Architecture doesn't have a bytecode compiler, using interpreter\n");
|
||||
interpret = VMI_BYTECODE;
|
||||
|
@ -747,7 +740,7 @@ long QDECL VM_Call( vm_t *vm, long callnum, ... ) {
|
|||
args[12], args[13], args[14], args[15]);
|
||||
} else {
|
||||
#ifdef __i386__ // i386 calling convention doesn't need conversion
|
||||
#if defined(HAVE_VM_COMPILED)
|
||||
#ifndef NO_VM_COMPILED
|
||||
if ( vm->compiled )
|
||||
r = VM_CallCompiled( vm, (int*)&callnum );
|
||||
else
|
||||
|
@ -766,7 +759,7 @@ long QDECL VM_Call( vm_t *vm, long callnum, ... ) {
|
|||
a.args[i] = va_arg(ap, long);
|
||||
}
|
||||
va_end(ap);
|
||||
#if defined(HAVE_VM_COMPILED)
|
||||
#ifndef NO_VM_COMPILED
|
||||
if ( vm->compiled )
|
||||
r = VM_CallCompiled( vm, &a.callnum );
|
||||
else
|
||||
|
@ -894,13 +887,3 @@ void VM_LogSyscalls( int *args ) {
|
|||
fprintf(f, "%i: %li (%i) = %i %i %i %i\n", callnum, (long)(args - (int *)currentVM->dataBase),
|
||||
args[0], args[1], args[2], args[3], args[4] );
|
||||
}
|
||||
|
||||
|
||||
|
||||
#ifdef DLL_ONLY // bk010215 - for DLL_ONLY dedicated servers/builds w/o VM
|
||||
int VM_CallCompiled( vm_t *vm, int *args ) {
|
||||
return(0);
|
||||
}
|
||||
|
||||
void VM_Compile( vm_t *vm, vmHeader_t *header ) {}
|
||||
#endif // DLL_ONLY
|
||||
|
|
|
@ -1106,7 +1106,6 @@ VM_CallCompiled
|
|||
This function is called directly by the generated code
|
||||
==============
|
||||
*/
|
||||
#ifndef DLL_ONLY // bk010215 - for DLL_ONLY dedicated servers/builds w/o VM
|
||||
int VM_CallCompiled( vm_t *vm, int *args ) {
|
||||
int stack[1024];
|
||||
int programCounter;
|
||||
|
@ -1206,6 +1205,3 @@ int VM_CallCompiled( vm_t *vm, int *args ) {
|
|||
|
||||
return *(int *)opStack;
|
||||
}
|
||||
#endif // !DLL_ONLY
|
||||
|
||||
|
||||
|
|
|
@ -590,11 +590,7 @@ void SV_Init (void) {
|
|||
// systeminfo
|
||||
Cvar_Get ("sv_cheats", "1", CVAR_SYSTEMINFO | CVAR_ROM );
|
||||
sv_serverid = Cvar_Get ("sv_serverid", "0", CVAR_SYSTEMINFO | CVAR_ROM );
|
||||
#ifndef DLL_ONLY // bk010216 - for DLL-only servers
|
||||
sv_pure = Cvar_Get ("sv_pure", "1", CVAR_SYSTEMINFO );
|
||||
#else
|
||||
sv_pure = Cvar_Get ("sv_pure", "0", CVAR_SYSTEMINFO | CVAR_INIT | CVAR_ROM );
|
||||
#endif
|
||||
Cvar_Get ("sv_paks", "", CVAR_SYSTEMINFO | CVAR_ROM );
|
||||
Cvar_Get ("sv_pakNames", "", CVAR_SYSTEMINFO | CVAR_ROM );
|
||||
Cvar_Get ("sv_referencedPaks", "", CVAR_SYSTEMINFO | CVAR_ROM );
|
||||
|
|
|
@ -40,10 +40,6 @@ ifndef MOUNT_DIR
|
|||
MOUNT_DIR=..
|
||||
endif
|
||||
|
||||
ifndef BUILD_FREETYPE
|
||||
BUILD_FREETYPE=0
|
||||
endif
|
||||
|
||||
ifndef GENERATE_DEPENDENCIES
|
||||
GENERATE_DEPENDENCIES=1
|
||||
endif
|
||||
|
@ -70,7 +66,6 @@ BLIBDIR=$(MOUNT_DIR)/botlib
|
|||
NDIR=$(MOUNT_DIR)/null
|
||||
UIDIR=$(MOUNT_DIR)/ui
|
||||
Q3UIDIR=$(MOUNT_DIR)/q3_ui
|
||||
#FTDIR=$(MOUNT_DIR)/ft2
|
||||
JPDIR=$(MOUNT_DIR)/jpeg-6
|
||||
SPLNDIR=$(MOUNT_DIR)/splines
|
||||
|
||||
|
@ -83,7 +78,6 @@ VERSION=$(shell grep Q3_VERSION ../qcommon/q_shared.h | \
|
|||
#############################################################################
|
||||
|
||||
## Defaults
|
||||
DLL_ONLY=false
|
||||
USE_SDL=true
|
||||
VM_PPC=
|
||||
|
||||
|
@ -115,11 +109,6 @@ ifeq ($(PLATFORM),linux)
|
|||
|
||||
BASE_CFLAGS = -pipe -Wall -Wimplicit -Wstrict-prototypes
|
||||
|
||||
# rcg010216: DLL_ONLY for PPC
|
||||
ifeq ($(strip $(DLL_ONLY)),true)
|
||||
BASE_CFLAGS += -DDLL_ONLY
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(USE_SDL)),true)
|
||||
BASE_CFLAGS += -DUSE_SDL=1 $(shell sdl-config --cflags)
|
||||
GL_CFLAGS =
|
||||
|
@ -129,30 +118,29 @@ ifeq ($(PLATFORM),linux)
|
|||
|
||||
OPTIMIZE = -O3 -ffast-math -funroll-loops -fomit-frame-pointer \
|
||||
-fno-strict-aliasing
|
||||
BASE_CFLAGS += -DHAVE_VM_NATIVE
|
||||
|
||||
ifeq ($(ARCH),x86_64)
|
||||
OPTIMIZE = -O3 -fomit-frame-pointer -ffast-math -falign-loops=2 \
|
||||
-falign-jumps=2 -falign-functions=2 -fstrength-reduce \
|
||||
-fno-strict-aliasing
|
||||
# experimental! you need as
|
||||
# BASE_CFLAGS += -DHAVE_VM_COMPILED
|
||||
# comment out below line to enable the
|
||||
# experimental x86_64 jit compiler! you need as
|
||||
BASE_CFLAGS += -DNO_VM_COMPILED
|
||||
else
|
||||
ifeq ($(ARCH),i386)
|
||||
OPTIMIZE = -O3 -march=i686 -fomit-frame-pointer -ffast-math \
|
||||
-falign-loops=2 -falign-jumps=2 -falign-functions=2 \
|
||||
-fno-strict-aliasing -fstrength-reduce
|
||||
BASE_CFLAGS += -DHAVE_VM_COMPILED
|
||||
else
|
||||
ifeq ($(ARCH),ppc)
|
||||
ifneq ($(VM_PPC),)
|
||||
BASE_CFLAGS += -DHAVE_VM_COMPILED
|
||||
ifeq ($(VM_PPC),)
|
||||
BASE_CFLAGS += -DNO_VM_COMPILED
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
DEBUG_CFLAGS = $(BASE_CFLAGS) -g -DNO_MOUSEGRAB -O0
|
||||
DEBUG_CFLAGS = $(BASE_CFLAGS) -g -O0
|
||||
|
||||
RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG $(OPTIMIZE)
|
||||
|
||||
|
@ -163,13 +151,6 @@ ifeq ($(PLATFORM),linux)
|
|||
THREAD_LDFLAGS=-lpthread
|
||||
LDFLAGS=-ldl -lm
|
||||
|
||||
DEBUG_CFLAGS += -DHAVE_EXECINFO_H
|
||||
ifeq ($(BUILD_FREETYPE),1)
|
||||
RELEASE_CFLAGS += $(shell pkg-config --cflags freetype2) -DBUILD_FREETYPE
|
||||
DEBUG_CFLAGS += $(shell pkg-config --cflags freetype2) -DBUILD_FREETYPE
|
||||
LDFLAGS += $(shell pkg-config --libs freetype2)
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(USE_SDL)),true)
|
||||
GLLDFLAGS=$(shell sdl-config --libs)
|
||||
else
|
||||
|
@ -224,10 +205,6 @@ ifeq ($(PLATFORM),mingw32)
|
|||
|
||||
BASE_CFLAGS = -pipe -Wall -Wimplicit -Wstrict-prototypes
|
||||
|
||||
ifeq ($(strip $(DLL_ONLY)),true)
|
||||
BASE_CFLAGS += -DDLL_ONLY
|
||||
endif
|
||||
|
||||
DX_CFLAGS = -I$(DXSDK_DIR)/Include
|
||||
|
||||
GL_CFLAGS =
|
||||
|
@ -235,7 +212,6 @@ ifeq ($(PLATFORM),mingw32)
|
|||
|
||||
OPTIMIZE = -O3 -march=i686 -fomit-frame-pointer -ffast-math -falign-loops=2 \
|
||||
-falign-jumps=2 -falign-functions=2 -fno-strict-aliasing -fstrength-reduce
|
||||
BASE_CFLAGS += -DHAVE_VM_NATIVE -DHAVE_VM_COMPILED
|
||||
|
||||
DEBUG_CFLAGS=$(BASE_CFLAGS) -g -O0
|
||||
|
||||
|
@ -250,12 +226,6 @@ ifeq ($(PLATFORM),mingw32)
|
|||
LDFLAGS= -mwindows -lwsock32 -lgdi32 -lwinmm -lole32
|
||||
GLLDFLAGS=
|
||||
|
||||
ifeq ($(BUILD_FREETYPE),1)
|
||||
RELEASE_CFLAGS += $(shell pkg-config --cflags freetype2) -DBUILD_FREETYPE
|
||||
DEBUG_CFLAGS += $(shell pkg-config --cflags freetype2) -DBUILD_FREETYPE
|
||||
LDFLAGS += $(shell pkg-config --libs freetype2)
|
||||
endif
|
||||
|
||||
ifeq ($(ARCH),x86)
|
||||
# build 32bit
|
||||
BASE_CFLAGS += -m32
|
||||
|
@ -302,6 +272,7 @@ ifeq ($(PLATFORM),freebsd)
|
|||
|
||||
ifeq ($(ARCH),axp)
|
||||
CC=gcc
|
||||
BASE_CFLAGS += -DNO_VM_COMPILED
|
||||
RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG -O3 -ffast-math -funroll-loops \
|
||||
-fomit-frame-pointer -fexpensive-optimizations
|
||||
else
|
||||
|
@ -356,7 +327,7 @@ ifeq ($(PLATFORM),irix)
|
|||
|
||||
CC=cc
|
||||
BASE_CFLAGS=-Dstricmp=strcasecmp -Xcpluscomm -woff 1185 -mips3 \
|
||||
-nostdinc -I. -I$(ROOT)/usr/include
|
||||
-nostdinc -I. -I$(ROOT)/usr/include -DNO_VM_COMPILED
|
||||
RELEASE_CFLAGS=$(BASE_CFLAGS) -O3
|
||||
DEBUG_CFLAGS=$(BASE_CFLAGS) -g
|
||||
|
||||
|
@ -377,7 +348,7 @@ else # ifeq IRIX
|
|||
#############################################################################
|
||||
|
||||
CC=cc
|
||||
BASE_CFLAGS=
|
||||
BASE_CFLAGS=-DNO_VM_COMPILED
|
||||
DEBUG_CFLAGS=$(BASE_CFLAGS) -g
|
||||
RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG -O3
|
||||
|
||||
|
@ -441,7 +412,6 @@ makedirs:
|
|||
@if [ ! -d $(B)/client ];then mkdir $(B)/client;fi
|
||||
@if [ ! -d $(B)/ded ];then mkdir $(B)/ded;fi
|
||||
@if [ ! -d $(B)/ref ];then mkdir $(B)/ref;fi
|
||||
@if [ ! -d $(B)/ft2 ];then mkdir $(B)/ft2;fi
|
||||
@if [ ! -d $(B)/baseq3 ];then mkdir $(B)/baseq3;fi
|
||||
@if [ ! -d $(B)/baseq3/cgame ];then mkdir $(B)/baseq3/cgame;fi
|
||||
@if [ ! -d $(B)/baseq3/game ];then mkdir $(B)/baseq3/game;fi
|
||||
|
@ -1358,7 +1328,7 @@ $(B)/missionpack/vm/ui.qvm: $(MPUIVMOBJ) $(UIDIR)/ui_syscalls.asm $(Q3ASM)
|
|||
$(B)/baseq3/cgame/%.o: $(CGDIR)/%.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(B)/baseq3/cgame/%.asm: $(CGDIR)/%.c $(Q3LCC)
|
||||
$(B)/baseq3/cgame/%.asm: $(CGDIR)/%.c $(Q3LCC)
|
||||
$(DO_Q3LCC)
|
||||
|
||||
$(B)/missionpack/cgame/%.o: $(CGDIR)/%.c
|
||||
|
|
|
@ -1,29 +0,0 @@
|
|||
/*
|
||||
===========================================================================
|
||||
Copyright (C) 1999-2005 Id Software, Inc.
|
||||
|
||||
This file is part of Quake III Arena source code.
|
||||
|
||||
Quake III Arena source code is free software; you can redistribute it
|
||||
and/or modify it under the terms of the GNU General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
Quake III Arena source code is distributed in the hope that it will be
|
||||
useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Foobar; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "../qcommon/vm_local.h"
|
||||
|
||||
void VM_Compile( vm_t *vm, vmHeader_t *header ) {}
|
||||
int VM_CallCompiled( vm_t *vm, int *args ) {}
|
||||
|
||||
|
||||
|
Loading…
Reference in a new issue