dhewm3/neo/sys/scons/SConscript.core

274 lines
5.6 KiB
Text
Raw Normal View History

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 )
renderer_string = ' \
Cinematic.cpp \
GuiModel.cpp \
Image_files.cpp \
Image_init.cpp \
Image_load.cpp \
Image_process.cpp \
Image_program.cpp \
Interaction.cpp \
Material.cpp \
MegaTexture.cpp \
Model.cpp \
ModelDecal.cpp \
ModelManager.cpp \
ModelOverlay.cpp \
Model_beam.cpp \
Model_ase.cpp \
Model_liquid.cpp \
Model_lwo.cpp \
Model_ma.cpp \
Model_md3.cpp \
Model_md5.cpp \
Model_prt.cpp \
Model_sprite.cpp \
RenderEntity.cpp \
RenderSystem.cpp \
RenderSystem_init.cpp \
RenderWorld.cpp \
RenderWorld_demo.cpp \
RenderWorld_load.cpp \
RenderWorld_portals.cpp \
VertexCache.cpp \
draw_arb.cpp \
draw_arb2.cpp \
draw_common.cpp \
draw_nv10.cpp \
draw_nv20.cpp \
draw_r200.cpp \
tr_backend.cpp \
tr_deform.cpp \
tr_font.cpp \
tr_guisurf.cpp \
tr_light.cpp \
tr_lightrun.cpp \
tr_main.cpp \
tr_orderIndexes.cpp \
tr_polytope.cpp \
tr_render.cpp \
tr_rendertools.cpp \
tr_shadowbounds.cpp \
tr_stencilshadow.cpp \
tr_subview.cpp \
tr_trace.cpp \
tr_trisurf.cpp \
tr_turboshadow.cpp'
renderer_list = scons_utils.BuildList( 'renderer', renderer_string )
framework_string = ' \
CVarSystem.cpp \
CmdSystem.cpp \
Common.cpp \
Compressor.cpp \
Console.cpp \
DemoFile.cpp \
DeclAF.cpp \
DeclEntityDef.cpp \
DeclFX.cpp \
DeclManager.cpp \
DeclParticle.cpp \
DeclPDA.cpp \
DeclSkin.cpp \
DeclTable.cpp \
EditField.cpp \
EventLoop.cpp \
File.cpp \
FileSystem.cpp \
KeyInput.cpp \
Unzip.cpp \
UsercmdGen.cpp \
Session_menu.cpp \
Session.cpp \
async/AsyncClient.cpp \
async/AsyncNetwork.cpp \
async/AsyncServer.cpp \
async/MsgChannel.cpp \
async/NetworkSystem.cpp \
async/ServerScan.cpp'
framework_list = scons_utils.BuildList( 'framework', framework_string )
cm_string = ' \
CollisionModel_contacts.cpp \
CollisionModel_contents.cpp \
CollisionModel_debug.cpp \
CollisionModel_files.cpp \
CollisionModel_load.cpp \
CollisionModel_rotate.cpp \
CollisionModel_trace.cpp \
CollisionModel_translate.cpp'
cm_list = scons_utils.BuildList( 'cm', cm_string )
dmap_string = ' \
dmap.cpp \
facebsp.cpp \
gldraw.cpp \
glfile.cpp \
leakfile.cpp \
map.cpp \
optimize.cpp \
output.cpp \
portals.cpp \
shadowopt3.cpp \
tritjunction.cpp \
tritools.cpp \
ubrush.cpp \
usurface.cpp'
dmap_list = scons_utils.BuildList( 'tools/compilers/dmap', dmap_string )
aas_string = ' \
AASBuild.cpp \
AASBuild_file.cpp \
AASBuild_gravity.cpp \
AASBuild_ledge.cpp \
AASBuild_merge.cpp \
AASCluster.cpp \
AASFile.cpp \
AASFile_optimize.cpp \
AASFile_sample.cpp \
AASReach.cpp \
AASFileManager.cpp \
Brush.cpp \
BrushBSP.cpp'
2011-11-22 21:28:15 +00:00
aas_list = scons_utils.BuildList( 'tools/compilers/aas', aas_string )
roq_string = ' \
NSBitmapImageRep.cpp \
codec.cpp \
roq.cpp \
roqParam.cpp'
roq_list = scons_utils.BuildList( 'tools/compilers/roqvq', roq_string )
renderbump_list = [ 'tools/compilers/renderbump/renderbump.cpp' ]
snd_string = ' \
snd_cache.cpp \
snd_decoder.cpp \
snd_efxfile.cpp \
snd_emitter.cpp \
snd_shader.cpp \
snd_system.cpp \
snd_wavefile.cpp \
snd_world.cpp'
snd_list = scons_utils.BuildList( 'sound', snd_string )
ui_string = ' \
BindWindow.cpp \
ChoiceWindow.cpp \
DeviceContext.cpp \
EditWindow.cpp \
FieldWindow.cpp \
GameBearShootWindow.cpp \
GameBustOutWindow.cpp \
GameSSDWindow.cpp \
GuiScript.cpp \
ListGUI.cpp \
ListWindow.cpp \
MarkerWindow.cpp \
RegExp.cpp \
RenderWindow.cpp \
SimpleWindow.cpp \
SliderWindow.cpp \
UserInterface.cpp \
Window.cpp \
Winvar.cpp'
ui_list = scons_utils.BuildList( 'ui', ui_string )
sys_string = ' \
sys_local.cpp \
cpu.cpp \
threads.cpp \
2011-11-22 21:28:15 +00:00
posix/posix_net.cpp \
posix/posix_main.cpp \
posix/posix_signal.cpp \
linux/main.cpp \
stub/util_stub.cpp'
if ( local_dedicated == 0 ):
sys_string += ' \
glimp.cpp \
2011-11-22 21:28:15 +00:00
posix/posix_input.cpp \
linux/input.cpp'
2011-11-22 21:28:15 +00:00
else:
sys_string += ' \
stub/stub_gl.cpp \
stub/openal_stub.cpp \
linux/dedicated.cpp'
2011-11-22 21:28:15 +00:00
sys_list = scons_utils.BuildList( 'sys', sys_string )
tools_string = ' \
guied/GEWindowWrapper_stub.cpp'
tools_list = scons_utils.BuildList( 'tools', tools_string )
core_list = framework_list + renderer_list + ui_list \
2011-11-22 21:28:15 +00:00
+ cm_list + dmap_list + renderbump_list + aas_list + roq_list \
+ snd_list + sys_list + tools_list
2011-11-22 21:28:15 +00:00
for i in range( len( core_list ) ):
core_list[ i ] = '../../' + core_list[ i ]
local_env = g_env.Clone()
if ( local_dedicated == 1 ):
local_env.Append( CPPDEFINES = [ 'ID_DEDICATED' ] )
2011-11-22 21:28:15 +00:00
if ( local_gamedll == 1 ):
local_env.Append( CPPDEFINES = [ '__DOOM_DLL__' ] )
if ( local_demo == 1 ):
local_env.Append( CPPDEFINES = [ 'ID_DEMO_BUILD' ] )
if ( local_curl == 0 ):
local_env.Append( CPPDEFINES = [ 'ID_ENABLE_CURL=0' ] )
local_env.Append( LIBS = [ 'SDL', 'SDLmain', 'jpeg', 'vorbisfile' ] )
2011-12-07 16:12:44 +00:00
if ( local_dedicated == 0 ):
local_env.Append( LIBS = [ 'GL' ] )
2011-12-07 16:12:44 +00:00
if (g_os == "Linux"):
local_env.Append( LIBS = [ 'dl' ] )
2011-11-30 19:16:42 +00:00
if ( local_curl == 1 ):
local_env.Append( LIBS = [ 'curl', 'z' ] )
2011-11-22 21:28:15 +00:00
if ( local_dedicated == 0 ):
local_env.Append( LIBS = [ 'X11', 'Xext', 'Xxf86vm' ] ) # 'Xxf86dga',
2011-11-22 21:28:15 +00:00
local_env.Append( LIBPATH = [ '/usr/X11R6/lib' ] )
local_env.Append( LIBS = [ 'openal' ] )
2011-11-22 21:28:15 +00:00
source_list = core_list
source_list += idlib_objects
if ( local_gamedll == 0 ):
source_list += game_objects
basename = 'doom'
if ( local_dedicated == 1 ):
basename += 'ded'
elif ( local_gamedll == 0 ):
basename += '-mon'
if ( local_demo == 1 ):
basename += '-demo'
d3wm = local_env.Program( target = '%s/%s.%s' % (g_build, basename, g_cpu), source = source_list )
2011-11-22 21:28:15 +00:00
Return( 'd3wm' )