Home | History | Annotate | Download | only in libgl-xlib
      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 ])
     14 
     15 env.Append(CPPDEFINES = ['USE_XSHM'])
     16 
     17 env.Prepend(LIBS = env['X11_LIBS'])
     18 
     19 # when GLES is enabled, gl* and _glapi_* belong to bridge_glapi and
     20 # shared_glapi respectively
     21 if env['gles']:
     22     env.Prepend(LIBPATH = [shared_glapi.dir])
     23     glapi = [bridge_glapi, 'glapi']
     24 
     25 env.Prepend(LIBS = [
     26     st_xlib,
     27     ws_xlib,
     28     glapi,
     29     mesa,
     30     glsl,
     31     gallium,
     32 ])
     33 
     34 sources = [
     35     'xlib.c',
     36 ]
     37 
     38 # The sources depend on the python-generated GL API files/headers.
     39 env.Depends(sources, glapi_headers)
     40 
     41 if True:
     42     env.Append(CPPDEFINES = ['GALLIUM_TRACE', 'GALLIUM_RBUG', 'GALLIUM_GALAHAD', 'GALLIUM_SOFTPIPE'])
     43     env.Prepend(LIBS = [trace, rbug, galahad, softpipe])
     44 
     45 if env['llvm']:
     46     env.Append(CPPDEFINES = ['GALLIUM_LLVMPIPE'])
     47     env.Prepend(LIBS = [llvmpipe])
     48 
     49 # libGL.so.1.5
     50 libgl_1_5 = env.SharedLibrary(
     51     target ='GL',
     52     source = sources,
     53     SHLIBSUFFIX = env['SHLIBSUFFIX'] + '.1.5',
     54 )
     55 
     56 # libGL.so.1
     57 libgl = env.subst('${SHLIBPREFIX}GL${SHLIBSUFFIX}')
     58 libgl_1 = libgl + '.1'
     59 env.Command(libgl_1, libgl_1_5, "ln -sf ${SOURCE.file} ${TARGET}")
     60 env.Command(libgl, libgl_1, "ln -sf ${SOURCE.file} ${TARGET}")
     61 
     62 env.Alias('libgl-xlib', libgl)
     63