Import('*')

env = env.Clone()

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

env.Append(CPPPATH = [
    '#/include', 
    '#/src/mesa',
])

r600 = env.ConvenienceLibrary(
    target = 'r600',
    source = [
        'r600_buffer.c',
        'r600_context.c',
        'r600_draw.c',
        'r600_blit.c',
        'r600_helper.c',
        'r600_query.c',
        'r600_resource.c',
        'r600_screen.c',
        'r600_state.c',
        'r600_texture.c',
        'r600_shader.c',
        'r600_asm.c',
        'r700_asm.c',
    ])

Export('r600')
