X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=SConscript.lib;h=777fb2c808d3f7bbd30e948947fe2cb45f7e02c8;hb=ef710929c0631d2eccb11d6f55c1b9c1358063b6;hp=18d738a30fbd3089a8047b31812cbfcc7aabf07b;hpb=ff588a439f6496396c41d6bb4028e61bdfed38c7;p=xonotic%2Fnetradiant.git diff --git a/SConscript.lib b/SConscript.lib index 18d738a3..777fb2c8 100644 --- a/SConscript.lib +++ b/SConscript.lib @@ -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' )