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 2.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. #######################################################################
  2. # SConscript for egl-static target
  3. Import('*')
  4. env = env.Clone()
  5. env.Append(CPPPATH = [
  6. '#/include',
  7. '#/src/egl/main',
  8. '#/src/gallium/auxiliary',
  9. '#/src/gallium/drivers',
  10. '#/src/gallium/include',
  11. '#/src/gallium/winsys',
  12. '#/src/gallium/state_trackers/egl',
  13. '#/src/gallium/state_trackers/vega',
  14. '#/src/mesa',
  15. ])
  16. env.Append(CPPDEFINES = [
  17. 'GALLIUM_SOFTPIPE',
  18. 'GALLIUM_RBUG',
  19. 'GALLIUM_TRACE',
  20. 'GALLIUM_GALAHAD',
  21. '_EGL_MAIN=_eglBuiltInDriverGALLIUM',
  22. ])
  23. env.Prepend(LIBS = [
  24. softpipe,
  25. rbug,
  26. trace,
  27. galahad,
  28. gallium,
  29. egl,
  30. st_egl,
  31. ])
  32. if env['llvm']:
  33. env.Append(CPPDEFINES = ['GALLIUM_LLVMPIPE'])
  34. env.Prepend(LIBS = [llvmpipe])
  35. sources = [
  36. 'egl.c',
  37. 'egl_pipe.c',
  38. 'egl_st.c',
  39. ]
  40. if env['platform'] == 'windows':
  41. sources.append('#src/egl/main/egl.def')
  42. env.Append(LIBS = [
  43. 'gdi32',
  44. 'user32',
  45. 'kernel32',
  46. 'ws2_32',
  47. ])
  48. env.Prepend(LIBS = [
  49. ws_gdi,
  50. ])
  51. # OpenGL ES and OpenGL
  52. if env['gles']:
  53. env.Append(CPPDEFINES = [
  54. 'FEATURE_GL=1',
  55. 'FEATURE_ES1=1',
  56. 'FEATURE_ES2=1'
  57. ])
  58. env.Prepend(LIBPATH = [shared_glapi.dir])
  59. # manually add LIBPREFIX on windows
  60. glapi_name = 'glapi' if env['platform'] != 'windows' else 'libglapi'
  61. env.Prepend(LIBS = [glapi_name, talloc, glsl, mesa])
  62. # OpenVG
  63. if True:
  64. env.Append(CPPDEFINES = ['FEATURE_VG=1'])
  65. env.Prepend(LIBPATH = [openvg.dir])
  66. # manually add LIBPREFIX on windows
  67. openvg_name = 'OpenVG' if env['platform'] != 'windows' else 'libOpenVG'
  68. env.Prepend(LIBS = [openvg_name, st_vega])
  69. if env['x11']:
  70. env.Prepend(LIBS = [
  71. ws_xlib,
  72. env['X11_LIBS'],
  73. ])
  74. if env['dri']:
  75. env.ParseConfig('pkg-config --cflags --libs xfixes')
  76. # pipe drivers
  77. if env['drm']:
  78. env.ParseConfig('pkg-config --cflags --libs libdrm')
  79. if env['drm_intel']:
  80. env.ParseConfig('pkg-config --cflags --libs libdrm_intel')
  81. env.Append(CPPDEFINES = ['_EGL_PIPE_I915', '_EGL_PIPE_I965'])
  82. env.Prepend(LIBS = [
  83. i915drm,
  84. i915,
  85. i965drm,
  86. i965,
  87. ws_wrapper,
  88. ])
  89. if env['drm_radeon']:
  90. env.ParseConfig('pkg-config --cflags --libs libdrm_radeon')
  91. env.Append(CPPDEFINES = ['_EGL_PIPE_R300', '_EGL_PIPE_R600'])
  92. env.Prepend(LIBS = [
  93. radeonwinsys,
  94. r300,
  95. r600winsys,
  96. r600,
  97. ])
  98. env.Append(CPPDEFINES = ['_EGL_PIPE_VMWGFX'])
  99. env.Prepend(LIBS = [
  100. svgadrm,
  101. svga,
  102. ])
  103. # libEGL.dll
  104. env['LIBPREFIX'] = 'lib'
  105. env['SHLIBPREFIX'] = 'lib'
  106. egl_gallium = env.SharedLibrary(
  107. target ='EGL',
  108. source = sources,
  109. )
  110. env.Depends(egl_gallium, [openvg])
  111. egl_gallium = env.InstallSharedLibrary(egl_gallium, version=(1, 4, 0))
  112. env.Alias('egl-gallium', egl_gallium)