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.20 |
def tclscr(name): return os.path.join('$RAD_BUILDRLIB', 'tcl', name) |
12 |
schorsch |
1.1 |
|
13 |
schorsch |
1.20 |
cmatrix = env.Object(source='cmatrix.c') |
14 |
|
|
cmbsdf = env.Object(source='cmbsdf.c') |
15 |
schorsch |
1.2 |
|
16 |
schorsch |
1.1 |
# standard targets |
17 |
|
|
PROGS = [ |
18 |
schorsch |
1.10 |
('findglare', Split('findglare.c glareval.c glaresrc.c setscan.c'), |
19 |
schorsch |
1.2 |
['rtpic','rtargs','rtio','rtproc','rtmath','rtpath','rtmem','rterror']), |
20 |
schorsch |
1.14 |
('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 |
schorsch |
1.2 |
('rad', Split('rad.c'), |
24 |
schorsch |
1.14 |
['rtpic','rtproc','rtpath','rtmath','rtargs','rtio','rtcont','rtmem','rterror']), |
25 |
schorsch |
1.20 |
('rpiece', Split('rpiece.c') + [env.version], # remote magic |
26 |
schorsch |
1.2 |
['rtpic','rtargs','rtio','rtproc','rtmath','rtpath','rtmem']), |
27 |
schorsch |
1.12 |
('ranimate', ['ranimate.c', '$RAD_NETCOMPAT'], |
28 |
|
|
['rtpic','rtargs','rtio','rtproc','rtcont','rtmem','rtpath','rtmath', |
29 |
|
|
'rtnet','rterror','$RAD_SOCKETLIB']), |
30 |
schorsch |
1.20 |
('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 |
schorsch |
1.1 |
] |
39 |
schorsch |
1.12 |
|
40 |
schorsch |
1.1 |
for p in PROGS: |
41 |
schorsch |
1.2 |
prog = env.Program(target=radbin(p[0]), source=p[1], LIBS=p[2]+mlib) |
42 |
schorsch |
1.7 |
progs.append(prog) |
43 |
schorsch |
1.1 |
|
44 |
schorsch |
1.20 |
# 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 |
schorsch |
1.1 |
|
59 |
schorsch |
1.2 |
getinfo = env.Program(target=radbin('getinfo'), source='getinfo.c', |
60 |
|
|
LIBS=['rtio']) |
61 |
schorsch |
1.7 |
progs.append(getinfo) |
62 |
schorsch |
1.1 |
|
63 |
|
|
|
64 |
|
|
# X11 targets |
65 |
schorsch |
1.2 |
if env.has_key('X11LIB'): |
66 |
schorsch |
1.7 |
xincl = env.get('CPPPATH', []) + ['$X11INCLUDE'] |
67 |
|
|
xlibp = env.get('LIBPATH', []) + ['$X11LIB'] |
68 |
schorsch |
1.2 |
xglaresrc = env.Program(target=radbin('xglaresrc'), |
69 |
schorsch |
1.16 |
source=Split('xglaresrc.c') + [env.x11findwind], # XXX remote magic |
70 |
schorsch |
1.2 |
LIBPATH=xlibp, CPPPATH=xincl, |
71 |
|
|
LIBS=['rtpic','rtmath','rtargs','rtio','X11']+ mlib) |
72 |
schorsch |
1.7 |
progs.append(xglaresrc) |
73 |
schorsch |
1.2 |
|
74 |
|
|
# OpenGL targets that also depend on X11 |
75 |
|
|
if env.has_key('OGL'): |
76 |
|
|
glrad = env.Program(target=radbin('glrad'), source=Split('glrad.c'), |
77 |
schorsch |
1.7 |
CPPFLAGS=env.get('CPPFLAGS', []) + ['$RAD_STEREO'], |
78 |
schorsch |
1.2 |
LIBPATH=xlibp, CPPPATH=xincl, |
79 |
schorsch |
1.14 |
LIBS=['rgl','rtpic','rtscene','rtproc','rtpath','rtargs','rtio', |
80 |
schorsch |
1.16 |
'rtmath','rtcont','rtmem','rterror','rtdummy', |
81 |
schorsch |
1.19 |
'GL', 'GLU','X11'] + mlib,) |
82 |
schorsch |
1.7 |
progs.append(glrad) |
83 |
schorsch |
1.1 |
|
84 |
schorsch |
1.7 |
if os.name == 'posix': # XXX ignoring trad.wsh |
85 |
schorsch |
1.20 |
for s in Split('''objline glare dayfact |
86 |
|
|
debugcal rlux raddepend compamb vinfo fieldcomb'''): |
87 |
schorsch |
1.19 |
Default(env.InstallScript(radbin(s), s + '.csh')) |
88 |
schorsch |
1.20 |
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 |
schorsch |
1.8 |
# Those don't really work yet |
98 |
|
|
#else: |
99 |
|
|
# for s in Split('''objview glare rlux '''): |
100 |
|
|
# prog = env.Program(target=radbin(s), source=s+'.c') |
101 |
|
|
# progs.append(prog) |
102 |
schorsch |
1.7 |
|
103 |
|
|
Default('#src/util') |
104 |
|
|
env.Install('$RAD_BINDIR', progs) |
105 |
schorsch |
1.1 |
|
106 |
schorsch |
1.20 |
# vim: set syntax=python: |