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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines