Import('*')

env = env.Clone()
env.Append(CPPPATH = '#/include')
env.Append(CPPPATH = '#/src/mesa')

# temporary fix
env['CFLAGS'] = str(env['CFLAGS']).replace('-Werror=declaration-after-statement', '')

r300compiler = env.ConvenienceLibrary(
    target = 'r300compiler',
    source = [
        'radeon_code.c',
        'radeon_compiler.c',
        'radeon_compiler_util.c',
        'radeon_program.c',
        'radeon_program_print.c',
        'radeon_opcodes.c',
        'radeon_program_alu.c',
        'radeon_program_pair.c',
        'radeon_program_tex.c',
        'radeon_pair_translate.c',
        'radeon_pair_schedule.c',
        'radeon_pair_regalloc.c',
        'radeon_optimize.c',
        'radeon_remove_constants.c',
        'radeon_rename_regs.c',
        'radeon_emulate_branches.c',
        'radeon_emulate_loops.c',
        'radeon_dataflow.c',
        'radeon_dataflow_deadcode.c',
        'radeon_dataflow_swizzles.c',
        'r3xx_fragprog.c',
        'r300_fragprog.c',
        'r300_fragprog_swizzle.c',
        'r300_fragprog_emit.c',
        'r500_fragprog.c',
        'r500_fragprog_emit.c',
        'r3xx_vertprog.c',
        'r3xx_vertprog_dump.c',
        'memory_pool.c',
    ])

Return('r300compiler')
