2007-09-30 19:39:29 +00:00
|
|
|
# -*- mode: python -*-
|
2012-05-28 00:06:21 +00:00
|
|
|
# GtkRadiant build scripts
|
|
|
|
# TTimo <ttimo@ttimo.net>
|
|
|
|
# http://scons.org/
|
2007-09-30 19:39:29 +00:00
|
|
|
|
|
|
|
import os
|
|
|
|
|
|
|
|
Import( [ 'utils', 'config', 'settings', 'project' ] )
|
|
|
|
|
|
|
|
( libpath, libname ) = os.path.split( project )
|
|
|
|
libname = os.path.splitext( libname )[0]
|
|
|
|
|
|
|
|
env = Environment()
|
2007-10-24 04:00:48 +00:00
|
|
|
settings.SetupEnvironment( env, config['name'] )
|
2007-09-30 19:39:29 +00:00
|
|
|
proj = utils.vcproj( os.path.join( GetLaunchDir(), project ) )
|
|
|
|
|
|
|
|
# some filtering. may need to improve that
|
|
|
|
add_sources = []
|
|
|
|
( drop, files ) = proj.filterSource( r'.*l_net_wins\.c' )
|
|
|
|
if ( len( drop ) != 0 ):
|
|
|
|
add_sources.append( 'l_net_berkeley.c' )
|
|
|
|
|
2007-10-24 04:00:48 +00:00
|
|
|
emit_func = env.StaticObject
|
|
|
|
try:
|
|
|
|
if ( config['shared'] ):
|
|
|
|
emit_func = env.SharedObject
|
|
|
|
except:
|
|
|
|
pass
|
|
|
|
|
2007-09-30 19:39:29 +00:00
|
|
|
objects = []
|
|
|
|
for i in files + add_sources:
|
2007-10-24 04:00:48 +00:00
|
|
|
objects.append( emit_func( os.path.join( libpath, i ) ) )
|
2007-09-30 19:39:29 +00:00
|
|
|
|
|
|
|
Return( 'objects' )
|