Import('env')

vec_programs = ['mandelbrot-bench-gpu', 'mandelbrot-cpu', 'mandelbrot-gpu']
c_programs = ['mandelbrot-bench-cpu']
headers = ['libvector', 'vector_utils', 'vector_array', 'vector_iter']

for prog in vec_programs:
    env.CudaGen(prog + '.cu', [prog + '.vec'])
    env.CudaObject(prog + '.o', [prog + '.cu'] +
        ['../rtlib/' + h + '.hpp' for h in headers])
    env.Program(prog, prog + '.o')

for prog in c_programs:
    env.Object(prog + '.o', prog + '.c')
    env.Program(prog, prog + '.o')
