Import('*')

env = env.Clone()

r600_sources = [
    'bof.c',
    'evergreen_hw_context.c',
    'radeon_bo.c',
    'radeon_pciid.c',
    'r600_bo.c',
    'r600_drm.c',
    'r600_hw_context.c',
    'r600_bomgr.c',
]

try:
    env.ParseConfig('pkg-config --cflags libdrm_radeon')
except OSError:
    print 'warning: not building r600g'
    Return()

env.Append(CPPPATH = '#/src/gallium/drivers/r600')

r600winsys = env.ConvenienceLibrary(
    target ='r600winsys',
    source = r600_sources,
)

Export('r600winsys')
