Import('*')

env = env.Clone()

env.PkgUseModules('DRM')

if env['gcc'] or env['clang'] or env['icc']:
    env.Append(CCFLAGS = ['-fvisibility=hidden'])
    env.Append(CPPDEFINES = [
        'HAVE_STDINT_H', 
        'HAVE_SYS_TYPES_H',
        '-D_FILE_OFFSET_BITS=64',
    ])
    
env.Prepend(CPPPATH = [
    'include',
    '#/src/gallium/drivers/svga',
    '#/src/gallium/drivers/svga/include',
])

env.Append(CPPDEFINES = [
])

sources = env.ParseSourceList('Makefile.sources', 'C_SOURCES')

svgadrm = env.ConvenienceLibrary(
    target = 'svgadrm',
    source = sources,
)

Export('svgadrm')