ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/util/SConscript
(Generate patch)

Comparing ray/src/util/SConscript (file contents):
Revision 1.2 by schorsch, Mon Oct 27 10:35:43 2003 UTC vs.
Revision 1.20 by schorsch, Sat Mar 5 13:24:58 2016 UTC

# Line 2 | Line 2 | import os
2  
3   Import('env') # inherit from parent
4  
5 < mlib = env['RAD_MLIB']
5 > mlib = ['$RAD_MLIB']
6 > progs = []
7  
8   # compose paths
9 < def radbin(name): return os.path.join(env['RAD_BUILDBIN'], name)
10 < def radlib(name): return os.path.join(env['RAD_BUILDLIB'], name)
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 < setscan = env.Object(source='setscan.c')
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],
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.c'),
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   ]
25 if os.name == 'nt': # XXX should be set in a *.cfg file
26        netproc = 'win_netproc.c'
27        netlib = ['ws2_32']
28 else:
29        netproc = 'netproc.c'
30        netlib = []
39  
32 PROGS.append(('ranimate',  ['ranimate.c', netproc],
33        ['rtpic','rtargs','rtio','rtcont','rtmem','rtpath','rtmath','rtnet','rterror'] + netlib))
40   for p in PROGS:
41          prog = env.Program(target=radbin(p[0]), source=p[1], LIBS=p[2]+mlib)
42 <        Default(prog)
37 <        env.Append(RAD_BININSTALL=[env.Install(env['RAD_BINDIR'], prog)])
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 <        Default(ranimove)
52 <        env.Append(RAD_BININSTALL=[env.Install(env['RAD_BINDIR'], 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'])
61 < Default(getinfo)
52 < env.Append(RAD_BININSTALL=[env.Install(env['RAD_BINDIR'], getinfo)])
61 > progs.append(getinfo)
62  
54 # special targets not normally built
55 if os.name != 'nt': # XXX pending replacement of fork() and friends
56        scanner = env.Program(target=radbin('scanner'), source='scanner.c',
57                        LIBS=mlib)
58        scanner_i = env.Install(env['RAD_BINDIR'], scanner)
59        makedist = env.Program(target=radbin('makedist'),
60                        source=Split('makedist.c')+[setscan])
61        makedist_i = env.Install(env['RAD_BINDIR'], makedist)
62        env.Alias('util_special', [scanner, makedist])
63        env.Alias('util_special_install', [scanner_i, makedist_i])
63  
64   # X11 targets
65   if env.has_key('X11LIB'):
66 <        xlibp = env.get('LIBPATH',[]) + [env['X11LIB']]
67 <        xincl = env.get('CPPPATH',[]) + [env['X11INCLUDE']]
66 >        xincl = env.get('CPPPATH', []) + ['$X11INCLUDE']
67 >        xlibp = env.get('LIBPATH', []) + ['$X11LIB']
68          xglaresrc = env.Program(target=radbin('xglaresrc'),
69 <                        source=Split('xglaresrc.c x11findwind.c'),
69 >                        source=Split('xglaresrc.c') + [env.x11findwind], # XXX remote magic
70                          LIBPATH=xlibp, CPPPATH=xincl,
71                          LIBS=['rtpic','rtmath','rtargs','rtio','X11']+ mlib)
72 <        Default(xglaresrc)
74 <        env.Append(RAD_BININSTALL=[env.Install(env['RAD_BINDIR'], xglaresrc)])
72 >        progs.append(xglaresrc)
73  
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 <                        CPPFLAGS=env.get('CPPFLAGS', []) + [env['RAD_STEREO']],
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'],)
82 <                Default(glrad)
85 <                env.Append(RAD_BININSTALL=[env.Install(env['RAD_BINDIR'], glrad)])
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('''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 '''):
100 + #               prog = env.Program(target=radbin(s), source=s+'.c')
101 + #               progs.append(prog)
102  
103 + Default('#src/util')
104 + env.Install('$RAD_BINDIR', progs)
105 +
106 + # vim: set syntax=python:

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines