Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | RSS feed

  1. #######################################################################
  2. # SConscript for egl state_tracker
  3.  
  4. Import('*')
  5.  
  6. env = env.Clone()
  7.  
  8. env.Append(CPPPATH = [
  9.     '#/src/egl/main',
  10.     '#/src/gallium/winsys/sw',
  11.     '.',
  12. ])
  13.  
  14. sources = [
  15.     'common/egl_g3d.c',
  16.     'common/egl_g3d_api.c',
  17.     'common/egl_g3d_image.c',
  18.     'common/egl_g3d_st.c',
  19.     'common/egl_g3d_sync.c',
  20.     'common/native_helper.c',
  21. ]
  22.  
  23. if env['platform'] == 'windows':
  24.     env.Append(CPPDEFINES = ['HAVE_GDI_BACKEND'])
  25.     sources.append('gdi/native_gdi.c')
  26. else:
  27.     if env['drm']:
  28.         env.PkgUseModules('DRM')
  29.     if env['x11']:
  30.         env.Append(CPPDEFINES = ['HAVE_X11_BACKEND'])
  31.         env.Prepend(CPPPATH = [
  32.             '#/src/glx',
  33.             '#/src/mapi',
  34.         ])
  35.         sources.append([
  36.             'x11/native_x11.c',
  37.             'x11/native_dri2.c',
  38.             'x11/native_ximage.c',
  39.             'x11/glxinit.c'])
  40.         if env['drm']:
  41.             env.Append(CPPDEFINES = ['GLX_DIRECT_RENDERING'])
  42.             sources.append([
  43.                     '#/src/glx/dri2.c',
  44.                     'x11/x11_screen.c',
  45.                     ])
  46.     if env['drm'] and False:
  47.         # XXX: Disabled as it depends on gbm, which is not yet built with scons
  48.         env.Append(CPPDEFINES = ['HAVE_DRM_BACKEND'])
  49.         env.Append(CPPPATH = [
  50.             '#/src/gbm/main',
  51.             '#/src/gallium/state_trackers/gbm',
  52.         ])
  53.         sources.append(['drm/native_drm.c', 'drm/modeset.c'])
  54.  
  55. st_egl = env.ConvenienceLibrary(
  56.     target = 'st_egl',
  57.     source = sources,
  58. )
  59. Export('st_egl')
  60.