Clone of mesa.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

SConscript 1.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. Import('*')
  2. from sys import executable as python_cmd
  3. env.Append(CPPPATH = [
  4. 'indices',
  5. 'util',
  6. ])
  7. env.CodeGenerate(
  8. target = 'indices/u_indices_gen.c',
  9. script = 'indices/u_indices_gen.py',
  10. source = [],
  11. command = python_cmd + ' $SCRIPT > $TARGET'
  12. )
  13. env.CodeGenerate(
  14. target = 'indices/u_unfilled_gen.c',
  15. script = 'indices/u_unfilled_gen.py',
  16. source = [],
  17. command = python_cmd + ' $SCRIPT > $TARGET'
  18. )
  19. env.CodeGenerate(
  20. target = 'util/u_format_srgb.c',
  21. script = 'util/u_format_srgb.py',
  22. source = [],
  23. command = python_cmd + ' $SCRIPT > $TARGET'
  24. )
  25. env.CodeGenerate(
  26. target = 'util/u_format_table.c',
  27. script = '#src/gallium/auxiliary/util/u_format_table.py',
  28. source = ['#src/gallium/auxiliary/util/u_format.csv'],
  29. command = python_cmd + ' $SCRIPT $SOURCE > $TARGET'
  30. )
  31. env.CodeGenerate(
  32. target = 'util/u_half.c',
  33. script = 'util/u_half.py',
  34. source = [],
  35. command = python_cmd + ' $SCRIPT > $TARGET'
  36. )
  37. env.Depends('util/u_format_table.c', [
  38. '#src/gallium/auxiliary/util/u_format_parse.py',
  39. 'util/u_format_pack.py',
  40. ])
  41. source = env.ParseSourceList('Makefile.sources', [
  42. 'C_SOURCES',
  43. 'GENERATED_SOURCES'
  44. ])
  45. if env['llvm']:
  46. source += env.ParseSourceList('Makefile.sources', [
  47. 'GALLIVM_SOURCES',
  48. 'GALLIVM_CPP_SOURCES'
  49. ])
  50. if env['toolchain'] == 'crossmingw':
  51. # compile lp_bld_misc.cpp without -gstabs option
  52. source = env.compile_without_gstabs(source, "gallivm/lp_bld_misc.cpp")
  53. gallium = env.ConvenienceLibrary(
  54. target = 'gallium',
  55. source = source,
  56. )
  57. env.Alias('gallium', gallium)
  58. Export('gallium')