ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/meta/SConscript
Revision: 1.4
Committed: Fri Nov 5 22:15:43 2004 UTC (20 years ago) by schorsch
Branch: MAIN
CVS Tags: rad3R7P2, rad3R7P1
Changes since 1.3: +0 -49 lines
Log Message:
Removed obsolete files and programs from SCons build.

File Contents

# Content
1 import os
2
3 Import ('env')
4
5 # compose paths
6 def radbin(name): return os.path.join(env['RAD_BUILDBIN'], name)
7 def radlib(name): return os.path.join(env['RAD_BUILDLIB'], name)
8
9 # extra flag
10 MDIRFLAGS = env.get('CPPFLAGS', []) + [
11 '-DMDIR=\\"%s\\"' % os.path.join(env['RAD_RLIBDIR'], 'meta')]
12 bgraph = env.Object(source='bgraph.c', CPPFLAGS=MDIRFLAGS)
13 igraph = env.Object(source='igraph.c', CPPFLAGS=MDIRFLAGS)
14 dgraph = env.Object(source='dgraph.c', CPPFLAGS=MDIRFLAGS)
15 gcomp = env.Object(source='gcomp.c', CPPFLAGS=MDIRFLAGS)
16 syscalls = env.Object(source='syscalls.c', CPPFLAGS=MDIRFLAGS)
17 # used by several targets
18 mfio = env.Object(source='mfio.c')
19 misc = env.Object(source='misc.c')
20 primout = env.Object(source='primout.c')
21 plot = env.Object(source='plot.c')
22 palloc = env.Object(source='palloc.c')
23 plotin = env.Object(source='plotin.c')
24 mgvars = env.Object(source='mgvars.c')
25 mgraph = env.Object(source='mgraph.c')
26 cgraph = env.Object(source='cgraph.c')
27 gcalc = env.Object(source='gcalc.c')
28 # multiple output from same source
29
30 common = [mfio, misc, syscalls]
31
32 libmeta = env.StaticLibrary(radlib('meta'),
33 Split ('metacalls.c progname.c') +[primout] + common)
34
35 # standard targets
36 PROGS = (
37 ('meta2tga', Split('meta2tga.c rplot.c') +[palloc, plot] + common,
38 ['rtproc','rtpath','rtio', # proc/path/rtio for win_popen()
39 'rtcont','rtmem','rterror']),
40 ('pexpand', Split('pexpand.c expand.c segment.c') +[palloc]+ common,
41 ['rtcont','rtmem','rterror']),
42 ('psort', Split('psort.c sort.c') +[palloc]+ common,
43 ['rtpath','rtcont','rtmem','rterror']),
44 ('cv', Split('cv.c cvhfio.c') + common,
45 ['rtcont','rtmem','rterror']),
46 ('psmeta', Split('psmeta.c psplot.c') + common,
47 ['rtcont','rtmem','rterror']),
48 ('plotin', [plotin, primout] + common,
49 ['rtcont','rtmem','rterror']),
50 ('bgraph', [bgraph, mgraph, mgvars],
51 ['rtproc','rtpath','rtio', # proc/path/rtio for win_popen()
52 'rtfunc','rtcont','rtmem','meta','rterror']),
53 ('igraph', [igraph, gcalc, cgraph, mgraph, mgvars],
54 ['rtproc','rtpath','rtio', # proc/path/rtio for win_popen()
55 'rtfunc','rtcont','rtmem','meta','rterror']),
56 ('dgraph', [dgraph, cgraph, mgvars],
57 ['rtproc','rtpath','rtio', # proc/path/rtio for win_popen()
58 'rtfunc','rtcont','rtmem','rterror']),
59 ('gcomp', [gcomp, gcalc, mgvars],
60 ['rtproc','rtpath','rtio', # proc/path/rtio for win_popen()
61 'rtfunc','rtcont','rtmem','rterror']),
62 ('plot4', Split('plot4.c') +[primout]+ common,
63 ['rtproc','rtpath','rtio', # proc/path/rtio for win_popen()
64 'rtcont','rtmem','rterror']),
65 )
66 for p in PROGS:
67 prog = env.Program(target=radbin(p[0]), source=p[1],
68 LIBS=p[2]+env['RAD_MLIB'])
69 Default(prog)
70 env.Append(RAD_BININSTALL=[env.Install(env['RAD_BINDIR'], prog)])
71
72
73
74 # X11 targets
75 if env.has_key('X11LIB'):
76 x11meta = env.Program(radbin('x11meta'), [plotin, primout]+ common,
77 CPPPATH=env.get('CPPPATH',[])+[env['X11INCLUDE']],
78 LIBPATH=env.get('LIBPATH',[])+[env['X11LIB']],
79 LIBS=['rtcont','rtmem','rterror', 'X11'] + env['RAD_MLIB'])
80 Default(x11meta)
81 env.Append(RAD_BININSTALL=[env.Install(env['RAD_BINDIR'], x11meta)])
82
83