1Import('*') 2 3env = env.Clone() 4 5env.Prepend(LIBS = [gallium]) 6 7if env['platform'] in ('freebsd8', 'sunos'): 8 env.Append(LIBS = ['m']) 9 10if env['platform'] == 'freebsd8': 11 env.Append(LIBS = ['pthread']) 12 13progs = [ 14 'pipe_barrier_test', 15 'u_cache_test', 16 'u_format_test', 17 'u_format_compatible_test', 18 'u_half_test', 19 'translate_test' 20] 21 22for progname in progs: 23 prog = env.Program( 24 target = progname, 25 source = progname + '.c', 26 ) 27 28 env.Alias(progname, env.InstallProgram(prog)) 29 30 # http://www.scons.org/wiki/UnitTests 31 test_alias = env.Alias('unit', [prog], prog[0].abspath) 32 AlwaysBuild(test_alias) 33 34