Home | History | Annotate | Download | only in util
      1 import common
      2 
      3 Import('*')
      4 
      5 from sys import executable as python_cmd
      6 
      7 env = env.Clone()
      8 
      9 env.MSVC2013Compat()
     10 
     11 env.Prepend(CPPPATH = [
     12     '#include',
     13     xmlpool_options.dir.dir, # Dir to generated xmlpool/options.h
     14     '#src',
     15     '#src/mapi',
     16     '#src/mesa',
     17     '#src/gallium/include',
     18     '#src/gallium/auxiliary',
     19     '#src/util',
     20 ])
     21 
     22 env.CodeGenerate(
     23     target = 'format_srgb.c',
     24     script = 'format_srgb.py',
     25     source = [],
     26     command = python_cmd + ' $SCRIPT > $TARGET'
     27 )
     28 
     29 # parse Makefile.sources
     30 source_lists = env.ParseSourceList('Makefile.sources')
     31 
     32 mesautil_sources = (
     33     source_lists['MESA_UTIL_FILES'] +
     34     source_lists['MESA_UTIL_GENERATED_FILES']
     35 )
     36 
     37 mesautilenv = env.Clone()
     38 
     39 if env['dri']:
     40     mesautil_sources += source_lists['XMLCONFIG_FILES']
     41 
     42     mesautilenv.AppendUnique(LIBS = [
     43         'expat',
     44     ])
     45 
     46 mesautil = mesautilenv.ConvenienceLibrary(
     47     target = 'mesautil',
     48     source = mesautil_sources,
     49 )
     50 
     51 env.Alias('mesautil', mesautil)
     52 Export('mesautil')
     53 
     54 
     55 u_atomic_test = env.Program(
     56     target = 'u_atomic_test',
     57     source = ['u_atomic_test.c'],
     58 )
     59 env.UnitTest("u_atomic_test", u_atomic_test)
     60 
     61 roundeven_test = env.Program(
     62     target = 'roundeven_test',
     63     source = ['roundeven_test.c'],
     64 )
     65 env.UnitTest("roundeven_test", roundeven_test)
     66 
     67 env.Prepend(LIBS = [mesautil])
     68 mesa_sha1_test = env.Program(
     69     target = 'mesa-sha1_test',
     70     source = ['mesa-sha1_test.c'],
     71 )
     72 env.UnitTest("mesa-sha1_test", mesa_sha1_test)
     73