ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/cv/SConscript
Revision: 1.4
Committed: Fri Mar 26 21:33:52 2004 UTC (19 years, 11 months ago) by schorsch
Branch: MAIN
CVS Tags: rad3R6, rad3R6P1
Changes since 1.3: +1 -1 lines
Log Message:
Lampcolor needs rtio.a.

File Contents

# Content
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 trans = env.Object(source="trans.c")
29
30 # standard targets
31 PROGS = [
32 ('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','rtio','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 ]
45 for p in PROGS:
46 prog = env.Program(target=radbin(p[0]), source=p[1], LIBS=p[2])
47 Default(prog)
48 env.Append(RAD_BININSTALL=[env.Install(env['RAD_BINDIR'], prog)])
49
50 # meta targets
51 prog = env.Program(target=radbin('mgf2meta'), source=['mgf2meta.c'],
52 CPPPATH=env.get('CPPPATH', []) + [os.path.join('#src','meta')],
53 LIBS=['meta','rtmath','rtcont','rtmem','rterror','mgf'] + mlib)
54
55 LIBFILES = Split('source.cal tilt.cal')# lamp.tab')
56 env.Append(RAD_RLIBINSTALL=env.Install(env['RAD_RLIBDIR'], LIBFILES))
57
58