some updates to the Linux build system - obtained a core binary and all required...
[xonotic/netradiant.git] / SConscript.lib
index 18d738a30fbd3089a8047b31812cbfcc7aabf07b..777fb2c808d3f7bbd30e948947fe2cb45f7e02c8 100644 (file)
@@ -11,7 +11,7 @@ Import( [ 'utils', 'config', 'settings', 'project' ] )
 libname = os.path.splitext( libname )[0]
 
 env = Environment()
-settings.SetupEnvironment( env, config )
+settings.SetupEnvironment( env, config['name'] )
 proj = utils.vcproj( os.path.join( GetLaunchDir(), project ) )
 
 # some filtering. may need to improve that
@@ -20,9 +20,15 @@ add_sources = []
 if ( len( drop ) != 0 ):
        add_sources.append( 'l_net_berkeley.c' )
 
-#env.StaticLibrary( libname, [ os.path.join( libpath, i ) for i in files ] )
+emit_func = env.StaticObject
+try:
+       if ( config['shared'] ):
+               emit_func = env.SharedObject
+except:
+       pass
+
 objects = []
 for i in files + add_sources:
-       objects.append( env.StaticObject( os.path.join( libpath, i ) ) )
+       objects.append( emit_func( os.path.join( libpath, i ) ) )
 
 Return( 'objects' )