from __future__ import division, print_function, unicode_literals

import os

Import('env') # inherit from parent

mlib = env['RAD_MLIB']

# standard targets
PROGS = (
# name     sources             libs
('icalc',  Split('calc.c'),    ['rtrad'] + mlib),
('ev',     Split('ev.c'),      ['rtrad'] + mlib),
('rcalc',  Split('rcalc.c'),   ['rtrad'] + mlib),
('total',  Split('total.c'),   ['rtrad'] + mlib),
('cnt',    Split('cnt.c'),     []),
('neaten', Split('neat.c'),    []),
('rlam',   Split('lam.c'),     ['rtrad']),
('tabfunc',Split('tabfunc.c'), ['rtrad'] + mlib),
('histo',  Split('histo.c'),   mlib),
)
for p in PROGS:
    prog = env.Program(target=os.path.join(env['RAD_BUILDBIN'], p[0]),
			source=p[1], LIBS=p[2])
    Default(prog)
    env.Append(RAD_BININSTALL=[env.Install(env['RAD_BINDIR'], prog)])

# vim: set syntax=python:
# vi: set ts=4 sw=4 :
