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 (19 years, 5 months 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

# User Rev Content
1 schorsch 1.1 import os
2    
3     Import ('env')
4    
5     # compose paths
6 schorsch 1.2 def radbin(name): return os.path.join(env['RAD_BUILDBIN'], name)
7     def radlib(name): return os.path.join(env['RAD_BUILDLIB'], name)
8 schorsch 1.1
9 schorsch 1.2 # 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 schorsch 1.1
30 schorsch 1.2 common = [mfio, misc, syscalls]
31 schorsch 1.1
32 schorsch 1.2 libmeta = env.StaticLibrary(radlib('meta'),
33     Split ('metacalls.c progname.c') +[primout] + common)
34 schorsch 1.1
35     # standard targets
36     PROGS = (
37 schorsch 1.2 ('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 schorsch 1.3 'rtfunc','rtcont','rtmem','meta','rterror']),
53 schorsch 1.2 ('igraph', [igraph, gcalc, cgraph, mgraph, mgvars],
54     ['rtproc','rtpath','rtio', # proc/path/rtio for win_popen()
55 schorsch 1.3 'rtfunc','rtcont','rtmem','meta','rterror']),
56 schorsch 1.2 ('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 schorsch 1.1 )
66     for p in PROGS:
67 schorsch 1.2 prog = env.Program(target=radbin(p[0]), source=p[1],
68     LIBS=p[2]+env['RAD_MLIB'])
69 schorsch 1.1 Default(prog)
70 schorsch 1.2 env.Append(RAD_BININSTALL=[env.Install(env['RAD_BINDIR'], prog)])
71 schorsch 1.1
72    
73    
74     # X11 targets
75 schorsch 1.2 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 schorsch 1.1 Default(x11meta)
81 schorsch 1.2 env.Append(RAD_BININSTALL=[env.Install(env['RAD_BINDIR'], x11meta)])
82 schorsch 1.1
83