ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/util/SConscript
Revision: 1.1
Committed: Tue Oct 21 19:27:29 2003 UTC (20 years, 8 months ago) by schorsch
Branch: MAIN
Log Message:
Checking in experimental SCons build environment.

File Contents

# User Rev Content
1 schorsch 1.1 import os
2    
3     Import('env') # inherit from parent
4    
5     # make a modified local copy
6     util = env.Copy(LIBS=['rt'] + env['RAD_MLIB'])
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)
11    
12     # standard targets
13     PROGS = [
14     ('findglare', Split('findglare.c glareval.c glaresrc.c setscan.c')),
15     ('glarendx', Split('glarendx.c')),
16     ('vwright', Split('vwright.c')),
17     ('vwrays', Split('vwrays.c')),
18     ('rad', Split('rad.c')),
19     ('rpiece', Split('rpiece.c Version.c')),
20     ]
21     if os.name != 'nt': # XXX pending Windows version of netproc.c
22     PROGS.append(('ranimate', Split('ranimate.c netproc.c')))
23     for p in PROGS:
24     prog = util.Program(target=radbin(p[0]), source=p[1])
25     Default(prog)
26     env.Append(RAD_BININSTALL=[util.Install(util['RAD_BINDIR'], prog)])
27    
28     if os.name != 'nt': # XXX pending resolution of free_os() conflict
29     # targets with different includes/libs
30     rs = Split('ranimove.c ranimove1.c ranimove2.c')
31     for l in ['raycalls', 'radiance']: # XXX ugly
32     rs.append(radlib(util['LIBPREFIX'] + l + util['LIBSUFFIX']))
33     ranimove = util.Program(target=radbin('ranimove'), source=rs,
34     CPPPATH=util.get('CPPPATH', []) + ['#src/rt'])
35     Default(ranimove)
36     env.Append(RAD_BININSTALL=[util.Install(util['RAD_BINDIR'], ranimove)])
37    
38     getinfo = util.Program(target=radbin('getinfo'), source='getinfo.c',
39     LIBS=['rt'])
40     Default(getinfo)
41     env.Append(RAD_BININSTALL=[util.Install(util['RAD_BINDIR'], getinfo)])
42    
43     # special targets not normally built
44     scanner = util.Program(target=radbin('scanner'), source='scanner.c', LIBS=['m'])
45     makedist = util.Program(target=radbin('makedist'),
46     source=Split('makedist.c setscan.c'))
47     scanner_i = util.Install(util['RAD_BINDIR'], scanner)
48     makedist_i = util.Install(util['RAD_BINDIR'], makedist)
49     util.Alias('util_special', [scanner, makedist])
50     util.Alias('util_special_install', [scanner_i, makedist_i])
51    
52     # X11 targets
53     if util.has_key('X11LIB'):
54     util.Append(CPPPATH=util['X11INCLUDE'])
55     util.Append(LIBS='X11')
56     util.Append(LIBPATH=util['X11LIB'])
57     xglaresrc = util.Program(target=radbin('xglaresrc'),
58     source=Split('xglaresrc.c x11findwind.c'),)
59     Default(xglaresrc)
60     env.Append(RAD_BININSTALL=[util.Install(util['RAD_BINDIR'], xglaresrc)])
61    
62     # OpenGL targets that also depend on X11
63     if util.has_key('OGL'):
64     glrad = util.Program(target=radbin('glrad'), source=Split('glrad.c'),
65     CPPFLAGS=util.get('CPPFLAGS', []) + [util['RAD_STEREO']],
66     LIBS=['rgl', 'GL', 'GLU']+util['LIBS'],)
67     Default(glrad)
68     env.Append(RAD_BININSTALL=[util.Install(util['RAD_BINDIR'], glrad)])
69    
70