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.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. import common
  2. Import('*')
  3. env = env.Clone()
  4. sources = [
  5. 'pp/sl_pp_context.c',
  6. 'pp/sl_pp_define.c',
  7. 'pp/sl_pp_dict.c',
  8. 'pp/sl_pp_error.c',
  9. 'pp/sl_pp_expression.c',
  10. 'pp/sl_pp_extension.c',
  11. 'pp/sl_pp_if.c',
  12. 'pp/sl_pp_line.c',
  13. 'pp/sl_pp_macro.c',
  14. 'pp/sl_pp_pragma.c',
  15. 'pp/sl_pp_process.c',
  16. 'pp/sl_pp_purify.c',
  17. 'pp/sl_pp_token.c',
  18. 'pp/sl_pp_token_util.c',
  19. 'pp/sl_pp_version.c',
  20. 'cl/sl_cl_parse.c',
  21. ]
  22. glsl = env.ConvenienceLibrary(
  23. target = 'glsl',
  24. source = sources,
  25. )
  26. Export('glsl')
  27. env = env.Clone()
  28. if env['platform'] == 'windows':
  29. env.PrependUnique(LIBS = [
  30. 'user32',
  31. ])
  32. env.Prepend(LIBS = [glsl])
  33. env.Program(
  34. target = 'purify',
  35. source = ['apps/purify.c'],
  36. )
  37. env.Program(
  38. target = 'tokenise',
  39. source = ['apps/tokenise.c'],
  40. )
  41. env.Program(
  42. target = 'version',
  43. source = ['apps/version.c'],
  44. )
  45. env.Program(
  46. target = 'process',
  47. source = ['apps/process.c'],
  48. )
  49. glsl_compile = env.Program(
  50. target = 'compile',
  51. source = ['apps/compile.c'],
  52. )
  53. if env['platform'] == common.default_platform:
  54. # Only export the GLSL compiler when building for the host platform
  55. Export('glsl_compile')