ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/util/SConscript
Revision: 1.19
Committed: Sat Mar 5 00:29:28 2016 UTC (8 years ago) by schorsch
Branch: MAIN
Changes since 1.18: +5 -8 lines
Log Message:
update SCons

File Contents

# User Rev Content
1 schorsch 1.1 import os
2    
3     Import('env') # inherit from parent
4    
5 schorsch 1.7 mlib = ['$RAD_MLIB']
6     progs = []
7 schorsch 1.1
8     # compose paths
9 schorsch 1.7 def radbin(name): return os.path.join('$RAD_BUILDBIN', name)
10     def radlib(name): return os.path.join('$RAD_BUILDLIB', name)
11 schorsch 1.1
12 schorsch 1.15 Version = env.Object(source='#src/rt/Version.c')
13 schorsch 1.2
14 schorsch 1.1 # standard targets
15     PROGS = [
16 schorsch 1.10 ('findglare', Split('findglare.c glareval.c glaresrc.c setscan.c'),
17 schorsch 1.2 ['rtpic','rtargs','rtio','rtproc','rtmath','rtpath','rtmem','rterror']),
18 schorsch 1.14 ('glarendx', Split('glarendx.c'), ['rtpic','rtargs','rtio','rtmath']),
19     ('vwright', Split('vwright.c'), ['rtpic','rtargs','rtio','rtmath']),
20     ('vwrays', Split('vwrays.c'), ['rtpic','rtargs','rtio','rtmath']),
21 schorsch 1.2 ('rad', Split('rad.c'),
22 schorsch 1.14 ['rtpic','rtproc','rtpath','rtmath','rtargs','rtio','rtcont','rtmem','rterror']),
23 schorsch 1.5 ('rpiece', Split('rpiece.c') + [Version],
24 schorsch 1.2 ['rtpic','rtargs','rtio','rtproc','rtmath','rtpath','rtmem']),
25 schorsch 1.12 ('ranimate', ['ranimate.c', '$RAD_NETCOMPAT'],
26     ['rtpic','rtargs','rtio','rtproc','rtcont','rtmem','rtpath','rtmath',
27     'rtnet','rterror','$RAD_SOCKETLIB']),
28 schorsch 1.19 ('dctimestep', Split('dctimestep.c cmbsdf.c cmatrix.c'),
29 greg 1.18 ['rtall'])
30 schorsch 1.1 ]
31 schorsch 1.12
32 schorsch 1.1 for p in PROGS:
33 schorsch 1.2 prog = env.Program(target=radbin(p[0]), source=p[1], LIBS=p[2]+mlib)
34 schorsch 1.7 progs.append(prog)
35 schorsch 1.1
36 schorsch 1.14 #if os.name != 'nt': # XXX pending Windows version of raypcalls.c
37     if True: # experimental raypwin.c
38 schorsch 1.1 # targets with different includes/libs
39     rs = Split('ranimove.c ranimove1.c ranimove2.c')
40 schorsch 1.2 ranimove = env.Program(target=radbin('ranimove'), source=rs,
41     CPPPATH=env.get('CPPPATH', [])+ ['#src/rt'],
42 schorsch 1.14 LIBS=['raycalls','rttrace','rtscene','rtpic','rtfunc','rtmath',
43 schorsch 1.19 'rtnet','rtcont','rtmem','rtargs','rtio','rtproc','rtpath','rterror']
44 schorsch 1.14 + mlib)
45 schorsch 1.7 progs.append(ranimove)
46 schorsch 1.14 rsensor = env.Program(target=radbin('rsensor'), source='rsensor.c',
47     CPPPATH=env.get('CPPPATH', [])+ ['#src/rt'],
48     LIBS=['raycalls','rttrace','rtscene','rtpic','rtfunc','rtmath',
49     'rtcont','rtmem','rtargs','rtio','rtpath','rterror','rtproc',
50 schorsch 1.19 'rtnet','rtlamps'] + mlib)
51 schorsch 1.14 progs.append(rsensor)
52 schorsch 1.1
53 schorsch 1.2 getinfo = env.Program(target=radbin('getinfo'), source='getinfo.c',
54     LIBS=['rtio'])
55 schorsch 1.7 progs.append(getinfo)
56 schorsch 1.1
57    
58     # X11 targets
59 schorsch 1.2 if env.has_key('X11LIB'):
60 schorsch 1.7 xincl = env.get('CPPPATH', []) + ['$X11INCLUDE']
61     xlibp = env.get('LIBPATH', []) + ['$X11LIB']
62 schorsch 1.2 xglaresrc = env.Program(target=radbin('xglaresrc'),
63 schorsch 1.16 source=Split('xglaresrc.c') + [env.x11findwind], # XXX remote magic
64 schorsch 1.2 LIBPATH=xlibp, CPPPATH=xincl,
65     LIBS=['rtpic','rtmath','rtargs','rtio','X11']+ mlib)
66 schorsch 1.7 progs.append(xglaresrc)
67 schorsch 1.2
68     # OpenGL targets that also depend on X11
69     if env.has_key('OGL'):
70     glrad = env.Program(target=radbin('glrad'), source=Split('glrad.c'),
71 schorsch 1.7 CPPFLAGS=env.get('CPPFLAGS', []) + ['$RAD_STEREO'],
72 schorsch 1.2 LIBPATH=xlibp, CPPPATH=xincl,
73 schorsch 1.14 LIBS=['rgl','rtpic','rtscene','rtproc','rtpath','rtargs','rtio',
74 schorsch 1.16 'rtmath','rtcont','rtmem','rterror','rtdummy',
75 schorsch 1.19 'GL', 'GLU','X11'] + mlib,)
76 schorsch 1.7 progs.append(glrad)
77 schorsch 1.1
78 schorsch 1.7 if os.name == 'posix': # XXX ignoring trad.wsh
79 schorsch 1.13 for s in Split('''objview objline objpict glare dayfact
80     debugcal rlux raddepend compamb vinfo genambpos fieldcomb'''):
81 schorsch 1.19 Default(env.InstallScript(radbin(s), s + '.csh'))
82 schorsch 1.8 # Those don't really work yet
83     #else:
84     # for s in Split('''objview glare rlux '''):
85     # prog = env.Program(target=radbin(s), source=s+'.c')
86     # progs.append(prog)
87 schorsch 1.7
88     Default('#src/util')
89     env.Install('$RAD_BINDIR', progs)
90 schorsch 1.1