ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/util/SConscript
Revision: 1.10
Committed: Mon Nov 8 19:24:46 2004 UTC (19 years, 4 months ago) by schorsch
Branch: MAIN
CVS Tags: rad3R7P2, rad3R7P1
Changes since 1.9: +1 -3 lines
Log Message:
Removed more obsolete stuff, added pcwarp again.

File Contents

# Content
1 import os
2
3 Import('env') # inherit from parent
4
5 mlib = ['$RAD_MLIB']
6 progs = []
7
8 # compose paths
9 def radbin(name): return os.path.join('$RAD_BUILDBIN', name)
10 def radlib(name): return os.path.join('$RAD_BUILDLIB', name)
11
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.c'),
17 ['rtpic','rtargs','rtio','rtproc','rtmath','rtpath','rtmem','rterror']),
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],
24 ['rtpic','rtargs','rtio','rtproc','rtmath','rtpath','rtmem']),
25 ]
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))
35 for p in PROGS:
36 prog = env.Program(target=radbin(p[0]), source=p[1], LIBS=p[2]+mlib)
37 progs.append(prog)
38
39 if os.name != 'nt': # XXX pending Windows version of raypcalls.c
40 # targets with different includes/libs
41 rs = Split('ranimove.c ranimove1.c ranimove2.c')
42 ranimove = env.Program(target=radbin('ranimove'), source=rs,
43 CPPPATH=env.get('CPPPATH', [])+ ['#src/rt'],
44 LIBS=['raycalls','rttrace','rtscene','rtpic','rtfunc','rtio',
45 'rtmath','rtcont','rtmem','rtargs','rtproc','rtpath','rterror'] + mlib)
46 progs.append(ranimove)
47
48 getinfo = env.Program(target=radbin('getinfo'), source='getinfo.c',
49 LIBS=['rtio'])
50 progs.append(getinfo)
51
52
53 # X11 targets
54 if env.has_key('X11LIB'):
55 xincl = env.get('CPPPATH', []) + ['$X11INCLUDE']
56 xlibp = env.get('LIBPATH', []) + ['$X11LIB']
57 x11findwind = env.Object(source='../common/x11findwind.c', # XXX ../not/nice
58 CPPPATH=xincl)
59 xglaresrc = env.Program(target=radbin('xglaresrc'),
60 source=Split('xglaresrc.c') + [x11findwind],
61 LIBPATH=xlibp, CPPPATH=xincl,
62 LIBS=['rtpic','rtmath','rtargs','rtio','X11']+ mlib)
63 progs.append(xglaresrc)
64
65 # OpenGL targets that also depend on X11
66 if env.has_key('OGL'):
67 glrad = env.Program(target=radbin('glrad'), source=Split('glrad.c'),
68 CPPFLAGS=env.get('CPPFLAGS', []) + ['$RAD_STEREO'],
69 LIBPATH=xlibp, CPPPATH=xincl,
70 LIBS=['rgl','rtpic','rtscene','rtio','rtproc','rtpath','rtargs',
71 'rtmath','rtcont','rtmem','rterror',
72 'GL', 'GLU','X11'],)
73 progs.append(glrad)
74
75 if os.name == 'posix': # XXX ignoring trad.wsh
76 for s in Split('''objview objline objpict
77 glare dayfact debugcal rlux raddepend compamb vinfo genambpos'''):
78 Default(env.InstallCsh(radbin(s), s + '.csh'))
79 # Those don't really work yet
80 #else:
81 # for s in Split('''objview glare rlux '''):
82 # prog = env.Program(target=radbin(s), source=s+'.c')
83 # progs.append(prog)
84
85 Default('#src/util')
86 env.Install('$RAD_BINDIR', progs)
87