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.4 by schorsch, Sun Mar 28 20:33:14 2004 UTC vs.
Revision 1.12 by schorsch, Mon Sep 19 11:30:11 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 + ('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   ]
26 if os.name == 'nt': # XXX should be set in a *.cfg file
27        netproc = 'win_netproc.c'
28        netlib = ['ws2_32']
29 else:
30        netproc = 'netproc.c'
31        netlib = []
32  
33 PROGS.append(('ranimate',  ['ranimate.c', netproc],
34        ['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)
38 <        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
38          # targets with different includes/libs
# Line 44 | Line 41 | if os.name != 'nt': # XXX pending Windows version of r
41                          CPPPATH=env.get('CPPPATH', [])+ ['#src/rt'],
42                          LIBS=['raycalls','rttrace','rtscene','rtpic','rtfunc','rtio',
43                          'rtmath','rtcont','rtmem','rtargs','rtproc','rtpath','rterror'] + mlib)
44 <        Default(ranimove)
48 <        env.Append(RAD_BININSTALL=[env.Install(env['RAD_BINDIR'], ranimove)])
44 >        progs.append(ranimove)
45  
46   getinfo = env.Program(target=radbin('getinfo'), source='getinfo.c',
47                  LIBS=['rtio'])
48 < Default(getinfo)
53 < env.Append(RAD_BININSTALL=[env.Install(env['RAD_BINDIR'], getinfo)])
48 > progs.append(getinfo)
49  
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                        LIBS=['rtmath']+mlib)
63        makedist_i = env.Install(env['RAD_BINDIR'], makedist)
64        env.Alias('util_special', [scanner, makedist])
65        env.Alias('util_special_install', [scanner_i, makedist_i])
50  
51   # X11 targets
52   if env.has_key('X11LIB'):
53 <        xlibp = env.get('LIBPATH',[]) + [env['X11LIB']]
54 <        xincl = env.get('CPPPATH',[]) + [env['X11INCLUDE']]
53 >        xincl = env.get('CPPPATH', []) + ['$X11INCLUDE']
54 >        xlibp = env.get('LIBPATH', []) + ['$X11LIB']
55 >        x11findwind = env.Object(source='../common/x11findwind.c', # XXX ../not/nice
56 >                        CPPPATH=xincl)
57          xglaresrc = env.Program(target=radbin('xglaresrc'),
58 <                        source=Split('xglaresrc.c x11findwind.c'),
58 >                        source=Split('xglaresrc.c') + [x11findwind],
59                          LIBPATH=xlibp, CPPPATH=xincl,
60                          LIBS=['rtpic','rtmath','rtargs','rtio','X11']+ mlib)
61 <        Default(xglaresrc)
76 <        env.Append(RAD_BININSTALL=[env.Install(env['RAD_BINDIR'], xglaresrc)])
61 >        progs.append(xglaresrc)
62  
63          # OpenGL targets that also depend on X11
64          if env.has_key('OGL'):
65                  glrad = env.Program(target=radbin('glrad'), source=Split('glrad.c'),
66 <                        CPPFLAGS=env.get('CPPFLAGS', []) + [env['RAD_STEREO']],
66 >                        CPPFLAGS=env.get('CPPFLAGS', []) + ['$RAD_STEREO'],
67                          LIBPATH=xlibp, CPPPATH=xincl,
68                          LIBS=['rgl','rtpic','rtscene','rtio','rtproc','rtpath','rtargs',
69                          'rtmath','rtcont','rtmem','rterror',
70                          'GL', 'GLU','X11'],)
71 <                Default(glrad)
87 <                env.Append(RAD_BININSTALL=[env.Install(env['RAD_BINDIR'], glrad)])
71 >                progs.append(glrad)
72  
73 + if os.name == 'posix': # XXX ignoring trad.wsh
74 +        for s in Split('''objview objline objpict
75 +                        glare dayfact debugcal rlux raddepend compamb vinfo genambpos'''):
76 +                Default(env.InstallCsh(radbin(s), s + '.csh'))
77 + # Those don't really work yet
78 + #else:
79 + #       for s in Split('''objview glare rlux '''):
80 + #               prog = env.Program(target=radbin(s), source=s+'.c')
81 + #               progs.append(prog)
82 +
83 + Default('#src/util')
84 + env.Install('$RAD_BINDIR', progs)
85  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines