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, 1 month 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

# 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 schorsch 1.5 rplot = env.Object(source='rplot.c')
23 schorsch 1.2 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 schorsch 1.1
31 schorsch 1.2 common = [mfio, misc, syscalls]
32 schorsch 1.1
33 schorsch 1.2 libmeta = env.StaticLibrary(radlib('meta'),
34     Split ('metacalls.c progname.c') +[primout] + common)
35 schorsch 1.1
36     # standard targets
37     PROGS = (
38 schorsch 1.5 ('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 schorsch 1.2 ['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 schorsch 1.3 'rtfunc','rtcont','rtmem','meta','rterror']),
57 schorsch 1.2 ('igraph', [igraph, gcalc, cgraph, mgraph, mgvars],
58     ['rtproc','rtpath','rtio', # proc/path/rtio for win_popen()
59 schorsch 1.3 'rtfunc','rtcont','rtmem','meta','rterror']),
60 schorsch 1.2 ('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 schorsch 1.1 )
70     for p in PROGS:
71 schorsch 1.2 prog = env.Program(target=radbin(p[0]), source=p[1],
72     LIBS=p[2]+env['RAD_MLIB'])
73 schorsch 1.1 Default(prog)
74 schorsch 1.2 env.Append(RAD_BININSTALL=[env.Install(env['RAD_BINDIR'], prog)])
75 schorsch 1.1
76    
77    
78     # X11 targets
79 schorsch 1.2 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 schorsch 1.1 Default(x11meta)
85 schorsch 1.2 env.Append(RAD_BININSTALL=[env.Install(env['RAD_BINDIR'], x11meta)])
86 schorsch 1.1
87