dhewm3/neo/sys/scons/SConscript.idlib
dhewg 8023bc5d56 Always compile all SIMD code
Protect all SIMD implementations with the according defines and
let the compiler decide if it supports the intructions.

Linux will still use Simd_Generic because CPU feature runtime
detection is missing.
2011-12-13 18:56:38 +01:00

85 lines
1.6 KiB
Python

# -*- mode: python -*-
# DOOM build script
# TTimo <ttimo@idsoftware.com>
# http://scons.sourceforge.net
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/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_AltiVec.cpp \
math/Simd_MMX.cpp \
math/Simd_3DNow.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'
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 )
ret_list = []
if ( local_idlibpic == 0 ):
for f in idlib_list:
ret_list += local_env.StaticObject( source = f )
else:
for f in idlib_list:
ret_list += local_env.SharedObject( source = f )
Return( 'ret_list' )