import os import os.path Import('*') if env['platform'] == 'linux': if env['dri']: env = env.Clone() sources = [ '#/src/mesa/drivers/dri/common/utils.c', '#/src/mesa/drivers/dri/common/vblank.c', '#/src/mesa/drivers/dri/common/dri_util.c', '#/src/mesa/drivers/dri/common/xmlconfig.c', ] env.ParseConfig('pkg-config --cflags --libs libdrm') env.Prepend(CPPPATH = [ '#/src/mesa/state_tracker', '#/src/mesa/drivers/dri/common', '#/src/mesa/main', '#/src/mesa/glapi', '#/src/mesa', '#/include', '#/src/gallium/drivers/svga', '#/src/gallium/drivers/svga/include', ]) env.Append(CPPDEFINES = [ 'HAVE_STDINT_H', 'HAVE_SYS_TYPES_H', ]) env.Append(CFLAGS = [ '-Werror', '-std=gnu99', '-D_FILE_OFFSET_BITS=64', ]) env.Prepend(LIBPATH = [ ]) env.Prepend(LIBS = [ trace, st_dri, svgadrm, svga, mesa, auxiliaries, ]) # TODO: write a wrapper function http://www.scons.org/wiki/WrapperFunctions env.LoadableModule( target ='vmwgfx_dri.so', source = sources, LIBS = env['LIBS'], SHLIBPREFIX = '', )