1 |
import os |
2 |
|
3 |
Import ('env') |
4 |
|
5 |
# math libs |
6 |
mlib = env['RAD_MLIB'] |
7 |
|
8 |
# compose paths |
9 |
def rbin(name): return os.path.join(env['RAD_BUILDBIN'], name) |
10 |
|
11 |
MGFPROGS = ( |
12 |
('3ds2mgf', Split('3ds2mgf.c rayopt3ds.c vect3ds.c')), |
13 |
) |
14 |
for p in MGFPROGS: |
15 |
prog = env.Program(target=rbin(p[0]), source=p[1], LIBS=mlib+['mgf','rtcont']) |
16 |
Default(prog) |
17 |
env.Append(RAD_BININSTALL=[env.Install(env['RAD_BINDIR'], prog)]) |
18 |
|
19 |
trans = env.Object(source="trans.c") |
20 |
|
21 |
# standard targets |
22 |
PROGS = [ |
23 |
('ies2rad', ['ies2rad.c'], ['rtlamps','rtcolor','rtio','rtpath']+ mlib), |
24 |
('arch2rad', ['arch2rad.c',trans],['rtcont','rtmem'] + mlib), |
25 |
('nff2rad', ['nff2rad.c'], []), |
26 |
('lampcolor', ['lampcolor.c'], ['rtlamps','rtcolor','rtio','rtpath']), |
27 |
('tmesh2rad', ['tmesh2rad.c'], ['rtscene','rtmath'] + mlib), |
28 |
('mgf2inv', ['mgf2inv.c'], ['mgf','rtall'] + mlib), |
29 |
('obj2rad', ['obj2rad.c',trans], |
30 |
['rtscene','rtargs','rtio','rtcont','rtmem','rtmath','rterror'] + mlib), |
31 |
('mgf2rad', ['mgf2rad.c'], ['mgf','rtall'] + mlib), |
32 |
('mgfilt', ['mgfilt.c'], ['mgf','rtall'] + mlib), |
33 |
('rad2mgf', ['rad2mgf.c'], |
34 |
['rtproc', 'rtpath', # for win_popen() |
35 |
'rtscene','rtio','rtcolor','rtcont','rtmem','rterror'] + mlib), |
36 |
] |
37 |
for p in PROGS: |
38 |
prog = env.Program(target=rbin(p[0]), source=p[1], LIBS=p[2]) |
39 |
Default(prog) |
40 |
env.Append(RAD_BININSTALL=[env.Install(env['RAD_BINDIR'], prog)]) |
41 |
|
42 |
# meta targets |
43 |
prog = env.Program(target=rbin('mgf2meta'), source=['mgf2meta.c'], |
44 |
CPPPATH=env.get('CPPPATH', []) + [os.path.join('#src','meta')], |
45 |
LIBS=['meta','mgf','rtall'] + mlib) |
46 |
env.Append(RAD_BININSTALL=[env.Install(env['RAD_BINDIR'], prog)]) |
47 |
|
48 |
LIBFILES = Split('source.cal tilt.cal window.cal') |
49 |
env.Append(RAD_RLIBINSTALL=env.Install(env['RAD_RLIBDIR'], LIBFILES)) |
50 |
|
51 |
if os.name == 'posix': |
52 |
for s in Split('''optics2rad'''): |
53 |
Default(env.InstallCsh(rbin(s), s + '.csh')) |