Subversion Repositories Kolibri OS

Rev

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

  1. #######################################################################
  2. # SConscript for xlib winsys
  3.  
  4. Import('*')
  5.  
  6. env = env.Clone()
  7.  
  8. env.Append(CPPPATH = [
  9.     '#/src/mapi',
  10.     '#/src/mesa',
  11.     '#/src/mesa/main',
  12.     '#src/gallium/state_trackers/glx/xlib',
  13.     Dir('../../../mapi'), # src/mapi build path for python-generated GL API files/headers
  14. ])
  15.  
  16. env.Append(CPPDEFINES = ['USE_XSHM'])
  17.  
  18. env.Prepend(LIBS = env['X11_LIBS'])
  19. env.Prepend(LIBPATH = env['X11_LIBPATH'])
  20.  
  21. # when GLES is enabled, gl* and _glapi_* belong to bridge_glapi and
  22. # shared_glapi respectively
  23. if env['gles']:
  24.     env.Prepend(LIBPATH = [shared_glapi.dir])
  25.     glapi = [bridge_glapi, 'glapi']
  26.  
  27. env.Prepend(LIBS = [
  28.     st_xlib,
  29.     ws_xlib,
  30.     glapi,
  31.     mesa,
  32.     glsl,
  33.     gallium,
  34. ])
  35.  
  36. sources = [
  37.     'xlib.c',
  38. ]
  39.  
  40. if True:
  41.     env.Append(CPPDEFINES = ['GALLIUM_TRACE', 'GALLIUM_RBUG', 'GALLIUM_GALAHAD', 'GALLIUM_SOFTPIPE'])
  42.     env.Prepend(LIBS = [trace, rbug, galahad, softpipe])
  43.  
  44. if env['llvm']:
  45.     env.Append(CPPDEFINES = ['GALLIUM_LLVMPIPE'])
  46.     env.Prepend(LIBS = [llvmpipe])
  47.  
  48. # libGL.so.1.5
  49. libgl_1_5 = env.SharedLibrary(
  50.     target ='GL',
  51.     source = sources,
  52.     SHLIBSUFFIX = env['SHLIBSUFFIX'] + '.1.5',
  53. )
  54.  
  55. # libGL.so.1
  56. libgl = env.subst('${SHLIBPREFIX}GL${SHLIBSUFFIX}')
  57. libgl_1 = libgl + '.1'
  58. env.Command(libgl_1, libgl_1_5, "ln -sf ${SOURCE.file} ${TARGET}")
  59. env.Command(libgl, libgl_1, "ln -sf ${SOURCE.file} ${TARGET}")
  60.  
  61. env.Alias('libgl-xlib', libgl)
  62.