ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/meta/SConscript
(Generate patch)

Comparing ray/src/meta/SConscript (file contents):
Revision 1.1 by schorsch, Tue Oct 21 19:27:29 2003 UTC vs.
Revision 1.2 by schorsch, Mon Oct 27 10:35:42 2003 UTC

# Line 2 | Line 2 | import os
2  
3   Import ('env')
4  
5 # make a modified local copy
6 meta = env.Copy(LIBS=['rt'] + env['RAD_MLIB'])
7
5   # compose paths
6 < def radbin(name): return os.path.join(meta['RAD_BUILDBIN'], name)
7 < def radlib(name): return os.path.join(meta['RAD_BUILDLIB'], name)
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 < #meta.Append(CPPFLAGS = ' -DMDIR=\\"' + meta['RAD_RLIBDIR'] + '\\"')
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 > mplot = env.Object(source='mplot.c')
24 > plotin = env.Object(source='plotin.c')
25 > tgraph = env.Object(source='tgraph.c')
26 > mgvars = env.Object(source='mgvars.c')
27 > mgraph = env.Object(source='mgraph.c')
28 > cgraph = env.Object(source='cgraph.c')
29 > gcalc = env.Object(source='gcalc.c')
30 > # multiple output from same source
31 > plotout = env.Object(source='plotout.c')
32 > t4014 = env.Object(target="t4014", source='plotout.c',
33 >                CPPFLAGS=env.get('CPPFLAGS',[]) + ['-DFORTEK'])
34  
35 < # some files need an extra flag
15 < MDIRFLAGS = meta.get('CPPFLAGS', []) + [
16 <        '-DMDIR=\\"%s\\"' % os.path.join(meta['RAD_RLIBDIR'], 'meta')]
17 < bgraph = meta.Object(source='bgraph.c', CPPFLAGS=MDIRFLAGS)
18 < igraph = meta.Object(source='igraph.c', CPPFLAGS=MDIRFLAGS)
19 < dgraph = meta.Object(source='dgraph.c', CPPFLAGS=MDIRFLAGS)
20 < gcomp = meta.Object(source='gcomp.c', CPPFLAGS=MDIRFLAGS)
21 < syscalls = meta.Object(source='syscalls.c', CPPFLAGS=MDIRFLAGS)
35 > common = [mfio, misc, syscalls]
36  
37 < common = Split('mfio.c misc.c') + [syscalls]
37 > libmeta = env.StaticLibrary(radlib('meta'),
38 >        Split ('metacalls.c progname.c') +[primout] + common)
39  
25 libmeta = meta.StaticLibrary(radlib('meta'),
26        Split ('metacalls.c primout.c progname.c') + common)
27
40   # standard targets
41   PROGS = (
42 < ('meta2tga', Split('meta2tga.c rplot.c plot.c palloc.c') + common),
43 < ('pexpand',  Split('pexpand.c expand.c segment.c palloc.c') + common),
44 < ('psort',    Split('psort.c sort.c palloc.c') + common),
45 < ('cv',       Split('cv.c cvhfio.c') + common),
46 < ('psmeta',   Split('psmeta.c psplot.c') + common),
47 < ('plotin',   Split('plotin.c primout.c') + common),
48 < ('bgraph',   Split('mgvars.c mgraph.c') + [bgraph, libmeta]),
49 < ('igraph',   Split('mgvars.c mgraph.c gcalc.c cgraph.c') + [igraph, libmeta]),
50 < ('dgraph',   Split('cgraph.c mgvars.c') + [dgraph]),
51 < ('gcomp',    Split('gcalc.c mgvars.c') + [gcomp]),
52 < ('plot4',    Split('plot4.c primout.c') + common),
42 > ('meta2tga', Split('meta2tga.c rplot.c') +[palloc, plot] + common,
43 >        ['rtproc','rtpath','rtio', # proc/path/rtio for win_popen()
44 >        'rtcont','rtmem','rterror']),
45 > ('pexpand',  Split('pexpand.c expand.c segment.c') +[palloc]+ common,
46 >        ['rtcont','rtmem','rterror']),
47 > ('psort',    Split('psort.c sort.c') +[palloc]+ common,
48 >        ['rtpath','rtcont','rtmem','rterror']),
49 > ('cv',       Split('cv.c cvhfio.c') + common,
50 >        ['rtcont','rtmem','rterror']),
51 > ('psmeta',   Split('psmeta.c psplot.c') + common,
52 >        ['rtcont','rtmem','rterror']),
53 > ('plotin',   [plotin, primout] + common,
54 >        ['rtcont','rtmem','rterror']),
55 > ('bgraph',   [bgraph, mgraph, mgvars],
56 >        ['rtproc','rtpath','rtio', # proc/path/rtio for win_popen()
57 >        'rtfunc','rtcont','rtmem','rterror','meta']),
58 > ('igraph',   [igraph, gcalc, cgraph, mgraph, mgvars],
59 >        ['rtproc','rtpath','rtio', # proc/path/rtio for win_popen()
60 >        'rtfunc','rtcont','rtmem','rterror','meta']),
61 > ('dgraph',   [dgraph, cgraph, mgvars],
62 >        ['rtproc','rtpath','rtio', # proc/path/rtio for win_popen()
63 >        'rtfunc','rtcont','rtmem','rterror']),
64 > ('gcomp',    [gcomp, gcalc, mgvars],
65 >        ['rtproc','rtpath','rtio', # proc/path/rtio for win_popen()
66 >        'rtfunc','rtcont','rtmem','rterror']),
67 > ('plot4',    Split('plot4.c') +[primout]+ common,
68 >        ['rtproc','rtpath','rtio', # proc/path/rtio for win_popen()
69 >        'rtcont','rtmem','rterror']),
70   )
71   for p in PROGS:
72 <        prog = meta.Program(target=radbin(p[0]),
73 <                        source=p[1])
72 >        prog = env.Program(target=radbin(p[0]), source=p[1],
73 >                        LIBS=p[2]+env['RAD_MLIB'])
74          Default(prog)
75 <        env.Append(RAD_BININSTALL=[meta.Install(meta['RAD_BINDIR'], prog)])
75 >        env.Append(RAD_BININSTALL=[env.Install(env['RAD_BINDIR'], prog)])
76  
77  
78   lib4014srcs = Split('''arc.c box.c circle.c close.c dot.c erase.c label.c
# Line 51 | Line 80 | lib4014srcs = Split('''arc.c box.c circle.c close.c do
80   lib4014 = env.Library(os.path.join(env['RAD_BUILDLIB'], '4014'),
81                  source=map(lambda s:os.path.join('lib4014', s), lib4014srcs))
82  
83 < plotsrc = Split('mplot.c plot.c palloc.c')
83 > plotsrc = [mplot, palloc, plot]
84  
85   SPECIAL = (
86 < ('mt160l',   Split('mt160l.c') + plotsrc + common), # rt
87 < ('mt160',    Split('mt160.c') + plotsrc + common), # rt m
88 < ('mtext',    Split('mtext.c primout.c') + common), # rt
89 < ('okimate',  Split('okimate.c') + plotsrc + common), # rt
90 < ('mx80',     Split('mx80.c') + plotsrc + common), # rt m
91 < ('imagew',   Split('imagew.c') + plotsrc + common), # rt m
92 < ('impress',  Split('impress.c implot.c imPfuncs.c plot.c') + common), # rt m
93 < ('aed5',     Split('aed5.c') + common), # rt m
94 < ('tcurve',   Split('tcurve.c tgraph.c primout.c') + common), # m
95 < ('tscat',    Split('tscat.c tgraph.c primout.c') + common), # rt m
96 < ('tbar',     Split('tbar.c tgraph.c primout.c') + common), # rt m
86 > ('mt160l',   Split('mt160l.c') + plotsrc + common,
87 >        ['rtproc','rtpath','rtio','rtcont','rtmem','rterror']),
88 > ('mt160',    Split('mt160.c') + plotsrc + common,
89 >        ['rtproc','rtpath','rtio','rtcont','rtmem','rterror']),
90 > ('mtext',    Split('mtext.c') +[primout]+ common,
91 >        ['rtcont','rtmem','rterror']),
92 > ('okimate',  Split('okimate.c') + plotsrc + common,
93 >        ['rtproc','rtpath','rtio','rtcont','rtmem','rterror']),
94 > ('mx80',     Split('mx80.c') + plotsrc + common,
95 >        ['rtproc','rtpath','rtio','rtcont','rtmem','rterror']),
96 > ('imagew',   Split('imagew.c') + plotsrc + common,
97 >        ['rtproc','rtpath','rtio','rtcont','rtmem','rterror']),
98 > ('impress',  Split('impress.c implot.c imPfuncs.c') +[plot]+ common,
99 >        ['rtproc','rtpath','rtio','rtcont','rtmem','rterror']),
100 > ('aed5',     Split('aed5.c') + common,
101 >        ['rtproc','rtpath','rtio','rtcont','rtmem','rterror']),
102 > ('tcurve',   Split('tcurve.c') +[tgraph, primout]+ common,
103 >        ['rtcont','rtmem','rterror']),
104 > ('tscat',    Split('tscat.c') +[tgraph, primout]+ common,
105 >        ['rtpath','rtcont','rtmem','rterror']),
106 > ('tbar',     Split('tbar.c') +[tgraph, primout]+ common,
107 >        ['rtcont','rtmem','rterror']),
108 > ('plotout',  [plotout] + common,
109 >        ['4014', 'rtproc','rtpath','rtio','rtcont','rtmem','rterror']),
110 > ('t4014',    [t4014] + common,
111 >        ['4014', 'rtproc','rtpath','rtio','rtcont','rtmem','rterror']),
112   )
113   sbin = []
114   sinst = []
115   for p in SPECIAL:
116 <        prog = meta.Program(target=radbin(p[0]), source=p[1])
116 >        prog = env.Program(target=radbin(p[0]), source=p[1],
117 >                        LIBS=p[2]+env['RAD_MLIB'])
118          sbin.append(prog)
119 <        sinst.append(meta.Install(meta['RAD_BINDIR'], prog))
120 < #plotout = meta.Program(target=radbin('plotout'), source=['plotout.c'] + common,
121 < #       LIBS=['plot', '4014', 'rt', 'm'])
77 < #t4014 = meta.Program(target=radbin('t4014'), source=['plotout.c'] + common,
78 < #       LIBS=['4014', 'rt', 'm'], CPPFLAGS=meta.get('CPPFLAGS',[]) + ['-DFORTEK'])
79 < meta.Alias('meta_special', sbin)# + [plotout, t4014])
80 < meta.Alias('meta_special_install', sinst)
119 >        sinst.append(env.Install(env['RAD_BINDIR'], prog))
120 > env.Alias('meta_special', sbin)
121 > env.Alias('meta_special_install', sinst)
122  
123   # X11 targets
124 < if meta.has_key('X11LIB'):
125 <        meta.Append(CPPPATH=meta['X11INCLUDE'])
126 <        meta.Append(LIBS='X11')
127 <        meta.Append(LIBPATH=meta['X11LIB'])
128 <        x11meta = meta.Program(radbin('x11meta'),
88 <                        Split('plotin.c primout.c') + common)
124 > if env.has_key('X11LIB'):
125 >        x11meta = env.Program(radbin('x11meta'), [plotin, primout]+ common,
126 >                CPPPATH=env.get('CPPPATH',[])+[env['X11INCLUDE']],
127 >                LIBPATH=env.get('LIBPATH',[])+[env['X11LIB']],
128 >                LIBS=['rtcont','rtmem','rterror', 'X11'] + env['RAD_MLIB'])
129          Default(x11meta)
130 <        env.Append(RAD_BININSTALL=[meta.Install(meta['RAD_BINDIR'], x11meta)])
130 >        env.Append(RAD_BININSTALL=[env.Install(env['RAD_BINDIR'], x11meta)])
131  
132  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines