dhewm3/neo/sys/scons/SConscript.core
dhewg 79aea4082f Port Linux events to SDL
New CVar "in_kbd" to set the layout for the keyboard. SDL 1.2
doesn't offer any way to determine it, and we need this feature
to use the same key for toggling the console independent of the
keyboard layout.
The old "in_nograb" from the Linux backend is still supported.
2012-01-02 15:44:16 -05:00

272 lines
5.5 KiB
Python

# -*- 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'
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 \
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 \
events.cpp'
else:
sys_string += ' \
stub/stub_gl.cpp \
stub/openal_stub.cpp \
linux/dedicated.cpp'
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 \
+ cm_list + dmap_list + renderbump_list + aas_list + roq_list \
+ snd_list + sys_list + tools_list
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' ] )
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' ] )
if ( local_dedicated == 0 ):
local_env.Append( LIBS = [ 'GL' ] )
if (g_os == "Linux"):
local_env.Append( LIBS = [ 'dl' ] )
if ( local_curl == 1 ):
local_env.Append( LIBS = [ 'curl', 'z' ] )
if ( local_dedicated == 0 ):
local_env.Append( LIBS = [ 'X11', 'Xext', 'Xxf86vm' ] ) # 'Xxf86dga',
local_env.Append( LIBPATH = [ '/usr/X11R6/lib' ] )
local_env.Append( LIBS = [ 'openal' ] )
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 )
Return( 'd3wm' )