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.8 by schorsch, Sat Oct 23 18:55:53 2004 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')
13   Version = env.Object(source='../rt/Version.c') # XXX ../rt/not_nice
# Line 35 | Line 36 | PROGS.append(('ranimate',  ['ranimate.c', netproc],
36          ['rtpic','rtargs','rtio','rtcont','rtmem','rtpath','rtmath','rtnet','rterror'] + netlib))
37   for p in PROGS:
38          prog = env.Program(target=radbin(p[0]), source=p[1], LIBS=p[2]+mlib)
39 <        Default(prog)
39 <        env.Append(RAD_BININSTALL=[env.Install(env['RAD_BINDIR'], prog)])
39 >        progs.append(prog)
40  
41   if os.name != 'nt': # XXX pending Windows version of raypcalls.c
42          # targets with different includes/libs
# Line 45 | Line 45 | if os.name != 'nt': # XXX pending Windows version of r
45                          CPPPATH=env.get('CPPPATH', [])+ ['#src/rt'],
46                          LIBS=['raycalls','rttrace','rtscene','rtpic','rtfunc','rtio',
47                          'rtmath','rtcont','rtmem','rtargs','rtproc','rtpath','rterror'] + mlib)
48 <        Default(ranimove)
49 <        env.Append(RAD_BININSTALL=[env.Install(env['RAD_BINDIR'], ranimove)])
48 >        progs.append(ranimove)
49  
50   getinfo = env.Program(target=radbin('getinfo'), source='getinfo.c',
51                  LIBS=['rtio'])
52 < Default(getinfo)
54 < env.Append(RAD_BININSTALL=[env.Install(env['RAD_BINDIR'], getinfo)])
52 > progs.append(getinfo)
53  
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)
58 >        scanner_i = env.Install('$RAD_BINDIR', scanner)
59          makedist = env.Program(target=radbin('makedist'),
60                          source=Split('makedist.c')+[setscan],
61                          LIBS=['rtmath']+mlib)
62 <        makedist_i = env.Install(env['RAD_BINDIR'], makedist)
62 >        makedist_i = env.Install('$RAD_BINDIR', makedist)
63          env.Alias('util_special', [scanner, makedist])
64          env.Alias('util_special_install', [scanner_i, makedist_i])
65  
66   # X11 targets
67   if env.has_key('X11LIB'):
68 <        xlibp = env.get('LIBPATH',[]) + [env['X11LIB']]
69 <        xincl = env.get('CPPPATH',[]) + [env['X11INCLUDE']]
68 >        xincl = env.get('CPPPATH', []) + ['$X11INCLUDE']
69 >        xlibp = env.get('LIBPATH', []) + ['$X11LIB']
70          x11findwind = env.Object(source='../common/x11findwind.c', # XXX ../not/nice
71                          CPPPATH=xincl)
72          xglaresrc = env.Program(target=radbin('xglaresrc'),
73                          source=Split('xglaresrc.c') + [x11findwind],
74                          LIBPATH=xlibp, CPPPATH=xincl,
75                          LIBS=['rtpic','rtmath','rtargs','rtio','X11']+ mlib)
76 <        Default(xglaresrc)
79 <        env.Append(RAD_BININSTALL=[env.Install(env['RAD_BINDIR'], xglaresrc)])
76 >        progs.append(xglaresrc)
77  
78          # OpenGL targets that also depend on X11
79          if env.has_key('OGL'):
80                  glrad = env.Program(target=radbin('glrad'), source=Split('glrad.c'),
81 <                        CPPFLAGS=env.get('CPPFLAGS', []) + [env['RAD_STEREO']],
81 >                        CPPFLAGS=env.get('CPPFLAGS', []) + ['$RAD_STEREO'],
82                          LIBPATH=xlibp, CPPPATH=xincl,
83                          LIBS=['rgl','rtpic','rtscene','rtio','rtproc','rtpath','rtargs',
84                          'rtmath','rtcont','rtmem','rterror',
85                          'GL', 'GLU','X11'],)
86 <                Default(glrad)
90 <                env.Append(RAD_BININSTALL=[env.Install(env['RAD_BINDIR'], glrad)])
86 >                progs.append(glrad)
87  
88 + if os.name == 'posix': # XXX ignoring trad.wsh
89 +        for s in Split('''objview objline objpict
90 +                        glare dayfact debugcal rlux raddepend compamb vinfo genambpos'''):
91 +                Default(env.InstallCsh(radbin(s), s + '.csh'))
92 + # Those don't really work yet
93 + #else:
94 + #       for s in Split('''objview glare rlux '''):
95 + #               prog = env.Program(target=radbin(s), source=s+'.c')
96 + #               progs.append(prog)
97 +
98 + Default('#src/util')
99 + env.Install('$RAD_BINDIR', progs)
100  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines