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

# User Rev Content
1 schorsch 1.1 import os
2    
3     Import('env') # inherit from parent
4    
5 schorsch 1.7 mlib = ['$RAD_MLIB']
6     progs = []
7 schorsch 1.1
8     # compose paths
9 schorsch 1.7 def radbin(name): return os.path.join('$RAD_BUILDBIN', name)
10     def radlib(name): return os.path.join('$RAD_BUILDLIB', name)
11 schorsch 1.1
12 schorsch 1.5 Version = env.Object(source='../rt/Version.c') # XXX ../rt/not_nice
13 schorsch 1.2
14 schorsch 1.1 # standard targets
15     PROGS = [
16 schorsch 1.10 ('findglare', Split('findglare.c glareval.c glaresrc.c setscan.c'),
17 schorsch 1.2 ['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 schorsch 1.5 ('rpiece', Split('rpiece.c') + [Version],
24 schorsch 1.2 ['rtpic','rtargs','rtio','rtproc','rtmath','rtpath','rtmem']),
25 schorsch 1.1 ]
26 schorsch 1.2 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 schorsch 1.1 for p in PROGS:
36 schorsch 1.2 prog = env.Program(target=radbin(p[0]), source=p[1], LIBS=p[2]+mlib)
37 schorsch 1.7 progs.append(prog)
38 schorsch 1.1
39 schorsch 1.2 if os.name != 'nt': # XXX pending Windows version of raypcalls.c
40 schorsch 1.1 # targets with different includes/libs
41     rs = Split('ranimove.c ranimove1.c ranimove2.c')
42 schorsch 1.2 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 schorsch 1.7 progs.append(ranimove)
47 schorsch 1.1
48 schorsch 1.2 getinfo = env.Program(target=radbin('getinfo'), source='getinfo.c',
49     LIBS=['rtio'])
50 schorsch 1.7 progs.append(getinfo)
51 schorsch 1.1
52    
53     # X11 targets
54 schorsch 1.2 if env.has_key('X11LIB'):
55 schorsch 1.7 xincl = env.get('CPPPATH', []) + ['$X11INCLUDE']
56     xlibp = env.get('LIBPATH', []) + ['$X11LIB']
57 schorsch 1.6 x11findwind = env.Object(source='../common/x11findwind.c', # XXX ../not/nice
58     CPPPATH=xincl)
59 schorsch 1.2 xglaresrc = env.Program(target=radbin('xglaresrc'),
60 schorsch 1.5 source=Split('xglaresrc.c') + [x11findwind],
61 schorsch 1.2 LIBPATH=xlibp, CPPPATH=xincl,
62     LIBS=['rtpic','rtmath','rtargs','rtio','X11']+ mlib)
63 schorsch 1.7 progs.append(xglaresrc)
64 schorsch 1.2
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 schorsch 1.7 CPPFLAGS=env.get('CPPFLAGS', []) + ['$RAD_STEREO'],
69 schorsch 1.2 LIBPATH=xlibp, CPPPATH=xincl,
70     LIBS=['rgl','rtpic','rtscene','rtio','rtproc','rtpath','rtargs',
71     'rtmath','rtcont','rtmem','rterror',
72     'GL', 'GLU','X11'],)
73 schorsch 1.7 progs.append(glrad)
74 schorsch 1.1
75 schorsch 1.7 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 schorsch 1.8 # 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 schorsch 1.7
85     Default('#src/util')
86     env.Install('$RAD_BINDIR', progs)
87 schorsch 1.1