Fix and removel of deprecated files

- fixed bg_lex so the lexer compile on mingw
- removed old Makefile of RPG-X as they are deprecated, use "make
BUILD_SERVER=0 BUILD_CLIENT=0" in the repositories main path instead to
build shared libraries only
This commit is contained in:
Walter Julius Hennecke 2013-04-27 19:08:54 +02:00
parent 46c5982f9d
commit c660ee1a0f
5 changed files with 49 additions and 747 deletions

View File

@ -1,249 +0,0 @@
default: so
so: build_so
# determine arch and platform
ARCH=$(shell uname -m | sed -e s/i.86/i386/)
PLATFORM=$(shell uname|sed -e s/_.*//|tr '[:upper:]' '[:lower:]')
# compiler to use for building shared objects
CC = gcc
# cross compiling
ifneq ($(PLATFORM), mingw32)
ifeq ($(TARGET), win32)
PLATFORM=mingw32
ARCH=x86
CC=i686-w64-mingw32-gcc
CFLAGS+=-m32
endif
ifeq ($(TARGET), win64)
PLATFORM=mingw32
ARCH=x64
CC=x86_64-w64-mingw32-gcc
CFLAGS+=-m64
endif
else
# we are compiling on windows
ARCH=x86
endif
# cflags for the compiler
ifeq ($(PLATFORM), mingw32)
SOCFLAGS = $(CFLAGS)
else
SOCFLAGS = $(CFLAGS) -fPIC
endif
# set extension
ifeq ($(PLATFORM), mingw32)
EXT=dll
else
EXT=so
endif
# warning level
ifeq ($(DEBUG), 1)
WL=-Wall
else
WL=-Wall -Wno-unused-but-set-variable
endif
# cgame objects
OBJ = \
fx_transporter.o \
fx_tetrion.o \
fx_disruptor.o \
fx_hypospray.o \
fx_quantum.o \
fx_phaser.o \
fx_misc.o \
fx_lib.o \
fx_item.o \
fx_grenade.o \
fx_compression.o \
cg_weapons.o \
cg_view.o \
cg_snapshot.o \
cg_servercmds.o \
cg_screenfx.o \
cg_scoreboard.o \
cg_predict.o \
cg_playerstate.o \
cg_players.o \
cg_marks.o \
cg_main.o \
cg_localents.o \
cg_info.o \
cg_event.o \
cg_env.o \
cg_ents.o \
cg_effects.o \
cg_drawtools.o \
cg_draw.o \
cg_consolecmds.o \
cg_lua.o \
lua_vector.o \
lua_qmath.o \
lua_cfx.o \
lua_cent.o \
lua_refent.o \
# depency objects from game
OBJDEP = \
q_shared.o \
q_math.o \
bg_misc.o \
bg_pmove.o \
bg_slidemove.o
# object for syscalls to the engine
SOOBJ = \
cg_syscalls.o
# objects for lua
LUAOBJ = \
lapi.o \
lauxlib.o \
lbaselib.o \
lbitlib.o \
lcode.o \
lcorolib.o \
lctype.o \
ldblib.o \
ldebug.o \
ldo.o \
ldump.o \
lfunc.o \
lgc.o \
linit.o \
liolib.o \
llex.o \
lmathlib.o \
lmem.o \
loadlib.o \
lobject.o \
lopcodes.o \
loslib.o \
lparser.o \
lstate.o \
lstring.o \
lstrlib.o \
ltable.o \
ltablib.o \
ltm.o \
lua.o \
luac.o \
lundump.o \
lvm.o \
lzio.o
# do cc for shared library
ifeq ($(DEBUG), 1)
DO_SOCC = $(CC) $(SOCFLAGS) $(WL) -g3 $(DEFINES) -o $@ -c $<
else
DO_SOCC = $(CC) $(SOCFLAGS) $(WL) $(DEFINES) -o $@ -c $<
endif
# do cc for lua
ifeq ($(DEBUG), 1)
DO_LUACC = $(CC) -O2 -Wall $(SOCFLAGS) -DLUA_COMPAT_ALL -o $@ -c $<
else
DO_LUACC = $(CC) -O2 -Wall -g3 $(SOCFLAGS) -DLUA_COMPAT_ALL -o $@ -c $<
endif
build_so: DO_CC=$(DO_SOCC)
# cgame
cg_consolecmds.o : cg_consolecmds.c; $(DO_CC)
cg_draw.o : cg_draw.c; $(DO_CC)
cg_drawtools.o : cg_drawtools.c; $(DO_CC)
cg_effects.o : cg_effects.c; $(DO_CC)
cg_ents.o : cg_ents.c; $(DO_CC)
cg_env.o : cg_env.c; $(DO_CC)
cg_event.o : cg_event.c; $(DO_CC)
cg_info.o : cg_info.c; $(DO_CC)
cg_localents.o : cg_localents.c; $(DO_CC)
cg_main.o : cg_main.c; $(DO_CC)
cg_marks.o : cg_marks.c; $(DO_CC)
cg_players.o : cg_players.c; $(DO_CC)
cg_playerstate.o : cg_playerstate.c; $(DO_CC)
cg_predict.o : cg_predict.c; $(DO_CC)
cg_scoreboard.o : cg_scoreboard.c; $(DO_CC)
cg_screenfx.o : cg_screenfx.c; $(DO_CC)
cg_servercmds.o : cg_servercmds.c; $(DO_CC)
cg_snapshot.o : cg_snapshot.c; $(DO_CC)
cg_view.o : cg_view.c; $(DO_CC)
cg_weapons.o : cg_weapons.c; $(DO_CC)
cg_lua.o : cg_lua.c; $(DO_CC)
fx_compression.o : fx_compression.c; $(DO_CC)
fx_grenade.o : fx_grenade.c; $(DO_CC)
fx_item.o : fx_item.c; $(DO_CC)
fx_lib.o : fx_lib.c; $(DO_CC)
fx_misc.o : fx_misc.c; $(DO_CC)
fx_phaser.o : fx_phaser.c; $(DO_CC)
fx_quantum.o : fx_quantum.c; $(DO_CC)
fx_hypospray.o : fx_hypospray.c; $(DO_CC)
fx_disruptor.o : fx_disruptor.c; $(DO_CC)
fx_tetrion.o : fx_tetrion.c; $(DO_CC)
fx_transporter.o : fx_transporter.c; $(DO_CC)
lua_qmath.o: ../game/lua_qmath.c; $(DO_CC)
lua_vector.o: ../game/lua_vector.c; $(DO_CC)
lua_cfx.o: lua_cfx.c; $(DO_CC)
lua_cent.o: lua_cent.c; $(DO_CC)
lua_refent.o: lua_refent.c; $(DO_CC);
# dependencies from game
q_shared.o: ../game/q_shared.c; $(DO_CC)
q_math.o: ../game/q_math.c; $(DO_CC)
bg_misc.o: ../game/bg_misc.c; $(DO_CC)
bg_pmove.o: ../game/bg_pmove.c; $(DO_CC)
bg_slidemove.o: ../game/bg_slidemove.c; $(DO_CC)
# cgame syscalls
cg_syscalls.o : cg_syscalls.c; $(DO_CC)
# lua
lapi.o: ../game/lapi.c; $(DO_LUACC)
lauxlib.o: ../game/lauxlib.c; $(DO_LUACC)
lbaselib.o: ../game/lbaselib.c; $(DO_LUACC)
lbitlib.o: ../game/lbitlib.c; $(DO_LUACC)
lcode.o: ../game/lcode.c; $(DO_LUACC)
lcorolib.o: ../game/lcorolib.c; $(DO_LUACC)
lctype.o: ../game/lctype.c; $(DO_LUACC)
ldblib.o: ../game/ldblib.c; $(DO_LUACC)
ldebug.o: ../game/ldebug.c; $(DO_LUACC)
ldo.o: ../game/ldo.c; $(DO_LUACC)
ldump.o: ../game/ldump.c; $(DO_LUACC)
lfunc.o: ../game/lfunc.c; $(DO_LUACC)
lgc.o: ../game/lgc.c; $(DO_LUACC)
linit.o: ../game/linit.c; $(DO_LUACC)
liolib.o: ../game/liolib.c; $(DO_LUACC)
llex.o: ../game/llex.c; $(DO_LUACC)
lmathlib.o: ../game/lmathlib.c; $(DO_LUACC)
lmem.o: ../game/lmem.c; $(DO_LUACC)
loadlib.o: ../game/loadlib.c; $(DO_LUACC)
lobject.o: ../game/lobject.c; $(DO_LUACC)
lopcodes.o: ../game/lopcodes.c; $(DO_LUACC)
loslib.o: ../game/loslib.c; $(DO_LUACC)
lparser.o: ../game/lparser.c; $(DO_LUACC)
lstate.o: ../game/lstate.c; $(DO_LUACC)
lstring.o: ../game/lstring.c; $(DO_LUACC)
lstrlib.o: ../game/lstrlib.c; $(DO_LUACC)
ltable.o: ../game/ltable.c; $(DO_LUACC)
ltablib.o: ../game/ltablib.c; $(DO_LUACC)
ltm.o: ../game/ltm.c; $(DO_LUACC)
lua.o: ../game/lua.c; $(DO_LUACC)
luac.o: ../game/luac.c; $(DO_LUACC)
lundump.o: ../game/lundump.c; $(DO_LUACC)
lvm.o: ../game/lvm.c; $(DO_LUACC)
lzio.o: ../game/lzio.c; $(DO_LUACC)
build_so: $(OBJDEP) $(OBJ) $(SOOBJ) $(LUAOBJ)
ifeq ($(PLATFORM), mingw32)
$(CC) -shared -Wl,--export-all-symbols,-soname,cgame$(ARCH).$(EXT) -o cgame$(ARCH).$(EXT) $(OBJ) $(OBJDEP) $(SOOBJ) $(LUAOBJ) -lm
else
$(CC) -shared -Wl,--export-dynamic,-soname,cgame$(ARCH).$(EXT) -o cgame$(ARCH).$(EXT) $(OBJ) $(OBJDEP) $(SOOBJ) $(LUAOBJ) -lm -lpthread
endif
clean:
rm -f *.o *.$(EXT)

View File

@ -1,281 +0,0 @@
default: so
so: build_so
# determine arch and platform
ARCH=$(shell uname -m | sed -e s/i.86/i386/)
PLATFORM=$(shell uname|sed -e s/_.*//|tr '[:upper:]' '[:lower:]')
# compiler to use for building shared objects
CC = gcc
# cross compiling
ifneq ($(PLATFORM), mingw32)
ifeq ($(TARGET), win32)
PLATFORM=mingw32
ARCH=x86
CC=i686-w64-mingw32-gcc
CFLAGS+=-m32
endif
ifeq ($(TARGET), win64)
PLATFORM=mingw32
ARCH=x64
CC=x86_64-w64-mingw32-gcc
CFLAGS+=-m64
endif
else
#we are compiling on windows
ARCH=x86
endif
# cflags for the compiler
ifeq ($(PLATFORM), mingw32)
SOCFLAGS = $(CFLAGS)
else
SOCFLAGS = $(CFLAGS) -fPIC
endif
# set extension
ifeq ($(PLATFORM), mingw32)
EXT=dll
else
EXT=so
endif
# warning level
ifeq ($(DEBUG), 1)
WL=-Wall
else
WL=-Wall -Wno-unused-but-set-variable
endif
#defines
DEFINES=
ifeq ($(SQL), 1)
DEFINES+=-DSQL
endif
# game objects
OBJ = \
g_ui.o \
g_lua.o \
q_shared.o \
q_math.o \
g_weapon.o \
g_utils.o \
g_usable.o \
g_turrets.o \
g_trigger.o \
g_team.o \
g_target.o \
g_svcmds.o \
g_spawn.o \
g_session.o \
g_mover.o \
g_missile.o \
g_misc.o \
g_mem.o \
g_main.o \
g_log.o \
g_items.o \
g_fx.o \
g_combat.o \
g_sql.o \
g_cmds.o \
g_client.o \
g_breakable.o \
g_bot.o \
g_arenas.o \
g_active.o \
g_cinematic.o \
bg_slidemove.o \
bg_pmove.o \
bg_oums.o \
bg_misc.o \
ai_team.o \
ai_main.o \
ai_dmq3.o \
ai_dmnet.o \
ai_cmd.o \
ai_chat.o \
lua_game.o \
lua_entity.o \
lua_vector.o \
lua_mover.o \
lua_qmath.o \
lua_cinematic.o \
lua_sound.o \
lua_weapons.o \
lua_trace.o \
lua_cvar.o \
sqlite3.o \
md5.o \
list.o
# game object for syscalls to the engine
SOOBJ = \
g_syscalls.o
# objects for lua
LUAOBJ = \
lapi.o \
lauxlib.o \
lbaselib.o \
lbitlib.o \
lcode.o \
lcorolib.o \
lctype.o \
ldblib.o \
ldebug.o \
ldo.o \
ldump.o \
lfunc.o \
lgc.o \
linit.o \
liolib.o \
llex.o \
lmathlib.o \
lmem.o \
loadlib.o \
lobject.o \
lopcodes.o \
loslib.o \
lparser.o \
lstate.o \
lstring.o \
lstrlib.o \
ltable.o \
ltablib.o \
ltm.o \
lua.o \
luac.o \
lundump.o \
lvm.o \
lzio.o
# sqlite
SQLITE= \
sqlite3.o
# do cc for shared library
ifeq ($(DEBUG), 1)
DO_SOCC = $(CC) $(SOCFLAGS) $(WL) -g3 $(DEFINES) -o $@ -c $<
else
DO_SOCC = $(CC) $(SOCFLAGS) $(WL) $(DEFINES) -o $@ -c $<
endif
# do cc for lua
ifeq ($(DEBUF), 1)
DO_LUACC = $(CC) -O2 -Wall -g3 $(SOCFLAGS) -DLUA_COMPAT_ALL -o $@ -c $<
else
DO_LUACC = $(CC) -O2 -Wall $(SOCFLAGS) -DLUA_COMPAT_ALL -o $@ -c $<
endif
build_so: DO_CC=$(DO_SOCC)
# game
ai_chat.o : ai_chat.c; $(DO_CC)
ai_cmd.o : ai_cmd.c; $(DO_CC)
ai_dmnet.o : ai_dmnet.c; $(DO_CC)
ai_dmq3.o : ai_dmq3.c; $(DO_CC)
ai_main.o : ai_main.c; $(DO_CC)
ai_team.o : ai_team.c; $(DO_CC)
bg_misc.o : bg_misc.c; $(DO_CC)
bg_pmove.o : bg_pmove.c; $(DO_CC)
bg_slidemove.o : bg_slidemove.c; $(DO_CC)
g_active.o : g_active.c; $(DO_CC)
g_arenas.o : g_arenas.c; $(DO_CC)
g_bot.o : g_bot.c; $(DO_CC)
g_breakable.o : g_breakable.c; $(DO_CC)
g_client.o : g_client.c; $(DO_CC)
g_cmds.o : g_cmds.c; $(DO_CC)
g_combat.o : g_combat.c; $(DO_CC)
g_fx.o : g_fx.c; $(DO_CC)
g_items.o : g_items.c; $(DO_CC)
g_log.o : g_log.c; $(DO_CC)
g_main.o : g_main.c; $(DO_CC)
g_mem.o : g_mem.c; $(DO_CC)
g_misc.o : g_misc.c; $(DO_CC)
g_missile.o : g_missile.c; $(DO_CC)
g_mover.o : g_mover.c; $(DO_CC)
g_session.o : g_session.c; $(DO_CC)
g_spawn.o : g_spawn.c; $(DO_CC)
g_svcmds.o : g_svcmds.c; $(DO_CC)
g_target.o : g_target.c; $(DO_CC)
g_team.o : g_team.c; $(DO_CC)
g_trigger.o : g_trigger.c; $(DO_CC)
g_turrets.o : g_turrets.c; $(DO_CC)
g_usable.o : g_usable.c; $(DO_CC)
g_utils.o : g_utils.c; $(DO_CC)
g_weapon.o : g_weapon.c; $(DO_CC)
q_math.o : q_math.c; $(DO_CC)
q_shared.o : q_shared.c; $(DO_CC)
g_lua.o: g_lua.c; $(DO_CC)
g_ui.o: g_ui.c; $(DO_CC)
g_sql.o: g_sql.c; $(DO_CC)
g_cinematic.o: g_cinematic.c; $(DO_CC)
bg_oums.o : bg_oums.c; $(DO_CC)
lua_game.o: lua_game.c; $(DO_CC)
lua_entity.o: lua_entity.c; $(DO_CC)
lua_mover.o: lua_mover.c; $(DO_CC)
lua_qmath.o: lua_qmath.c; $(DO_CC)
lua_vector.o: lua_vector.c; $(DO_CC)
lua_cinematic.o: lua_cinematic.c; $(DO_CC)
lua_sound.o: lua_sound.c; $(DO_CC)
lua_weapons.o: lua_weapons.c; $(DO_CC)
lua_trace.o: lua_trace.c; $(DO_CC)
lua_cvar.o: lua_cvar.c; $(DO_CC)
sqlite3.o: sqlite3.c; $(DO_CC)
md5.o: md5.c; $(DO_CC)
list.o: list.c; $(DO_CC)
# game syscalls
g_syscalls.o : g_syscalls.c; $(DO_CC)
# bg_lib
bg_lib.o : bg_lib.c; $(DO_CC)
# lua
lapi.o: lapi.c; $(DO_LUACC)
lauxlib.o: lauxlib.c; $(DO_LUACC)
lbaselib.o: lbaselib.c; $(DO_LUACC)
lbitlib.o: lbitlib.c; $(DO_LUACC)
lcode.o: lcode.c; $(DO_LUACC)
lcorolib.o: lcorolib.c; $(DO_LUACC)
lctype.o: lctype.c; $(DO_LUACC)
ldblib.o: ldblib.c; $(DO_LUACC)
ldebug.o: ldebug.c; $(DO_LUACC)
ldo.o: ldo.c; $(DO_LUACC)
ldump.o: ldump.c; $(DO_LUACC)
lfunc.o: lfunc.c; $(DO_LUACC)
lgc.o: lgc.c; $(DO_LUACC)
linit.o: linit.c; $(DO_LUACC)
liolib.o: liolib.c; $(DO_LUACC)
llex.o: llex.c; $(DO_LUACC)
lmathlib.o: lmathlib.c; $(DO_LUACC)
lmem.o: lmem.c; $(DO_LUACC)
loadlib.o: loadlib.c; $(DO_LUACC)
lobject.o: lobject.c; $(DO_LUACC)
lopcodes.o: lopcodes.c; $(DO_LUACC)
loslib.o: loslib.c; $(DO_LUACC)
lparser.o: lparser.c; $(DO_LUACC)
lstate.o: lstate.c; $(DO_LUACC)
lstring.o: lstring.c; $(DO_LUACC)
lstrlib.o: lstrlib.c; $(DO_LUACC)
ltable.o: ltable.c; $(DO_LUACC)
ltablib.o: ltablib.c; $(DO_LUACC)
ltm.o: ltm.c; $(DO_LUACC)
lua.o: lua.c; $(DO_LUACC)
luac.o: luac.c; $(DO_LUACC)
lundump.o: lundump.c; $(DO_LUACC)
lvm.o: lvm.c; $(DO_LUACC)
lzio.o: lzio.c; $(DO_LUACC)
build_so: $(OBJ) $(SOOBJ) $(LUAOBJ)
ifeq ($(PLATFORM), mingw32)
$(CC) -shared -Wl,--export-all-symbols,-soname,qqgame$(ARCH).$(EXT) -o qagame$(ARCH).$(EXT) $(OBJ) $(SOOBJ) $(LUAOBJ) -lm
else
$(CC) -shared -Wl,--export-dynamic,-soname,qagame$(ARCH).$(EXT) -o qagame$(ARCH).$(EXT) $(OBJ) $(SOOBJ) $(LUAOBJ) -lm -lpthread
endif
clean:
rm -f *.o *.$(EXT)

View File

@ -11,6 +11,7 @@ DOUBLE {DIGIT}+"."?{DIGIT}*
KEYWORD [a-zA-Z]+[a-zA-Z0-9]*
%option reentrant
%option noyywrap
%option extra-type="bgLexMorphem*"
%%

View File

@ -1,3 +1,4 @@
#line 2 "bg_lex.yy.c"
#line 2 "bg_lex.lex"
#include "q_shared.h"
#include "bg_lex.h"
@ -6,7 +7,7 @@
#line 10 "lex.yy.c"
#line 11 "bg_lex.yy.c"
#define YY_INT_ALIGNED short int
@ -340,6 +341,9 @@ void yyfree (void * ,yyscan_t yyscanner );
/* Begin user sect3 */
#define yywrap(n) 1
#define YY_SKIP_YYWRAP
typedef unsigned char YY_CHAR;
typedef int yy_state_type;
@ -534,7 +538,7 @@ static yyconst flex_int16_t yy_chk[233] =
#define YY_RESTORE_YY_MORE_OFFSET
#line 1 "bg_lex.lex"
#line 538 "lex.yy.c"
#line 542 "bg_lex.yy.c"
#define INITIAL 0
@ -758,9 +762,9 @@ YY_DECL
register int yy_act;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
#line 16 "bg_lex.lex"
#line 17 "bg_lex.lex"
#line 764 "lex.yy.c"
#line 768 "bg_lex.yy.c"
if ( !yyg->yy_init )
{
@ -846,7 +850,7 @@ do_action: /* This label is used only to access EOF actions. */
case 1:
/* rule 1 can match eol */
YY_RULE_SETUP
#line 17 "bg_lex.lex"
#line 18 "bg_lex.lex"
{
yyextra->type = LMT_STRING;
yyextra->data.string = yytext;
@ -856,7 +860,7 @@ YY_RULE_SETUP
YY_BREAK
case 2:
YY_RULE_SETUP
#line 23 "bg_lex.lex"
#line 24 "bg_lex.lex"
{
yyextra->type = LMT_INT;
yyextra->data.numInteger = atoi(yytext);
@ -866,7 +870,7 @@ YY_RULE_SETUP
YY_BREAK
case 3:
YY_RULE_SETUP
#line 29 "bg_lex.lex"
#line 30 "bg_lex.lex"
{
yyextra->type = LMT_DOUBLE;
yyextra->data.numDouble = atof(yytext);
@ -876,7 +880,7 @@ YY_RULE_SETUP
YY_BREAK
case 4:
YY_RULE_SETUP
#line 35 "bg_lex.lex"
#line 36 "bg_lex.lex"
{
yyextra->type = LMT_SYMBOL;
yyextra->data.symbol = bgLex_textToSymbol(yytext);
@ -886,7 +890,7 @@ YY_RULE_SETUP
YY_BREAK
case 5:
YY_RULE_SETUP
#line 41 "bg_lex.lex"
#line 42 "bg_lex.lex"
{
double a, b, c;
sscanf(yytext, "{ %f %f %f }", &a, &b, &c);
@ -900,7 +904,7 @@ YY_RULE_SETUP
YY_BREAK
case 6:
YY_RULE_SETUP
#line 52 "bg_lex.lex"
#line 53 "bg_lex.lex"
{
double a, b, c;
sscanf(yytext, "{ %f %f %f }", &a, &b, &c);
@ -914,7 +918,7 @@ YY_RULE_SETUP
YY_BREAK
case 7:
YY_RULE_SETUP
#line 62 "bg_lex.lex"
#line 63 "bg_lex.lex"
{
double a, b, c;
sscanf(yytext, "{ %f %f %f }", &a, &b, &c);
@ -928,7 +932,7 @@ YY_RULE_SETUP
YY_BREAK
case 8:
YY_RULE_SETUP
#line 72 "bg_lex.lex"
#line 73 "bg_lex.lex"
{
double a, b, c;
sscanf(yytext, "{ %f %f %f }", &a, &b, &c);
@ -942,7 +946,7 @@ YY_RULE_SETUP
YY_BREAK
case 9:
YY_RULE_SETUP
#line 82 "bg_lex.lex"
#line 83 "bg_lex.lex"
{
double a, b, c;
sscanf(yytext, "{ %f %f %f }", &a, &b, &c);
@ -956,7 +960,7 @@ YY_RULE_SETUP
YY_BREAK
case 10:
YY_RULE_SETUP
#line 92 "bg_lex.lex"
#line 93 "bg_lex.lex"
{
double a, b, c;
sscanf(yytext, "{ %f %f %f }", &a, &b, &c);
@ -970,7 +974,7 @@ YY_RULE_SETUP
YY_BREAK
case 11:
YY_RULE_SETUP
#line 102 "bg_lex.lex"
#line 103 "bg_lex.lex"
{
double a, b, c;
sscanf(yytext, "{ %f %f %f }", &a, &b, &c);
@ -984,7 +988,7 @@ YY_RULE_SETUP
YY_BREAK
case 12:
YY_RULE_SETUP
#line 112 "bg_lex.lex"
#line 113 "bg_lex.lex"
{
double a, b, c;
sscanf(yytext, "{ %f %f %f }", &a, &b, &c);
@ -998,7 +1002,7 @@ YY_RULE_SETUP
YY_BREAK
case 13:
YY_RULE_SETUP
#line 122 "bg_lex.lex"
#line 123 "bg_lex.lex"
{
double a, b, c, d;
sscanf(yytext, "{ %f %f %f %f }", &a, &b, &c, &d);
@ -1013,7 +1017,7 @@ YY_RULE_SETUP
YY_BREAK
case 14:
YY_RULE_SETUP
#line 133 "bg_lex.lex"
#line 134 "bg_lex.lex"
{
double a, b, c, d;
sscanf(yytext, "{ %f %f %f %f }", &a, &b, &c, &d);
@ -1028,7 +1032,7 @@ YY_RULE_SETUP
YY_BREAK
case 15:
YY_RULE_SETUP
#line 144 "bg_lex.lex"
#line 145 "bg_lex.lex"
{
double a, b, c, d;
sscanf(yytext, "{ %f %f %f %f }", &a, &b, &c, &d);
@ -1043,7 +1047,7 @@ YY_RULE_SETUP
YY_BREAK
case 16:
YY_RULE_SETUP
#line 155 "bg_lex.lex"
#line 156 "bg_lex.lex"
{
double a, b, c, d;
sscanf(yytext, "{ %f %f %f %f }", &a, &b, &c, &d);
@ -1058,7 +1062,7 @@ YY_RULE_SETUP
YY_BREAK
case 17:
YY_RULE_SETUP
#line 166 "bg_lex.lex"
#line 167 "bg_lex.lex"
{
double a, b, c, d;
sscanf(yytext, "{ %f %f %f %f }", &a, &b, &c, &d);
@ -1073,7 +1077,7 @@ YY_RULE_SETUP
YY_BREAK
case 18:
YY_RULE_SETUP
#line 177 "bg_lex.lex"
#line 178 "bg_lex.lex"
{
double a, b, c, d;
sscanf(yytext, "{ %f %f %f %f }", &a, &b, &c, &d);
@ -1088,7 +1092,7 @@ YY_RULE_SETUP
YY_BREAK
case 19:
YY_RULE_SETUP
#line 188 "bg_lex.lex"
#line 189 "bg_lex.lex"
{
double a, b, c, d;
sscanf(yytext, "{ %f %f %f %f }", &a, &b, &c, &d);
@ -1103,7 +1107,7 @@ YY_RULE_SETUP
YY_BREAK
case 20:
YY_RULE_SETUP
#line 199 "bg_lex.lex"
#line 200 "bg_lex.lex"
{
double a, b, c, d;
sscanf(yytext, "{ %f %f %f %f }", &a, &b, &c, &d);
@ -1118,7 +1122,7 @@ YY_RULE_SETUP
YY_BREAK
case 21:
YY_RULE_SETUP
#line 210 "bg_lex.lex"
#line 211 "bg_lex.lex"
{
double a, b, c, d;
sscanf(yytext, "{ %f %f %f %f }", &a, &b, &c, &d);
@ -1133,7 +1137,7 @@ YY_RULE_SETUP
YY_BREAK
case 22:
YY_RULE_SETUP
#line 221 "bg_lex.lex"
#line 222 "bg_lex.lex"
{
double a, b, c, d;
sscanf(yytext, "{ %f %f %f %f }", &a, &b, &c, &d);
@ -1148,7 +1152,7 @@ YY_RULE_SETUP
YY_BREAK
case 23:
YY_RULE_SETUP
#line 232 "bg_lex.lex"
#line 233 "bg_lex.lex"
{
double a, b, c, d;
sscanf(yytext, "{ %f %f %f %f }", &a, &b, &c, &d);
@ -1163,7 +1167,7 @@ YY_RULE_SETUP
YY_BREAK
case 24:
YY_RULE_SETUP
#line 243 "bg_lex.lex"
#line 244 "bg_lex.lex"
{
double a, b, c, d;
sscanf(yytext, "{ %f %f %f %f }", &a, &b, &c, &d);
@ -1178,7 +1182,7 @@ YY_RULE_SETUP
YY_BREAK
case 25:
YY_RULE_SETUP
#line 254 "bg_lex.lex"
#line 255 "bg_lex.lex"
{
double a, b, c, d;
sscanf(yytext, "{ %f %f %f %f }", &a, &b, &c, &d);
@ -1193,7 +1197,7 @@ YY_RULE_SETUP
YY_BREAK
case 26:
YY_RULE_SETUP
#line 265 "bg_lex.lex"
#line 266 "bg_lex.lex"
{
double a, b, c, d;
sscanf(yytext, "{ %f %f %f %f }", &a, &b, &c, &d);
@ -1208,7 +1212,7 @@ YY_RULE_SETUP
YY_BREAK
case 27:
YY_RULE_SETUP
#line 276 "bg_lex.lex"
#line 277 "bg_lex.lex"
{
double a, b, c, d;
sscanf(yytext, "{ %f %f %f %f }", &a, &b, &c, &d);
@ -1223,7 +1227,7 @@ YY_RULE_SETUP
YY_BREAK
case 28:
YY_RULE_SETUP
#line 287 "bg_lex.lex"
#line 288 "bg_lex.lex"
{
double a, b, c, d;
sscanf(yytext, "{ %f %f %f %f }", &a, &b, &c, &d);
@ -1238,7 +1242,7 @@ YY_RULE_SETUP
YY_BREAK
case 29:
YY_RULE_SETUP
#line 298 "bg_lex.lex"
#line 299 "bg_lex.lex"
{
yyextra->type = LMT_SYMBOL;
yyextra->data.symbol = LSYM_OBRACEC;
@ -1248,7 +1252,7 @@ YY_RULE_SETUP
YY_BREAK
case 30:
YY_RULE_SETUP
#line 304 "bg_lex.lex"
#line 305 "bg_lex.lex"
{
yyextra->type = LMT_SYMBOL;
yyextra->data.symbol = LSYM_CBRACEC;
@ -1258,7 +1262,7 @@ YY_RULE_SETUP
YY_BREAK
case 31:
YY_RULE_SETUP
#line 310 "bg_lex.lex"
#line 311 "bg_lex.lex"
{
yyextra->type = LMT_SYMBOL;
yyextra->data.symbol = LSYM_OBRACE;
@ -1268,7 +1272,7 @@ YY_RULE_SETUP
YY_BREAK
case 32:
YY_RULE_SETUP
#line 316 "bg_lex.lex"
#line 317 "bg_lex.lex"
{
yyextra->type = LMT_SYMBOL;
yyextra->data.symbol = LSYM_CBRACE;
@ -1278,7 +1282,7 @@ YY_RULE_SETUP
YY_BREAK
case 33:
YY_RULE_SETUP
#line 322 "bg_lex.lex"
#line 323 "bg_lex.lex"
{
yyextra->type = LMT_SYMBOL;
yyextra->data.symbol = LSYM_OBRACESQ;
@ -1288,7 +1292,7 @@ YY_RULE_SETUP
YY_BREAK
case 34:
YY_RULE_SETUP
#line 328 "bg_lex.lex"
#line 329 "bg_lex.lex"
{
yyextra->type = LMT_SYMBOL;
yyextra->data.symbol = LSYM_CBRACESQ;
@ -1298,7 +1302,7 @@ YY_RULE_SETUP
YY_BREAK
case 35:
YY_RULE_SETUP
#line 334 "bg_lex.lex"
#line 335 "bg_lex.lex"
{
yyextra->column++;
yyextra->type = LMT_IGNORE;
@ -1308,7 +1312,7 @@ YY_RULE_SETUP
case 36:
/* rule 36 can match eol */
YY_RULE_SETUP
#line 339 "bg_lex.lex"
#line 340 "bg_lex.lex"
{
yyextra->line++;
yyextra->type = LMT_IGNORE;
@ -1317,7 +1321,7 @@ YY_RULE_SETUP
YY_BREAK
case 37:
YY_RULE_SETUP
#line 344 "bg_lex.lex"
#line 345 "bg_lex.lex"
{
yyextra->column++;
yyextra->type = LMT_IGNORE;
@ -1326,10 +1330,10 @@ YY_RULE_SETUP
YY_BREAK
case 38:
YY_RULE_SETUP
#line 349 "bg_lex.lex"
#line 350 "bg_lex.lex"
ECHO;
YY_BREAK
#line 1333 "lex.yy.c"
#line 1337 "bg_lex.yy.c"
case YY_STATE_EOF(INITIAL):
yyterminate();
@ -2484,7 +2488,7 @@ void yyfree (void * ptr , yyscan_t yyscanner)
#define YYTABLES_NAME "yytables"
#line 349 "bg_lex.lex"
#line 350 "bg_lex.lex"

View File

@ -1,173 +0,0 @@
default: build_so
# determine arch and platform
ARCH=$(shell uname -m | sed -e s/i.86/i386/)
PLATFORM=$(shell uname|sed -e s/_.*//|tr '[:upper:]' '[:lower:]')
# compiler to use for building shared objects
CC = gcc
# cross compiling
ifneq ($(TARGET), mingw32)
ifeq ($(TARGET), win32)
PLATFORM=mingw32
ARCH=x86
CC=i686-w64-mingw32-gcc
CFLAGS+=-m32
endif
ifeq ($(TARGET), win64)
PLATFORM=mingw32
ARCH=x64
CC=x86_64-w64-mingw32-gcc
CFLAGS+=-m64
endif
else
# we are compiling on windows
ARCH=x86
endif
# cflags for the compiler
ifeq ($(PLATFORM), mingw32)
SOCFLAGS = $(CFLAGS)
else
SOCFLAGS = $(CFLAGS) -fPIC
endif
# set extension
ifeq ($(PLATFORM), mingw32)
EXT=dll
else
EXT=so
endif
# warning level
ifeq ($(DEBUG), 1)
WL=-Wall
else
WL=-Wall -Wno-unused-but-set-variable
endif
# ui objects
OBJ = \
ui_turbolift.o \
ui_transporter.o \
ui_motd.o \
ui_admin.o \
ui_video.o \
ui_teamorders.o \
ui_team.o \
ui_startserver.o \
ui_spskill.o \
ui_sppostgame.o \
ui_splevel.o \
ui_specifyserver.o \
ui_sparena.o \
ui_sound.o \
ui_servers2.o \
ui_serverinfo.o \
ui_removebots.o \
ui_qmenu.o \
ui_preferences.o \
ui_playersettings.o \
ui_players.o \
ui_playermodel.o \
ui_network.o \
ui_mods.o \
ui_mfield.o \
ui_menu.o \
ui_main.o \
ui_ingame.o \
ui_gameinfo.o \
ui_fonts.o \
ui_emotes.o \
ui_demo2.o \
ui_cvars.o \
ui_credits.o \
ui_controls2.o \
ui_connect.o \
ui_confirm.o \
ui_cdkey.o \
ui_atoms.o \
ui_addbots.o
# dependencies from game
OBJDEP = \
q_shared.o \
q_math.o \
bg_misc.o
# object for syscalls to the engine
SOOBJ = \
ui_syscalls.o
# do cc for shared libraries
ifeq ($(DEBUG), 1)
DO_SOCC = $(CC) $(SOCFLAGS) $(WL) -g3 $(DEFINES) -o $@ -c $<
else
DO_SOCC = $(CC) $(SOCFLAGS) $(WL) $(DEFINES) -o $@ -c $<
endif
build_so: DO_CC=$(DO_SOCC)
cg_consolecmds.o : cg_consolecmds.c; $(DO_CC)
ui_addbots.o : ui_addbots.c; $(DO_CC)
ui_atoms.o : ui_atoms.c; $(DO_CC)
ui_cdkey.o : ui_cdkey.c; $(DO_CC)
ui_confirm.o : ui_confirm.c; $(DO_CC)
ui_connect.o : ui_connect.c; $(DO_CC)
ui_controls2.o : ui_controls2.c; $(DO_CC)
ui_cvars.o : ui_cvars.c; $(DO_CC)
ui_demo2.o : ui_demo2.c; $(DO_CC)
ui_fonts.o : ui_fonts.c; $(DO_CC)
ui_gameinfo.o : ui_gameinfo.c; $(DO_CC)
ui_ingame.o : ui_ingame.c; $(DO_CC)
ui_main.o : ui_main.c; $(DO_CC)
ui_menu.o : ui_menu.c; $(DO_CC)
ui_mfield.o : ui_mfield.c; $(DO_CC)
ui_mods.o : ui_mods.c; $(DO_CC)
ui_network.o : ui_network.c; $(DO_CC)
ui_playermodel.o : ui_playermodel.c; $(DO_CC)
ui_players.o : ui_players.c; $(DO_CC)
ui_playersettings.o : ui_playersettings.c; $(DO_CC)
ui_preferences.o : ui_preferences.c; $(DO_CC)
ui_qmenu.o : ui_qmenu.c; $(DO_CC)
ui_removebots.o : ui_removebots.c; $(DO_CC)
ui_serverinfo.o : ui_serverinfo.c; $(DO_CC)
ui_servers2.o : ui_servers2.c; $(DO_CC)
ui_sound.o : ui_sound.c; $(DO_CC)
ui_sparena.o : ui_sparena.c; $(DO_CC)
ui_specifyserver.o : ui_specifyserver.c; $(DO_CC)
ui_splevel.o : ui_splevel.c; $(DO_CC)
ui_sppostgame.o : ui_sppostgame.c; $(DO_CC)
ui_spreset.o : ui_spreset.c; $(DO_CC)
ui_spskill.o : ui_spskill.c; $(DO_CC)
ui_startserver.o : ui_startserver.c; $(DO_CC)
ui_team.o : ui_team.c; $(DO_CC)
ui_teamorders.o : ui_teamorders.c; $(DO_CC)
ui_video.o : ui_video.c; $(DO_CC)
ui_credits.o : ui_credits.c; $(DO_CC)
ui_admin.o : ui_admin.c; $(DO_CC)
ui_emotes.o : ui_emotes.c; $(DO_CC)
ui_motd.o : ui_motd.c; $(DO_CC)
ui_msd.o : ui_msd.c; $(DO_CC)
ui_transporter.o : ui_transporter.c; $(DO_CC)
ui_turbolift.o : ui_turbolift.c; $(DO_CC)
ui_syscalls.o : ui_syscalls.c; $(DO_CC)
q_shared.o: ../game/q_shared.c; $(DO_CC)
q_math.o: ../game/q_math.c; $(DO_CC)
bg_misc.o: ../game/bg_misc.c; $(DO_CC)
build_so: $(OBJDEP) $(OBJ) $(SOOBJ)
ifeq ($(PLATFORM), mingw32)
$(CC) -shared -Wl,--export-all-symbols,-soname,ui$(ARCH).$(EXT) -o ui$(ARCH).$(EXT) $(OBJ) $(OBJDEP) $(SOOBJ)
else
$(CC) -shared -Wl,--export-dynamic,-soname,ui$(ARCH).$(EXT) -o ui$(ARCH).$(EXT) $(OBJ) $(OBJDEP) $(SOOBJ)
endif
clean:
rm -f *.o *.$(EXT)