SConscript.idlib 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. # -*- mode: python -*-
  2. # DOOM build script
  3. # TTimo <ttimo@idsoftware.com>
  4. # http://scons.sourceforge.net
  5. import scons_utils
  6. Import( 'GLOBALS' )
  7. Import( GLOBALS )
  8. idlib_string = ' \
  9. bv/Bounds.cpp \
  10. bv/Frustum.cpp \
  11. bv/Sphere.cpp \
  12. bv/Box.cpp \
  13. geometry/DrawVert.cpp \
  14. geometry/Winding2D.cpp \
  15. geometry/Surface_SweptSpline.cpp \
  16. geometry/Winding.cpp \
  17. geometry/Surface.cpp \
  18. geometry/Surface_Patch.cpp \
  19. geometry/TraceModel.cpp \
  20. geometry/JointTransform.cpp \
  21. hashing/CRC32.cpp \
  22. hashing/MD4.cpp \
  23. hashing/MD5.cpp \
  24. math/Angles.cpp \
  25. math/Lcp.cpp \
  26. math/Math.cpp \
  27. math/Matrix.cpp \
  28. math/Ode.cpp \
  29. math/Plane.cpp \
  30. math/Pluecker.cpp \
  31. math/Polynomial.cpp \
  32. math/Quat.cpp \
  33. math/Rotation.cpp \
  34. math/Simd.cpp \
  35. math/Simd_Generic.cpp \
  36. math/Vector.cpp \
  37. BitMsg.cpp \
  38. LangDict.cpp \
  39. Lexer.cpp \
  40. Lib.cpp \
  41. containers/HashIndex.cpp \
  42. Dict.cpp \
  43. Str.cpp \
  44. Parser.cpp \
  45. MapFile.cpp \
  46. CmdArgs.cpp \
  47. Token.cpp \
  48. Base64.cpp \
  49. Timer.cpp \
  50. Heap.cpp'
  51. idlib_list = scons_utils.BuildList( 'idlib', idlib_string )
  52. for i in range( len( idlib_list ) ):
  53. idlib_list[ i ] = '../../' + idlib_list[ i ]
  54. local_env = g_env.Clone()
  55. local_env_noopt = g_env.Clone()
  56. # max allowed -O1
  57. flags = OPTCPPFLAGS
  58. try:
  59. flags.remove( '-O3' )
  60. flags.insert( 0, '-O1' )
  61. except:
  62. pass
  63. local_env_noopt.Append( CPPFLAGS = flags )
  64. ret_list = []
  65. if ( local_idlibpic == 0 ):
  66. for f in idlib_list:
  67. ret_list += local_env.StaticObject( source = f )
  68. ret_list += local_env_noopt.StaticObject( source = [ '../../idlib/bv/Frustum_gcc.cpp' ] )
  69. else:
  70. for f in idlib_list:
  71. ret_list += local_env.SharedObject( source = f )
  72. ret_list += local_env_noopt.SharedObject( source = [ '../../idlib/bv/Frustum_gcc.cpp' ] )
  73. Return( 'ret_list' )