8 |
|
# compose paths |
9 |
|
def radbin(name): return os.path.join('$RAD_BUILDBIN', name) |
10 |
|
def radlib(name): return os.path.join('$RAD_BUILDLIB', name) |
11 |
+ |
def tclscr(name): return os.path.join('$RAD_BUILDRLIB', 'tcl', name) |
12 |
|
|
13 |
< |
Version = env.Object(source='../rt/Version.c') # XXX ../rt/not_nice |
13 |
> |
cmatrix = env.Object(source='cmatrix.c') |
14 |
> |
cmbsdf = env.Object(source='cmbsdf.c') |
15 |
|
|
16 |
|
# standard targets |
17 |
|
PROGS = [ |
18 |
|
('findglare', Split('findglare.c glareval.c glaresrc.c setscan.c'), |
19 |
|
['rtpic','rtargs','rtio','rtproc','rtmath','rtpath','rtmem','rterror']), |
20 |
< |
('glarendx', Split('glarendx.c'), ['rtpic','rtio','rtargs','rtmath']), |
21 |
< |
('vwright', Split('vwright.c'), ['rtpic','rtio','rtargs','rtmath']), |
22 |
< |
('vwrays', Split('vwrays.c'), ['rtpic','rtio','rtargs','rtmath']), |
20 |
> |
('glarendx', Split('glarendx.c'), ['rtpic','rtargs','rtio','rtmath']), |
21 |
> |
('vwright', Split('vwright.c'), ['rtpic','rtargs','rtio','rtmath']), |
22 |
> |
('vwrays', Split('vwrays.c'), ['rtpic','rtargs','rtio','rtmath']), |
23 |
|
('rad', Split('rad.c'), |
24 |
< |
['rtpic','rtproc','rtpath','rtio','rtmath','rtargs','rtcont','rtmem','rterror']), |
25 |
< |
('rpiece', Split('rpiece.c') + [Version], |
24 |
> |
['rtpic','rtproc','rtpath','rtmath','rtargs','rtio','rtcont','rtmem','rterror']), |
25 |
> |
('rpiece', Split('rpiece.c') + [env.version], # remote magic |
26 |
|
['rtpic','rtargs','rtio','rtproc','rtmath','rtpath','rtmem']), |
27 |
+ |
('ranimate', ['ranimate.c', '$RAD_NETCOMPAT'], |
28 |
+ |
['rtpic','rtargs','rtio','rtproc','rtcont','rtmem','rtpath','rtmath', |
29 |
+ |
'rtnet','rterror','$RAD_SOCKETLIB']), |
30 |
+ |
('dctimestep', Split('dctimestep.c')+[cmatrix, cmbsdf], ['rtall']), |
31 |
+ |
('rttree_reduce', Split('rttree_reduce.c'), ['rtall']), |
32 |
+ |
('rcollate', Split('rcollate.c'), ['rtall']), |
33 |
+ |
('eplus_adduvf', Split('eplus_adduvf.c eplus_idf.c'), ['rtall']), |
34 |
+ |
('rfluxmtx', Split('rfluxmtx.c'), ['rtall']), |
35 |
+ |
('rmtxop', Split('rmtxop.c rmatrix.c')+[cmatrix, cmbsdf], ['rtall']), |
36 |
+ |
('wrapBSDF', Split('wrapBSDF.c'), ['rtall']), |
37 |
+ |
('evalglare', Split('evalglare.c pictool.c'), ['rtall', 'reetz']), |
38 |
|
] |
26 |
– |
if os.name == 'nt': # XXX should be set in a *.cfg file |
27 |
– |
netproc = 'win_netproc.c' |
28 |
– |
netlib = ['ws2_32'] |
29 |
– |
else: |
30 |
– |
netproc = 'netproc.c' |
31 |
– |
netlib = [] |
39 |
|
|
33 |
– |
PROGS.append(('ranimate', ['ranimate.c', netproc], |
34 |
– |
['rtpic','rtargs','rtio','rtcont','rtmem','rtpath','rtmath', |
35 |
– |
'rtnet','$RAD_SOCKETLIB','rterror'] + netlib)) |
40 |
|
for p in PROGS: |
41 |
|
prog = env.Program(target=radbin(p[0]), source=p[1], LIBS=p[2]+mlib) |
42 |
|
progs.append(prog) |
43 |
|
|
44 |
< |
if os.name != 'nt': # XXX pending Windows version of raypcalls.c |
45 |
< |
# targets with different includes/libs |
46 |
< |
rs = Split('ranimove.c ranimove1.c ranimove2.c') |
47 |
< |
ranimove = env.Program(target=radbin('ranimove'), source=rs, |
48 |
< |
CPPPATH=env.get('CPPPATH', [])+ ['#src/rt'], |
49 |
< |
LIBS=['raycalls','rttrace','rtscene','rtpic','rtfunc','rtio', |
50 |
< |
'rtmath','rtcont','rtmem','rtargs','rtproc','rtpath','rterror'] + mlib) |
51 |
< |
progs.append(ranimove) |
44 |
> |
# targets with different includes/libs |
45 |
> |
rs = Split('ranimove.c ranimove1.c ranimove2.c') |
46 |
> |
ranimove = env.Program(target=radbin('ranimove'), source=rs, |
47 |
> |
CPPPATH=env.get('CPPPATH', [])+ ['#src/rt'], |
48 |
> |
LIBS=['raycalls','rttrace','rtscene','rtpic','rtfunc','rtmath', |
49 |
> |
'rtnet','rtcont','rtmem','rtargs','rtio','rtproc','rtpath','rterror'] |
50 |
> |
+ mlib) |
51 |
> |
progs.append(ranimove) |
52 |
> |
rsensor = env.Program(target=radbin('rsensor'), source='rsensor.c', |
53 |
> |
CPPPATH=env.get('CPPPATH', [])+ ['#src/rt'], |
54 |
> |
LIBS=['raycalls','rttrace','rtscene','rtpic','rtfunc','rtmath', |
55 |
> |
'rtcont','rtmem','rtargs','rtio','rtpath','rterror','rtproc', |
56 |
> |
'rtnet','rtlamps'] + mlib) |
57 |
> |
progs.append(rsensor) |
58 |
|
|
59 |
|
getinfo = env.Program(target=radbin('getinfo'), source='getinfo.c', |
60 |
|
LIBS=['rtio']) |
65 |
|
if env.has_key('X11LIB'): |
66 |
|
xincl = env.get('CPPPATH', []) + ['$X11INCLUDE'] |
67 |
|
xlibp = env.get('LIBPATH', []) + ['$X11LIB'] |
58 |
– |
x11findwind = env.Object(source='../common/x11findwind.c', # XXX ../not/nice |
59 |
– |
CPPPATH=xincl) |
68 |
|
xglaresrc = env.Program(target=radbin('xglaresrc'), |
69 |
< |
source=Split('xglaresrc.c') + [x11findwind], |
69 |
> |
source=Split('xglaresrc.c') + [env.x11findwind], # XXX remote magic |
70 |
|
LIBPATH=xlibp, CPPPATH=xincl, |
71 |
|
LIBS=['rtpic','rtmath','rtargs','rtio','X11']+ mlib) |
72 |
|
progs.append(xglaresrc) |
76 |
|
glrad = env.Program(target=radbin('glrad'), source=Split('glrad.c'), |
77 |
|
CPPFLAGS=env.get('CPPFLAGS', []) + ['$RAD_STEREO'], |
78 |
|
LIBPATH=xlibp, CPPPATH=xincl, |
79 |
< |
LIBS=['rgl','rtpic','rtscene','rtio','rtproc','rtpath','rtargs', |
80 |
< |
'rtmath','rtcont','rtmem','rterror', |
81 |
< |
'GL', 'GLU','X11'],) |
79 |
> |
LIBS=['rgl','rtpic','rtscene','rtproc','rtpath','rtargs','rtio', |
80 |
> |
'rtmath','rtcont','rtmem','rterror','rtdummy', |
81 |
> |
'GL', 'GLU','X11'] + mlib,) |
82 |
|
progs.append(glrad) |
83 |
|
|
84 |
|
if os.name == 'posix': # XXX ignoring trad.wsh |
85 |
< |
for s in Split('''objview objline objpict |
86 |
< |
glare dayfact debugcal rlux raddepend compamb vinfo genambpos'''): |
87 |
< |
Default(env.InstallCsh(radbin(s), s + '.csh')) |
85 |
> |
for s in Split('''objline glare dayfact |
86 |
> |
debugcal rlux raddepend compamb vinfo fieldcomb'''): |
87 |
> |
Default(env.InstallScript(radbin(s), s + '.csh')) |
88 |
> |
for s in Split('''objview objpict |
89 |
> |
genambpos genklemsamp genskyvec genBSDF ltview ltpict'''): |
90 |
> |
Default(env.InstallScript(radbin(s), s + '.pl')) |
91 |
> |
for s in Split('''do_action.tcl do_file.tcl do_options.tcl do_results.tcl |
92 |
> |
do_scene.tcl do_views.tcl do_zone.tcl file.hlp getfile.tcl gethelp.tcl |
93 |
> |
help.hlp tclIndex trad.hlp trad.icon util.tcl'''): |
94 |
> |
Default(env.InstallScript(tclscr(s), s)) |
95 |
> |
Default(env.InstallTCLScript(radbin('trad'), 'trad.wsh')) |
96 |
> |
|
97 |
|
# Those don't really work yet |
98 |
|
#else: |
99 |
|
# for s in Split('''objview glare rlux '''): |
103 |
|
Default('#src/util') |
104 |
|
env.Install('$RAD_BINDIR', progs) |
105 |
|
|
106 |
+ |
# vim: set syntax=python: |