]> git.xonotic.org Git - xonotic/netradiant.git/blob - SConscript.lib
merge branch work back into trunk
[xonotic/netradiant.git] / SConscript.lib
1 # -*- mode: python -*-
2 # ZeroRadiant build scripts
3 # TTimo <ttimo@idsoftware.com>
4 # http://scons.sourceforge.net
5
6 import os
7
8 Import( [ 'utils', 'config', 'settings', 'project' ] )
9
10 ( libpath, libname ) = os.path.split( project )
11 libname = os.path.splitext( libname )[0]
12
13 env = Environment()
14 settings.SetupEnvironment( env, config['name'] )
15 proj = utils.vcproj( os.path.join( GetLaunchDir(), project ) )
16
17 # some filtering. may need to improve that
18 add_sources = []
19 ( drop, files ) = proj.filterSource( r'.*l_net_wins\.c' )
20 if ( len( drop ) != 0 ):
21         add_sources.append( 'l_net_berkeley.c' )
22
23 emit_func = env.StaticObject
24 try:
25         if ( config['shared'] ):
26                 emit_func = env.SharedObject
27 except:
28         pass
29
30 objects = []
31 for i in files + add_sources:
32         objects.append( emit_func( os.path.join( libpath, i ) ) )
33
34 Return( 'objects' )