ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/cv/SConscript
Revision: 1.2
Committed: Mon Oct 27 10:35:42 2003 UTC (20 years, 8 months ago) by schorsch
Branch: MAIN
Changes since 1.1: +16 -12 lines
Log Message:
Experimental SCons update: Debug builds, split libraries, more Windows targets.

File Contents

# User Rev Content
1 schorsch 1.1 import os
2    
3     Import ('env')
4    
5     # math libs
6     mlib = 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     def mgfsf(src): return map(lambda s:os.path.join('mgflib', s), src)
12    
13     MGFSRC = Split('''parser.c context.c xf.c object.c lookup.c badarg.c
14     words.c
15     fvect.c''')
16     libmgf = env.StaticLibrary(radlib('mgf'), source=mgfsf(MGFSRC))
17     MGFPROGS = (
18     ('mgfilt', Split('mgfilt.c')),
19     ('mgf2inv', Split('mgf2inv.c cvrgb.c')),
20     ('3ds2mgf', Split('3ds2mgf.c rayopt.c vect.c')),
21     )
22     for p in MGFPROGS:
23     prog = env.Program(target=radbin(p[0]), source=mgfsf(p[1]) + [libmgf],
24     LIBS=mlib)
25     Default(prog)
26     env.Append(RAD_BININSTALL=[env.Install(env['RAD_BINDIR'], prog)])
27    
28 schorsch 1.2 trans = env.Object(source="trans.c")
29    
30 schorsch 1.1 # standard targets
31     PROGS = [
32 schorsch 1.2 ('thf2rad', ['thf2rad.c'], []),
33     ('ies2rad', ['ies2rad.c'], ['rtlamps','rtcolor','rtio','rtpath']+ mlib),
34     ('arch2rad', ['arch2rad.c',trans],['rtcont','rtmem'] + mlib),
35     ('nff2rad', ['nff2rad.c'], []),
36     ('lampcolor', ['lampcolor.c'], ['rtlamps','rtcolor','rtpath']),
37     ('tmesh2rad', ['tmesh2rad.c'], ['rtscene','rtmath'] + mlib),
38     ('obj2rad', ['obj2rad.c',trans],
39     ['rtscene','rtargs','rtio','rtcont','rtmem','rtmath','rterror'] + mlib),
40     ('mgf2rad', ['mgf2rad.c'], ['rtscene','rtcolor','mgf'] + mlib),
41     ('rad2mgf', ['rad2mgf.c'],
42     ['rtproc', 'rtpath', # for win_popen()
43     'rtscene','rtio','rtcolor','rtcont','rtmem','rterror'] + mlib),
44     ('mgf2meta', ['mgf2meta.c'],
45     ['meta','rtmath','rtcont','rtmem','rterror','mgf'] + mlib),
46 schorsch 1.1 ]
47     for p in PROGS:
48     prog = env.Program(target=radbin(p[0]), source=p[1], LIBS=p[2])
49     Default(prog)
50     env.Append(RAD_BININSTALL=[env.Install(env['RAD_BINDIR'], prog)])
51    
52     LIBFILES = Split('source.cal tilt.cal')# lamp.tab')
53     env.Append(RAD_RLIBINSTALL=env.Install(env['RAD_RLIBDIR'], LIBFILES))
54    
55