# -*- mode: python -*- # coding=utf-8 # DOOM build script # TTimo # http://scons.sourceforge.net #*************************************************************************** #* #* PROJECT: The Dark Mod #* $Source$ #* $Revision$ #* $Date$ #* $Author$ #* #* $Log$ #* Revision 1.3 2005/11/11 22:50:09 sparhawk #* SDK 1.3 Merge #* #* Revision 1.2 2004/11/28 19:23:11 sparhawk #* Added header and Id Copyright. #* #* #*************************************************************************** import scons_utils Import( 'GLOBALS' ) Import( GLOBALS ) idlib_string = ' \ bv/bounds.cpp \ bv/frustum.cpp \ bv/sphere.cpp \ bv/box.cpp \ geometry/drawvert.cpp \ geometry/winding2d.cpp \ geometry/surface_sweptspline.cpp \ geometry/winding.cpp \ geometry/surface.cpp \ geometry/surface_patch.cpp \ geometry/tracemodel.cpp \ geometry/jointtransform.cpp \ hashing/crc32.cpp \ hashing/crc16.cpp \ hashing/honeyman.cpp \ hashing/md4.cpp \ hashing/md5.cpp \ math/angles.cpp \ math/lcp.cpp \ math/math.cpp \ math/matrix.cpp \ math/ode.cpp \ math/plane.cpp \ math/pluecker.cpp \ math/polynomial.cpp \ math/quat.cpp \ math/rotation.cpp \ math/simd.cpp \ math/simd_generic.cpp \ math/simd_mmx.cpp \ math/simd_sse.cpp \ math/simd_sse2.cpp \ math/simd_sse3.cpp \ math/vector.cpp \ bitmsg.cpp \ langdict.cpp \ lexer.cpp \ lib.cpp \ containers/hashindex.cpp \ dict.cpp \ str.cpp \ parser.cpp \ mapfile.cpp \ cmdargs.cpp \ token.cpp \ base64.cpp \ timer.cpp \ heap.cpp' # greebo: Compile the altivec file in MacOSX only if g_os == 'MacOSX': idlib_string += ' math/simd_altivec.cpp ' idlib_list = scons_utils.BuildList( 'idlib', idlib_string ) for i in range( len( idlib_list ) ): idlib_list[ i ] = '../../' + idlib_list[ i ] local_env = g_env.Clone() local_env_noopt = g_env.Clone() # max allowed -O1 flags = OPTCPPFLAGS try: flags.remove( '-O3' ) flags.insert( 0, '-O1' ) except: pass local_env_noopt.Append( CPPFLAGS = flags ) # greebo: Need SSE2 instruction set to compile simd_sse2.cpp local_env.Append(CPPFLAGS = '-msse2') if g_os == 'MacOSX': local_env.Append(CPPFLAGS = '-faltivec') ret_list = [] if ( local_idlibpic == 0 ): for f in idlib_list: ret_list += local_env.StaticObject( source = f ) ret_list += local_env_noopt.StaticObject( source = [ '../../idlib/bv/frustum_gcc.cpp' ] ) else: for f in idlib_list: ret_list += local_env.SharedObject( source = f ) ret_list += local_env_noopt.SharedObject( source = [ '../../idlib/bv/frustum_gcc.cpp' ] ) Return( 'ret_list' )