ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/meta/SConscript
Revision: 1.5
Committed: Mon Sep 19 12:48:09 2005 UTC (19 years ago) by schorsch
Branch: MAIN
CVS Tags: rad4R2P2, rad5R0, rad4R2, rad4R1, rad4R0, rad3R8, rad3R9, rad4R2P1
Changes since 1.4: +5 -1 lines
Log Message:
Added meta2bmp to SCons build and fixed a few compile warnings.

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 rplot = env.Object(source='rplot.c')
23 palloc = env.Object(source='palloc.c')
24 plotin = env.Object(source='plotin.c')
25 mgvars = env.Object(source='mgvars.c')
26 mgraph = env.Object(source='mgraph.c')
27 cgraph = env.Object(source='cgraph.c')
28 gcalc = env.Object(source='gcalc.c')
29 # multiple output from same source
30
31 common = [mfio, misc, syscalls]
32
33 libmeta = env.StaticLibrary(radlib('meta'),
34 Split ('metacalls.c progname.c') +[primout] + common)
35
36 # standard targets
37 PROGS = (
38 ('meta2bmp', Split('meta2bmp.c') +[rplot, palloc, plot] + common,
39 ['rtproc','rtpath','rtpic','rtio', # proc/path/rtio for win_popen()
40 'rtcont','rtmem','rterror']),
41 ('meta2tga', Split('meta2tga.c') +[rplot, palloc, plot] + common,
42 ['rtproc','rtpath','rtio', # proc/path/rtio for win_popen()
43 'rtcont','rtmem','rterror']),
44 ('pexpand', Split('pexpand.c expand.c segment.c') +[palloc]+ common,
45 ['rtcont','rtmem','rterror']),
46 ('psort', Split('psort.c sort.c') +[palloc]+ common,
47 ['rtpath','rtcont','rtmem','rterror']),
48 ('cv', Split('cv.c cvhfio.c') + common,
49 ['rtcont','rtmem','rterror']),
50 ('psmeta', Split('psmeta.c psplot.c') + common,
51 ['rtcont','rtmem','rterror']),
52 ('plotin', [plotin, primout] + common,
53 ['rtcont','rtmem','rterror']),
54 ('bgraph', [bgraph, mgraph, mgvars],
55 ['rtproc','rtpath','rtio', # proc/path/rtio for win_popen()
56 'rtfunc','rtcont','rtmem','meta','rterror']),
57 ('igraph', [igraph, gcalc, cgraph, mgraph, mgvars],
58 ['rtproc','rtpath','rtio', # proc/path/rtio for win_popen()
59 'rtfunc','rtcont','rtmem','meta','rterror']),
60 ('dgraph', [dgraph, cgraph, mgvars],
61 ['rtproc','rtpath','rtio', # proc/path/rtio for win_popen()
62 'rtfunc','rtcont','rtmem','rterror']),
63 ('gcomp', [gcomp, gcalc, mgvars],
64 ['rtproc','rtpath','rtio', # proc/path/rtio for win_popen()
65 'rtfunc','rtcont','rtmem','rterror']),
66 ('plot4', Split('plot4.c') +[primout]+ common,
67 ['rtproc','rtpath','rtio', # proc/path/rtio for win_popen()
68 'rtcont','rtmem','rterror']),
69 )
70 for p in PROGS:
71 prog = env.Program(target=radbin(p[0]), source=p[1],
72 LIBS=p[2]+env['RAD_MLIB'])
73 Default(prog)
74 env.Append(RAD_BININSTALL=[env.Install(env['RAD_BINDIR'], prog)])
75
76
77
78 # X11 targets
79 if env.has_key('X11LIB'):
80 x11meta = env.Program(radbin('x11meta'), [plotin, primout]+ common,
81 CPPPATH=env.get('CPPPATH',[])+[env['X11INCLUDE']],
82 LIBPATH=env.get('LIBPATH',[])+[env['X11LIB']],
83 LIBS=['rtcont','rtmem','rterror', 'X11'] + env['RAD_MLIB'])
84 Default(x11meta)
85 env.Append(RAD_BININSTALL=[env.Install(env['RAD_BINDIR'], x11meta)])
86
87