Import('env')
local = env.Clone()

programs = Split('''
    q1
    q2
    q3
    q4
    q5
    q6
    q7
    q7-adam
    q7-eric
    q7-fred
    q7-jonathan
    ''')



# FIXME: The makefile does not use occbuild and the source files do not use
# modules, hence we have to specify it here
local.Append(OCCBUILDFLAGS=['--skroc-opts=-l course'])
local.Append(INCPATH='.')



for e in programs:
    p = local.OccamProgram(e, [e + '.occ', e + '-1.tce'])
    local.OccLibDepend(p, ['forall', 'course'])

# Programs that require special flags
jonathan2_env = local.Clone()
p = jonathan2_env.OccamProgram('q7-jonathan2', 
        ['q7-jonathan2.occ', 'q7-jonathan2-1.tce'])
jonathan2_env.OccLibDepend(p, ['forall', 'course', 'shared_screen'])
jonathan2_env.Append(OCCBUILDFLAGS=['--skroc-opts=-l shared_screen'])

nick_env = local.Clone()
p = nick_env.OccamProgram('q7-nick',
        ['q7-nick.occ', 'q7-nick-1.tce', 'q7-nick-2.tce', 'q7-nick-3.tce',])
nick_env.OccLibDepend(p, ['forall', 'course', 'shared_screen'])
nick_env.Append(OCCBUILDFLAGS=['--skroc-opts=-l shared_screen'])

richard_env = local.Clone()
p = richard_env.OccamProgram('q7-richard',
        ['q7-richard.occ', 'q7-richard-1.tce', 'q7-richard-2.tce'])
richard_env.OccLibDepend(p, ['forall', 'course', 'shared_screen'])
