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

File Contents

# User Rev Content
1 schorsch 1.19 from __future__ import division, print_function, unicode_literals
2    
3 greg 1.14 import os
4    
5     Import('env') # inherit from parent
6    
7     # math libs
8     mlib = env['RAD_MLIB']
9    
10     #Make sure sun.c is compiled only once
11     sun = env.Object(source="sun.c")
12    
13     # standard targets
14     PROGS = (
15     # name sources libs
16 schorsch 1.18 ('gendaylit', Split('gendaylit.c',)+[sun], ['rtrad']),
17     ('gendaymtx', Split('gendaymtx.c',)+[sun], ['rtrad',mlib]),
18 greg 1.14 ('genbeads', Split('genbeads.c hermite3.c'), []),
19     ('genbox', ['genbox.c',], []),
20     ('genmarble', ['genmarble.c',], []),
21     ('gensky', Split('gensky.c',)+[sun], []),
22     ('genblinds', ['genblinds.c',], []),
23     ('genprism', ['genprism.c',], []),
24 schorsch 1.18 ('genrev', ['genrev.c',], ['rtrad',]),
25 greg 1.14 ('gencatenary', ['gencat.c',], []),
26 schorsch 1.18 ('genworm', ['genworm.c',], ['rtrad']),
27     ('gensurf', ['gensurf.c',], ['rtrad']),
28 greg 1.14 ('genclock', ['genclock.c',], []),
29     ('genbranch', ['genbranch.c',], []),
30 schorsch 1.18 ('replmarks', ['replmarks.c',], ['rtrad']),
31     ('xform', ['xform.c',], ['rtrad']),
32 greg 1.14 )
33     progs = []
34     for p in PROGS:
35     prog = env.Program(target=os.path.join('$RAD_BUILDBIN', p[0]),
36     source=p[1], LIBS=p[2] + mlib)
37     progs.append(prog)
38    
39     prog = env.Program(target=os.path.join('$RAD_BUILDBIN', 'mkillum'),
40     source=Split('mkillum.c mkillum2.c mkillum3.c'),
41     CPPPATH=env.get('CPPPATH', []) + ['#src/rt'],
42 schorsch 1.18 LIBS=['raycalls','rttrace','rtrad'] + mlib)
43 greg 1.14 progs.append(prog)
44     prog = env.Program(target=os.path.join('$RAD_BUILDBIN', 'mksource'),
45     source=['mksource.c'],
46     CPPPATH=env.get('CPPPATH', []) + ['#src/rt'],
47 schorsch 1.18 LIBS=['raycalls','rttrace','rtrad'] + mlib)
48 greg 1.14 progs.append(prog)
49    
50     if os.name == 'posix':
51 schorsch 1.19 Default(env.InstallScript(os.path.join('$RAD_BUILDBIN', 'glaze.csh'),
52     'glaze.csh'))
53     Default(env.InstallScript(os.path.join('$RAD_BUILDBIN', 'glaze'),
54     'glaze.py'))
55     else:
56     Default(env.InstallScript(os.path.join('$RAD_BUILDBIN', 'glaze.py'),
57     'glaze.py'))
58 greg 1.14
59     Default('#src/gen')
60     env.Install('$RAD_BINDIR', progs)
61    
62     #surf.cal clockface.hex
63 schorsch 1.16 LIBFILES = Split('''illum.cal rev.cal skybright.cal glaze1.cal glaze2.cal
64 schorsch 1.17 perezlum.cal''')
65 greg 1.14 env.Append(RAD_RLIBINSTALL=env.Install('$RAD_RLIBDIR', LIBFILES))
66    
67 schorsch 1.16 # vim: set syntax=python:
68 schorsch 1.19 # vi: set ts=4 sw=4 :