ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/cv/SConscript
Revision: 1.16
Committed: Mon Jan 8 13:38:37 2018 UTC (6 years, 10 months ago) by schorsch
Branch: MAIN
CVS Tags: rad5R4, rad5R2, rad5R3, HEAD
Changes since 1.15: +4 -1 lines
Log Message:
Updating to SCons 3.x, adding support for Python 3

File Contents

# Content
1 from __future__ import division, print_function, unicode_literals
2
3 import os
4
5 Import ('env')
6
7 # math libs
8 mlib = env['RAD_MLIB']
9
10 # compose paths
11 def rbin(name): return os.path.join(env['RAD_BUILDBIN'], name)
12
13 trans = env.Object(source="trans.c")
14 bsdfrep = env.Object(source="bsdfrep.c")
15 bsdfinterp = env.Object(source="bsdfinterp.c")
16
17 # standard targets
18 PROGS = [
19 ('3ds2mgf', Split('3ds2mgf.c rayopt3ds.c vect3ds.c'), ['mgf','rtrad'] + mlib),
20 ('ies2rad', ['ies2rad.c'], ['rtrad'] + mlib),
21 #('arch2rad', ['arch2rad.c',trans],['rtrad'] + mlib),
22 ('nff2rad', ['nff2rad.c'], []),
23 ('lampcolor', ['lampcolor.c'], ['rtrad'] ),
24 ('tmesh2rad', ['tmesh2rad.c'], ['rtrad'] + mlib),
25 ('obj2rad', ['obj2rad.c',trans], ['rtrad'] + mlib),
26 ('mgf2rad', ['mgf2rad.c'], ['mgf','rtrad'] + mlib),
27 ('rad2mgf', ['rad2mgf.c'], ['rtrad'] + mlib),
28 ('mgfilt', ['mgfilt.c'], ['mgf','rtrad'] + mlib),
29 ('mgf2inv', ['mgf2inv.c'], ['mgf','rtrad'] + mlib),
30 ('pabopto2bsdf',
31 ['pabopto2bsdf.c',bsdfrep,'bsdfrbf.c', 'bsdfmesh.c', 'bsdftrans.cpp',],
32 ['rtrad'] + mlib),
33 ('bsdf2klems',['bsdf2klems.c', bsdfrep, bsdfinterp,], ['rtrad'] + mlib),
34 ('bsdf2ttree',['bsdf2ttree.c', bsdfrep, bsdfinterp,], ['rtrad'] + mlib),
35 ('pkgBSDF', ['pkgBSDF.c', ], ['rtrad'] + mlib),
36 ('epw2wea', ['epw2wea.c', ], ['rtrad'] + mlib),
37 ('mgf2meta', ['mgf2meta.c'], ['meta', 'mgf','rtrad'] + mlib,
38 [os.path.join('#src','meta')]),
39 ]
40 for p in PROGS:
41 if len(p) == 4: inclp = env.get('CPPPATH', []) + [os.path.join('#src','meta')],
42 else: inclp = env.get('CPPPATH', [])
43 prog = env.Program(target=rbin(p[0]), source=p[1], LIBS=p[2], CPPPATH=inclp)
44 Default(prog)
45 env.Append(RAD_BININSTALL=[env.Install(env['RAD_BINDIR'], prog)])
46
47 LIBFILES = Split('bsdf2rad.cal source.cal tilt.cal window.cal')
48 env.Append(RAD_RLIBINSTALL=env.Install(env['RAD_RLIBDIR'], LIBFILES))
49
50 if os.name == 'posix':
51 for s in Split('''optics2rad'''):
52 Default(env.InstallScript(rbin(s), s + '.csh'))
53
54 # vim: set syntax=python:
55 # vi: set ts=4 sw=4 :