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.6 by schorsch, Tue Jul 6 11:49:10 2004 UTC vs.
Revision 1.15 by schorsch, Thu Apr 24 10:28:25 2008 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  
12 < setscan = env.Object(source='setscan.c')
12 < Version = env.Object(source='../rt/Version.c') # XXX ../rt/not_nice
12 > Version = env.Object(source='#src/rt/Version.c')
13  
14   # standard targets
15   PROGS = [
16 < ('findglare', Split('findglare.c glareval.c glaresrc.c')+[setscan],
16 > ('findglare', Split('findglare.c glareval.c glaresrc.c setscan.c'),
17          ['rtpic','rtargs','rtio','rtproc','rtmath','rtpath','rtmem','rterror']),
18 < #('contour',   Split('contour.c'),  ['rtmath']), # XXX what is this?
19 < ('glarendx',  Split('glarendx.c'), ['rtpic','rtio','rtargs','rtmath']),
20 < ('vwright',   Split('vwright.c'),  ['rtpic','rtio','rtargs','rtmath']),
21 < ('vwrays',    Split('vwrays.c'),   ['rtpic','rtio','rtargs','rtmath']),
18 > ('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   ('rad',       Split('rad.c'),
22 <        ['rtpic','rtproc','rtpath','rtio','rtmath','rtargs','rtcont','rtmem','rterror']),
22 >        ['rtpic','rtproc','rtpath','rtmath','rtargs','rtio','rtcont','rtmem','rterror']),
23   ('rpiece',    Split('rpiece.c') + [Version],
24          ['rtpic','rtargs','rtio','rtproc','rtmath','rtpath','rtmem']),
25 + ('ranimate',  ['ranimate.c', '$RAD_NETCOMPAT'],
26 +        ['rtpic','rtargs','rtio','rtproc','rtcont','rtmem','rtpath','rtmath',
27 +        'rtnet','rterror','$RAD_SOCKETLIB']),
28 + ('rtcontrib', ['rtcontrib.c', Version],
29 +        ['rtpic','rtargs','rtfunc','rtio','rtproc','rtcont','rtmem','rtpath',
30 +        'rtmath','rtnet','rterror','$RAD_SOCKETLIB'])
31   ]
27 if os.name == 'nt': # XXX should be set in a *.cfg file
28        netproc = 'win_netproc.c'
29        netlib = ['ws2_32']
30 else:
31        netproc = 'netproc.c'
32        netlib = []
32  
34 PROGS.append(('ranimate',  ['ranimate.c', netproc],
35        ['rtpic','rtargs','rtio','rtcont','rtmem','rtpath','rtmath','rtnet','rterror'] + netlib))
33   for p in PROGS:
34          prog = env.Program(target=radbin(p[0]), source=p[1], LIBS=p[2]+mlib)
35 <        Default(prog)
39 <        env.Append(RAD_BININSTALL=[env.Install(env['RAD_BINDIR'], prog)])
35 >        progs.append(prog)
36  
37 < if os.name != 'nt': # XXX pending Windows version of raypcalls.c
37 > #if os.name != 'nt': # XXX pending Windows version of raypcalls.c
38 > if True: # experimental raypwin.c
39          # targets with different includes/libs
40          rs = Split('ranimove.c ranimove1.c ranimove2.c')
41          ranimove = env.Program(target=radbin('ranimove'), source=rs,
42                          CPPPATH=env.get('CPPPATH', [])+ ['#src/rt'],
43 <                        LIBS=['raycalls','rttrace','rtscene','rtpic','rtfunc','rtio',
44 <                        'rtmath','rtcont','rtmem','rtargs','rtproc','rtpath','rterror'] + mlib)
45 <        Default(ranimove)
46 <        env.Append(RAD_BININSTALL=[env.Install(env['RAD_BINDIR'], ranimove)])
43 >                        LIBS=['raycalls','rttrace','rtscene','rtpic','rtfunc','rtmath',
44 >                        'rtcont','rtmem','rtargs','rtio','rtproc','rtpath','rterror']
45 >                        + mlib)
46 >        progs.append(ranimove)
47 >        rsensor = env.Program(target=radbin('rsensor'), source='rsensor.c',
48 >                        CPPPATH=env.get('CPPPATH', [])+ ['#src/rt'],
49 >                        LIBS=['raycalls','rttrace','rtscene','rtpic','rtfunc','rtmath',
50 >                        'rtcont','rtmem','rtargs','rtio','rtpath','rterror','rtproc',
51 >                        'rtlamps'] + mlib)
52 >        progs.append(rsensor)
53  
54   getinfo = env.Program(target=radbin('getinfo'), source='getinfo.c',
55                  LIBS=['rtio'])
56 < Default(getinfo)
54 < env.Append(RAD_BININSTALL=[env.Install(env['RAD_BINDIR'], getinfo)])
56 > progs.append(getinfo)
57  
56 # special targets not normally built
57 if os.name != 'nt': # XXX pending replacement of fork() and friends
58        scanner = env.Program(target=radbin('scanner'), source='scanner.c',
59                        LIBS=mlib)
60        scanner_i = env.Install(env['RAD_BINDIR'], scanner)
61        makedist = env.Program(target=radbin('makedist'),
62                        source=Split('makedist.c')+[setscan],
63                        LIBS=['rtmath']+mlib)
64        makedist_i = env.Install(env['RAD_BINDIR'], makedist)
65        env.Alias('util_special', [scanner, makedist])
66        env.Alias('util_special_install', [scanner_i, makedist_i])
58  
59   # X11 targets
60   if env.has_key('X11LIB'):
61 <        xlibp = env.get('LIBPATH',[]) + [env['X11LIB']]
62 <        xincl = env.get('CPPPATH',[]) + [env['X11INCLUDE']]
63 <        x11findwind = env.Object(source='../common/x11findwind.c', # XXX ../not/nice
73 <                        CPPPATH=xincl)
61 >        xincl = env.get('CPPPATH', []) + ['$X11INCLUDE']
62 >        xlibp = env.get('LIBPATH', []) + ['$X11LIB']
63 >        x11findwind = env.Object(source='#src/common/x11findwind.c', CPPPATH=xincl)
64          xglaresrc = env.Program(target=radbin('xglaresrc'),
65                          source=Split('xglaresrc.c') + [x11findwind],
66                          LIBPATH=xlibp, CPPPATH=xincl,
67                          LIBS=['rtpic','rtmath','rtargs','rtio','X11']+ mlib)
68 <        Default(xglaresrc)
79 <        env.Append(RAD_BININSTALL=[env.Install(env['RAD_BINDIR'], xglaresrc)])
68 >        progs.append(xglaresrc)
69  
70          # OpenGL targets that also depend on X11
71          if env.has_key('OGL'):
72                  glrad = env.Program(target=radbin('glrad'), source=Split('glrad.c'),
73 <                        CPPFLAGS=env.get('CPPFLAGS', []) + [env['RAD_STEREO']],
73 >                        CPPFLAGS=env.get('CPPFLAGS', []) + ['$RAD_STEREO'],
74                          LIBPATH=xlibp, CPPPATH=xincl,
75 <                        LIBS=['rgl','rtpic','rtscene','rtio','rtproc','rtpath','rtargs',
75 >                        LIBS=['rgl','rtpic','rtscene','rtproc','rtpath','rtargs','rtio',
76                          'rtmath','rtcont','rtmem','rterror',
77                          'GL', 'GLU','X11'],)
78 <                Default(glrad)
90 <                env.Append(RAD_BININSTALL=[env.Install(env['RAD_BINDIR'], glrad)])
78 >                progs.append(glrad)
79  
80 + if os.name == 'posix': # XXX ignoring trad.wsh
81 +        for s in Split('''objview objline objpict glare dayfact
82 +                        debugcal rlux raddepend compamb vinfo genambpos fieldcomb'''):
83 +                Default(env.InstallCsh(radbin(s), s + '.csh'))
84 + # Those don't really work yet
85 + #else:
86 + #       for s in Split('''objview glare rlux '''):
87 + #               prog = env.Program(target=radbin(s), source=s+'.c')
88 + #               progs.append(prog)
89 +
90 + Default('#src/util')
91 + env.Install('$RAD_BINDIR', progs)
92  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines