Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | RSS feed

  1. from sys import executable as python_cmd
  2. import distutils.version
  3.  
  4. Import('*')
  5.  
  6. if not env['llvm']:
  7.     print 'warning: LLVM disabled: not building llvmpipe'
  8.     Return()
  9.  
  10. env = env.Clone()
  11.  
  12. llvmpipe = env.ConvenienceLibrary(
  13.         target = 'llvmpipe',
  14.         source = [
  15.                 'lp_bld_alpha.c',
  16.                 'lp_bld_blend.c',
  17.                 'lp_bld_blend_aos.c',
  18.                 'lp_bld_blend_logicop.c',
  19.                 'lp_bld_depth.c',
  20.                 'lp_bld_interp.c',
  21.                 'lp_clear.c',
  22.                 'lp_context.c',
  23.                 'lp_draw_arrays.c',
  24.                 'lp_fence.c',
  25.                 'lp_flush.c',
  26.                 'lp_jit.c',
  27.                 'lp_memory.c',
  28.                 'lp_perf.c',
  29.                 'lp_query.c',
  30.                 'lp_rast.c',
  31.                 'lp_rast_debug.c',
  32.                 'lp_rast_tri.c',
  33.                 'lp_scene.c',
  34.                 'lp_scene_queue.c',
  35.                 'lp_screen.c',
  36.                 'lp_setup.c',
  37.                 'lp_setup_line.c',
  38.                 'lp_setup_point.c',
  39.                 'lp_setup_tri.c',
  40.                 'lp_setup_vbuf.c',
  41.                 'lp_state_blend.c',
  42.                 'lp_state_clip.c',
  43.                 'lp_state_derived.c',
  44.                 'lp_state_fs.c',
  45.                 'lp_state_setup.c',
  46.                 'lp_state_gs.c',
  47.                 'lp_state_rasterizer.c',
  48.                 'lp_state_sampler.c',
  49.                 'lp_state_so.c',
  50.                 'lp_state_surface.c',
  51.                 'lp_state_vertex.c',
  52.                 'lp_state_vs.c',
  53.                 'lp_surface.c',
  54.                 'lp_tex_sample.c',
  55.                 'lp_texture.c'
  56.         ])
  57.  
  58. env.Alias('llvmpipe', llvmpipe)
  59.  
  60.  
  61. if not env['embedded']:
  62.     env = env.Clone()
  63.  
  64.     env.Prepend(LIBS = [llvmpipe] + gallium)
  65.  
  66.     tests = [
  67.         'format',
  68.         'blend',
  69.         'conv',
  70.         'printf',
  71.     ]
  72.  
  73.     if not env['msvc']:
  74.         tests.append('arit')
  75.  
  76.     for test in tests:
  77.         testname = 'lp_test_' + test
  78.         target = env.Program(
  79.             target = testname,
  80.             source = [testname + '.c', 'lp_test_main.c'],
  81.         )
  82.         env.InstallProgram(target)
  83.        
  84.         # http://www.scons.org/wiki/UnitTests
  85.         alias = env.Alias(testname, [target], target[0].abspath)
  86.         AlwaysBuild(alias)
  87.  
  88. Export('llvmpipe')
  89.