Make it easier to compile q3 statically.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@6215 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2022-03-08 05:32:38 +00:00
parent 1c32a8ef8c
commit 1a5c8da880
5 changed files with 17 additions and 6 deletions

View File

@ -134,8 +134,8 @@ endif
ifeq (,$(findstring DNO_OPUS,$(FTE_CONFIG_EXTRA)))
USE_OPUS=1
endif
ifeq (,$(findstring DNO_BOTLIB,$(FTE_CONFIG_EXTRA)))
USE_BOTLIB=1
ifneq (,$(findstring DLINK_QUAKE3,$(FTE_CONFIG_EXTRA)))
LINK_QUAKE3=1
endif
ifeq (,$(findstring DNO_VORBISFILE,$(FTE_CONFIG_EXTRA)))
USE_VORBISFILE=1
@ -944,9 +944,9 @@ COMMON_OBJS = \
q1bsp.o \
q2pmove.o
ifeq (1,$(USE_BOTLIB))
BOTLIB_CFLAGS=-I$(BOTLIB_DIR) -DBOTLIB -DBOTLIB_STATIC
BOTLIB_OBJS = \
ifeq (1,$(LINK_QUAKE3))
ALL_CFLAGS+=-I$(BOTLIB_DIR) -DBOTLIB -DBOTLIB_STATIC -DSTATIC_Q3
COMMON_OBJS += \
clq3_parse.o \
cl_ui.o \
cl_cg.o \
@ -2534,4 +2534,5 @@ install: sv-rel gl-rel mingl-rel qcc-rel
version:
@echo $(SVN_VERSION)
@echo $(SVN_DATE)
@echo $(FTE_CONFIG_EXTRA)

View File

@ -208,6 +208,7 @@
#ifdef AVAIL_JPEGLIB
-DLINK_JPEG
#endif
//-DLINK_QUAKE3 //ask the makefile to bake the quake3 plugin into the engine itself.
//-DNO_OPUS
//-DNO_SPEEX //disable static speex

View File

@ -42,7 +42,7 @@ static struct
#endif
#ifdef STATIC_Q3
{"Q3", Plug_Q3_Init},
{"quake3", Plug_Q3_Init},
#endif
{NULL}
};

View File

@ -10,8 +10,10 @@ plugmsgfuncs_t *msgfuncs;
plugworldfuncs_t *worldfuncs;
plugmasterfuncs_t *masterfuncs;
#ifndef STATIC_Q3
double realtime;
struct netprim_s msg_nullnetprim;
#endif
//mostly for access to sv.state or svs.sockets
q3serverstate_t sv3;
@ -1694,10 +1696,12 @@ static struct q3gamecode_s q3funcs =
},
};
#ifndef STATIC_Q3
void Q3_Frame(double enginetime, double gametime)
{
realtime = enginetime;
}
#endif
void Q3_Shutdown(void)
{
@ -1731,7 +1735,9 @@ qboolean Plug_Init(void)
Con_Printf("Engine is already using a q3-derived gamecode plugin.\n");
return false;
}
#ifndef STATIC_Q3
plugfuncs->ExportFunction("Tick", Q3_Frame);
#endif
drawfuncs = plugfuncs->GetEngineInterface(plug2dfuncs_name, sizeof(*drawfuncs));
scenefuncs = plugfuncs->GetEngineInterface(plug3dfuncs_name, sizeof(*scenefuncs));

View File

@ -1,3 +1,6 @@
#ifndef FTEPLUGIN
#define FTEPLUGIN
#endif
#include "../plugins/plugin.h"
#include "clq3defs.h"