2011-11-22 21:28:15 +00:00
|
|
|
# -*- mode: python -*-
|
|
|
|
# DOOM build script
|
|
|
|
# TTimo <ttimo@idsoftware.com>
|
|
|
|
# http://scons.sourceforge.net
|
|
|
|
|
|
|
|
import sys, os
|
|
|
|
import scons_utils
|
|
|
|
|
|
|
|
Import( 'GLOBALS' )
|
|
|
|
Import( GLOBALS )
|
|
|
|
|
|
|
|
game_string = ' \
|
|
|
|
AF.cpp \
|
|
|
|
AFEntity.cpp \
|
|
|
|
Actor.cpp \
|
|
|
|
Camera.cpp \
|
|
|
|
Entity.cpp \
|
|
|
|
BrittleFracture.cpp \
|
|
|
|
Fx.cpp \
|
|
|
|
GameEdit.cpp \
|
|
|
|
Game_local.cpp \
|
|
|
|
Game_network.cpp \
|
|
|
|
Item.cpp \
|
|
|
|
IK.cpp \
|
|
|
|
Light.cpp \
|
|
|
|
Misc.cpp \
|
|
|
|
Mover.cpp \
|
|
|
|
Moveable.cpp \
|
|
|
|
MultiplayerGame.cpp \
|
|
|
|
Player.cpp \
|
|
|
|
PlayerIcon.cpp \
|
|
|
|
PlayerView.cpp \
|
|
|
|
Projectile.cpp \
|
|
|
|
Pvs.cpp \
|
|
|
|
SecurityCamera.cpp \
|
|
|
|
SmokeParticles.cpp \
|
|
|
|
Sound.cpp \
|
|
|
|
Target.cpp \
|
|
|
|
Trigger.cpp \
|
|
|
|
Weapon.cpp \
|
|
|
|
WorldSpawn.cpp \
|
|
|
|
ai/AAS.cpp \
|
|
|
|
ai/AAS_debug.cpp \
|
|
|
|
ai/AAS_pathing.cpp \
|
|
|
|
ai/AAS_routing.cpp \
|
|
|
|
ai/AI.cpp \
|
|
|
|
ai/AI_events.cpp \
|
|
|
|
ai/AI_pathing.cpp \
|
|
|
|
ai/AI_Vagary.cpp \
|
|
|
|
gamesys/DebugGraph.cpp \
|
|
|
|
gamesys/Class.cpp \
|
|
|
|
gamesys/Event.cpp \
|
|
|
|
gamesys/SaveGame.cpp \
|
|
|
|
gamesys/SysCmds.cpp \
|
|
|
|
gamesys/SysCvar.cpp \
|
|
|
|
gamesys/TypeInfo.cpp \
|
|
|
|
anim/Anim.cpp \
|
|
|
|
anim/Anim_Blend.cpp \
|
|
|
|
anim/Anim_Import.cpp \
|
|
|
|
anim/Anim_Testmodel.cpp \
|
|
|
|
script/Script_Compiler.cpp \
|
|
|
|
script/Script_Interpreter.cpp \
|
|
|
|
script/Script_Program.cpp \
|
|
|
|
script/Script_Thread.cpp \
|
|
|
|
physics/Clip.cpp \
|
|
|
|
physics/Force.cpp \
|
|
|
|
physics/Force_Constant.cpp \
|
|
|
|
physics/Force_Drag.cpp \
|
|
|
|
physics/Force_Field.cpp \
|
|
|
|
physics/Force_Spring.cpp \
|
|
|
|
physics/Physics.cpp \
|
|
|
|
physics/Physics_AF.cpp \
|
|
|
|
physics/Physics_Actor.cpp \
|
|
|
|
physics/Physics_Base.cpp \
|
|
|
|
physics/Physics_Monster.cpp \
|
|
|
|
physics/Physics_Parametric.cpp \
|
|
|
|
physics/Physics_Player.cpp \
|
|
|
|
physics/Physics_RigidBody.cpp \
|
|
|
|
physics/Physics_Static.cpp \
|
|
|
|
physics/Physics_StaticMulti.cpp \
|
|
|
|
physics/Push.cpp'
|
|
|
|
|
|
|
|
if ( local_d3xp ):
|
|
|
|
game_string += ' \
|
|
|
|
Grabber.cpp \
|
|
|
|
physics/Force_Grab.cpp'
|
2011-12-01 09:36:59 +00:00
|
|
|
game_name = 'd3xp'
|
2011-11-22 21:28:15 +00:00
|
|
|
game_list = scons_utils.BuildList( 'd3xp', game_string )
|
|
|
|
else:
|
2011-12-01 09:36:59 +00:00
|
|
|
game_name = 'base'
|
2011-11-22 21:28:15 +00:00
|
|
|
game_list = scons_utils.BuildList( 'game', game_string )
|
|
|
|
|
2011-12-01 09:36:59 +00:00
|
|
|
|
2011-11-22 21:28:15 +00:00
|
|
|
for i in range( len( game_list ) ):
|
|
|
|
game_list[ i ] = '../../' + game_list[ i ]
|
|
|
|
|
|
|
|
local_env = g_game_env.Clone()
|
|
|
|
if ( local_d3xp ):
|
|
|
|
local_env.Append( CPPDEFINES = [ '_D3XP', 'CTF' ] )
|
2011-12-16 17:03:58 +00:00
|
|
|
local_env.Append( CPPFLAGS = [ '-Id3xp' ] )
|
|
|
|
else:
|
|
|
|
local_env.Append( CPPFLAGS = [ '-Igame' ] )
|
2011-11-22 21:28:15 +00:00
|
|
|
|
|
|
|
if ( local_demo == 1 ):
|
|
|
|
local_env.Append( CPPDEFINES = [ 'ID_DEMO_BUILD' ] )
|
|
|
|
|
|
|
|
if ( local_gamedll == 1 ):
|
|
|
|
local_env.Append( CPPDEFINES = [ 'GAME_DLL' ] )
|
2011-12-01 09:36:59 +00:00
|
|
|
ret = local_env.SharedLibrary( '%s/game%s-%s.so' % (g_build, g_cpu, game_name), game_list + idlib_objects, SHLIBPREFIX='' )
|
2011-11-22 21:28:15 +00:00
|
|
|
Return( 'ret' )
|
|
|
|
else:
|
|
|
|
ret_list = []
|
|
|
|
for i in game_list:
|
|
|
|
ret_list += local_env.StaticObject( source = i )
|
|
|
|
Return( 'ret_list' )
|