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

Comparing ray/src/px/SConscript (file contents):
Revision 1.3 by schorsch, Fri Jan 2 23:27:43 2004 UTC vs.
Revision 1.18 by schorsch, Sun Apr 27 17:22:49 2008 UTC

# Line 2 | Line 2 | import os
2  
3   Import('env') # inherit from parent
4  
5 < mlib = env['RAD_MLIB']
5 > mlib = ['$RAD_MLIB']
6 > progs = []
7  
8   # compose paths
9 < def radbin(name): return os.path.join(env['RAD_BUILDBIN'], name)
10 < def radlib(name): return os.path.join(env['RAD_BUILDLIB'], name)
9 > def radbin(name): return os.path.join('$RAD_BUILDBIN', name)
10 > #def radbin(name): return name
11 > def radlib(name): return os.path.join('$RAD_BUILDLIB', name)
12  
13   warp3d = env.Object(source="warp3d.c")
14   clrtab = env.Object(source="clrtab.c")
15   neuclrtab = env.Object(source="neuclrtab.c")
14 ciq = env.Object(source="ciq.c")
15 cut = env.Object(source="cut.c")
16 closest = env.Object(source="closest.c")
16  
17   # standard targets
18   PROGS = (
19 < # name          files            libs
19 > # name       files            libs
20   ('macbethcal', Split('macbethcal.c pmapgen.c mx3.c')+[warp3d],
21 <        ['rtpic','rtproc','rtpath','rtio','rtargs','rtcont','rtmem','rterror']),
21 >        ['rtpic','rtproc','rtpath','rtargs','rtio','rtcont','rtmem','rterror']),
22   ('pcond',    Split('pcond.c pcond2.c pcond3.c pcond4.c')+[warp3d],
23 <        ['rtpic','rtproc','rtpath','rtio','rtargs','rtmath','rtcont','rtmem','rterror']),
23 >        ['rtpic','rtproc','rtpath','rtargs','rtio','rtmath','rtcont','rtmem','rterror']),
24   ('pfilt',    Split('pfilt.c pf2.c pf3.c'),
25 <        ['rtlamps','rtpic','rtio','rtpath','rtargs','rtmath']),
26 < ('pcwarp',   ['pcwarp.c', warp3d],
25 >        ['rtlamps','rtpic','rtpath','rtargs','rtio','rtmath']),
26 > ('pcwarp',   ['pcwarp.c', warp3d],      
27          ['rtpic','rtio','rtcont','rtmem','rterror']),
28 < ('pvalue',   ['pvalue.c'],    ['rtpic','rtio','rtargs','rtmath']),
28 > ('pvalue',   ['pvalue.c'],    ['rtpic','rtargs','rtio','rtmath']),
29   ('pcompos',  ['pcompos.c'],   ['rtpic','rtproc','rtpath','rtio','rterror']),
30   ('psign',    ['psign.c'],
31 <        ['rtpic','rtscene','rtio','rtpath','rtargs','rtcont','rtmem','rterror']),
31 >        ['rtpic','rtscene','rtpath','rtargs','rtio','rtcont','rtmem','rterror']),
32   ('protate',  ['protate.c'],   ['rtpic','rtio']),
33   ('pextrem',  ['pextrem.c'],   ['rtpic','rtio']),
34   ('pflip',    ['pflip.c'],     ['rtpic','rtio']),
35   ('pcomb',    ['pcomb.c'],
36 <        ['rtpic','rtproc','rtpath','rtio','rtfunc','rtargs','rtmath','rtcont','rtmem']),
36 >        ['rtpic','rtproc','rtpath','rtfunc','rtargs','rtio','rtmath','rtcont','rtmem']),
37   ('pinterp',  ['pinterp.c'],
38 <        ['rtproc','rtpic','rtio','rtpath','rtargs','rtmath','rtmem','rterror']),
38 >        ['rtproc','rtpic','rtpath','rtargs','rtio','rtmath','rtmem','rterror']),
39  
41 ('oki20c',   ['oki20c.c'],['rtpic','rtproc','rtpath','rtio','rtmem','rterror']),
42 ('oki20',    ['oki20.c'], ['rtpic','rtproc','rtpath','rtio','rtmem','rterror']),
43
40   ('ra_gif',   ['ra_gif.c', clrtab, neuclrtab], ['rtpic','rtio','rtmem']),
41 < ('ra_pr',    Split('ra_pr.c biq.c')+ [ciq, cut, closest],
46 <        ['rtpic','rtio','rtmem']),
47 < ('ra_pr24',  ['ra_pr24.c'],   ['rtpic','rtio','rtmem']),
48 < ('ra_avs',   ['ra_avs.c'],    ['rtpic','rtio','rtmem']),
49 < ('ra_ps',    ['ra_ps.c'],     ['rtpic','rtio','rtargs','rtmem']),
41 > ('ra_ps',    ['ra_ps.c'],     ['rtpic','rtargs','rtio','rtmem']),
42   ('ra_ppm',   ['ra_ppm.c'],    ['rtpic','rtio','rtmem']),
43 + ('ra_bmp',   ['ra_bmp.c'],
44 +        ['rtpic','rtproc','rterror','rtpath','rtio','rtmem']),
45   ('ra_t8',    ['ra_t8.c', clrtab, neuclrtab], ['rtpic','rtio','rtmem']),
46   ('ra_t16',   ['ra_t16.c'],    ['rtpic','rtio','rtmem']),
53 ('ra_bn',    ['ra_bn.c'],     ['rtpic','rtio','rtmem']),
47   ('ra_rgbe', ['ra_rgbe.c'],['rtpic','rtproc','rtpath','rtio','rtmem','rterror']),
48   ('ra_pict',  ['ra_pict.c'],   ['rtpic','rtio','rtmem']),
49   ('ra_hexbit',['ra_hexbit.c'], ['rtpic','rtio','rtmem']),
# Line 60 | Line 53 | PROGS = (
53   )
54   for p in PROGS:
55      prog = env.Program(target=radbin(p[0]), source=p[1],
56 <                LIBS=p[2]+mlib)
57 <    Default(prog)
65 <    env.Append(RAD_BININSTALL=[env.Install(env['RAD_BINDIR'], prog)])
56 >        LIBS=p[2]+mlib)
57 >    progs.append(prog)
58  
59  
68 # special targets not normally built
69 SPECIAL = (
70 # name          files             libs
71 ('psum',       ['psum.c'],       ['rtpic','rtio']),
72 #('panim',      ['panim.c'],      ['client','rpcsvc']),# missing externals
73
74 ('ra_im',      ['ra_im.c'],      ['rtproc','rtpath','rtio','rterror']),
75
76 #('aedimage',   Split('aedimage.c')+[ciq, cut, closest],[]),# missing externals
77 ('t4027',      ['t4027.c'],      ['rtpic']),
78 ('paintjet',   ['paintjet.c'],   ['rtpic','rtio','rtmem']),
79 ('mt160r',     ['mt160r.c'],     ['rtpic','rtio','rtmem']),
80 ('greyscale',  ['greyscale.c'],  ['rtpic']),
81 ('colorscale', ['colorscale.c'], ['rtpic']),
82 ('d48c',       ['d48c.c'],       ['rtpic']),
83 )
84 specprogs = []
85 specinst = []
86 for p in SPECIAL:
87        prog = env.Program(target=radbin(p[0]), source=p[1], LIBS=p[2]+mlib)
88        specprogs.append(prog)
89        specinst.append(env.Install(env['RAD_BINDIR'], prog))
90 env.Alias('px_special', specprogs)
91 env.Alias('px_special_install', specinst)
92
93
60   # tiff library (unix-specific for the moment)
61   if os.name == 'posix':
62          cwd = os.getcwd()
63 +        upperdir = os.path.split(cwd)[0]
64 +
65          libtiff = env.Command(radlib(env['LIBPREFIX'] + 'tiff' + env['LIBSUFFIX']),
66 <                'tiff/config.local',
67 <        [('cd "%s"; '
68 <        'sh ./configure -quiet -noninteractive '
69 <                '-with-CC="$CC" -with-ENVOPTS="$CCFLAGS"; '
70 <        'cd libtiff; '
71 <        'make install;') % os.path.join(cwd, 'tiff')])
66 >                None,
67 >        [('cd "%(tiffdir)s"; '
68 >                'env CC="$CC" '
69 >                './configure -C '
70 >                '"libdir=%(upperdir)s/lib" '
71 >                '--enable-static --disable-shared --disable-cxx '
72 >                '--enable-logluv --disable-jpeg --disable-zlib --disable-pixarlog; '
73 >                'cd %(portdir)s; make all;'
74 >                'cd %(libtiffdir)s; make install-exec;' # don't install headers
75 >         ) % {
76 >        'upperdir':upperdir,
77 >        'tiffdir':os.path.join(cwd, 'tiff'),
78 >        'portdir':os.path.join(cwd, 'tiff', 'port'),
79 >        'libtiffdir':os.path.join(cwd, 'tiff', 'libtiff')
80 >        }
81 >        ])
82  
83          # tiff programs
84 <        ra_tiff = env.Program(target=radbin('ra_tiff'), source=Split('ra_tiff.c'),
84 >        ra_tiff = env.Program(target=radbin('ra_tiff'), source=['ra_tiff.c'],
85                  LIBS=['tiff','rtpic','rtio','rtmem'] + mlib)
86 <        Default(ra_tiff)
109 <        env.Append(RAD_BININSTALL=[env.Install(env['RAD_BINDIR'], ra_tiff)])
86 >        progs.append(ra_tiff)
87  
88 <        normtiff = env.Program(target=radbin('normtiff'), source=Split('normtiff.c'),
88 >        normtiff = env.Program(target=radbin('normtiff'),source=['normtiff.c'],
89                  LIBS=['tiff','rtpic','rtio','rtmem'] + mlib)
90 <        Default(normtiff)
114 <        env.Append(RAD_BININSTALL=[env.Install(env['RAD_BINDIR'], normtiff)])
90 >        progs.append(normtiff)
91  
92  
117 # pixar format requires extra lib
118 if env.has_key('PIXAR_LIB'):
119    ra_pixar = env.Program(radbin('ra_pixar'), source=['ra_pixar.c'],
120                LIBS=['rtpic', env['PIXAR_LIB']])
121    Default(ra_pixar)
122    env.Append(RAD_BININSTALL=[env.Install(env['RAD_BINDIR'], ra_pixar)])
123
124
93   # X11 targets
94   if env.has_key('X11LIB'):
95 <    xcppp = env.get('CPPPATH',[]) + [env['X11INCLUDE']]
96 <    xlibp = env.get('LIBPATH',[]) + [env['X11LIB']]
97 <    xlibs = ['X11','rtpic','rtio','rtmath','rtargs','rtmem']
95 >    xincl = env.get('CPPPATH', []) + ['$X11INCLUDE']
96 >    xlibp = env.get('LIBPATH', []) + ['$X11LIB']
97 >    xlibs = ['X11','rtpic','rtargs','rtio','rtmath','rtmem']
98 >    x11findwind = env.Object(source='../common/x11findwind.c', # XXX ../not/nice
99 >        CPPPATH=xincl)
100  
101      ximage = env.Program(target=radbin('ximage'),
102          source=Split('x11image.c x11raster.c')+[clrtab],
103 <        CPPPATH=xcppp, LIBPATH=xlibp, LIBS=xlibs + mlib)
104 <    Default(ximage)
135 <    env.Append(RAD_BININSTALL=[env.Install(env['RAD_BINDIR'], ximage)])
103 >        CPPPATH=xincl, LIBPATH=xlibp, LIBS=xlibs + mlib)
104 >    progs.append(ximage)
105  
106      xshowtrace = env.Program(target=radbin('xshowtrace'),
107 <        source=Split('xshowtrace.c x11findwind.c'),
108 <        CPPPATH=xcppp, LIBPATH=xlibp, LIBS=xlibs + mlib)
109 <    Default(xshowtrace)
141 <    env.Append(RAD_BININSTALL=[env.Install(env['RAD_BINDIR'], xshowtrace)])
107 >        source=Split('xshowtrace.c') + [x11findwind],
108 >        CPPPATH=xincl, LIBPATH=xlibp, LIBS=xlibs + mlib)
109 >    progs.append(xshowtrace)
110  
111 < # NeWS ?!?
112 < #    if env.has_key('OGL'):
113 < #        glimage = env.Program(target=radbin('glimage'),
114 < #            CPPFLAGS=env.get('CPPFLAGS', []) + [env['RAD_STEREO']],
115 < #            source=Split('glimage.c'),
116 < #            LIBS=['gl_s']+env['LIBS'],)
117 < #        Default(glimage)
118 < #        env.Append(RAD_BININSTALL=[env.Install(env['RAD_BINDIR'], glimage)])
111 > if os.name == 'posix': # XXX ignoring trad.wsh
112 >        for s in Split('''normpat falsecolor pdfblur pmblur pmdblur pbilat
113 >                        xyzimage phisto pdelta pgblur ra_pfm ran2tiff'''):
114 >                Default(env.InstallCsh(radbin(s), s + '.csh'))
115 > # XXX probably needs fixing
116 > #else:
117 > #       for s in Split('''falsecolor'''):
118 > #               Default(env.InstallCsh(radbin(s), s + '.csh'))
119 > # ignored by Rmakefile: pacuity phisteq psquish pveil vlpic
120  
121 + Default('#src/px')
122 + env.Install('$RAD_BINDIR', progs)
123  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines