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.12 by schorsch, Mon Sep 12 14:44:09 2005 UTC vs.
Revision 1.19 by schorsch, Tue Dec 23 15:04:00 2008 UTC

# Line 16 | Line 16 | neuclrtab = env.Object(source="neuclrtab.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']),
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  
40   ('ra_gif',   ['ra_gif.c', clrtab, neuclrtab], ['rtpic','rtio','rtmem']),
41 < ('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'],    ['rtpic','rtproc','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']),
47   ('ra_rgbe', ['ra_rgbe.c'],['rtpic','rtproc','rtpath','rtio','rtmem','rterror']),
# Line 56 | Line 57 | for p in PROGS:
57      progs.append(prog)
58  
59  
60 < # tiff library (unix-specific for the moment)
61 < if os.name == 'posix':
60 > # tiff library (building it is unix-specific for the moment)
61 > #  If we haven't found one supporting LogLuv installed, build our own.
62 > libtiff_fn = radlib(env['LIBPREFIX'] + 'tiff' + env['LIBSUFFIX'])
63 > if os.name == 'posix' and not env.get('TIFFLIB_INSTALLED'):
64          cwd = os.getcwd()
65          upperdir = os.path.split(cwd)[0]
66 <
64 <        libtiff = env.Command(radlib(env['LIBPREFIX'] + 'tiff' + env['LIBSUFFIX']),
65 <                None,
66 >        libtiff = env.Command(libtiff_fn, None,
67          [('cd "%(tiffdir)s"; '
68                  'env CC="$CC" '
69 <                './configure -C '#-with-CC="$CC" '
70 <                '"libdir=%(upperdir)s/lib" "includedir=%(upperdir)s/common" '
69 >                './configure -C '
70 >                '"libdir=%(upperdir)s/lib" '
71                  '--enable-static --disable-shared --disable-cxx '
72 <                '--enable-logluv --disable-jpeg '
72 <        '--disable-zlib --disable-pixarlog; '
73 <                #'"-with-ENVOPTS=$CCFLAGS"; '
72 >                '--enable-logluv --disable-jpeg --disable-zlib --disable-pixarlog; '
73                  'cd %(portdir)s; make all;'
74 <                'cd %(libtiffdir)s; make install;') % {
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'),
# Line 80 | Line 80 | if os.name == 'posix':
80          }
81          ])
82  
83 < #       libtiff = env.Command(radlib(env['LIBPREFIX'] + 'tiff' + env['LIBSUFFIX']),
84 < #               'tiff/config.local',
85 < #       [('cd "%s"; '
86 < #       'sh ./configure -quiet -noninteractive '
87 < #               '-with-CC="$CC" -with-ENVOPTS="$CCFLAGS"; '
88 < #       'cd libtiff; '
89 < #       'make install;') % os.path.join(cwd, 'tiff')])
83 >        env['TIFFLIB_INSTALLED'] = 1
84  
85 + if os.name == 'posix': # cleanup action for a previously built tifflib
86 +        Clean(libtiff_fn, [libtiff_fn, radlib(env['LIBPREFIX'] + 'tiff.la')])
87 +
88 + if env.get('TIFFLIB_INSTALLED'):
89          # tiff programs
90 <        ra_tiff = env.Program(target=radbin('ra_tiff'), source=Split('ra_tiff.c'),
90 >        tiffi = env.get('RAD_TIFFINCLUDE')
91 >        if tiffi: tiffincl = [tiffi] + env.get('CPPPATH', [])
92 >        else: tiffincl = env.get('CPPPATH', [])
93 >        tiffl = env.get('RAD_TIFFLIB')
94 >        if tiffl: tifflib = [tiffl] + env.get('LIBPATH', [])
95 >        else: tifflib = env.get('LIBPATH', [])
96 >
97 >        ra_tiff = env.Program(target=radbin('ra_tiff'), source=['ra_tiff.c'],
98 >                CPPPATH = tiffincl, LIBPATH=tifflib,
99                  LIBS=['tiff','rtpic','rtio','rtmem'] + mlib)
100          progs.append(ra_tiff)
101  
102 <        normtiff = env.Program(target=radbin('normtiff'), source=Split('normtiff.c'),
102 >        normtiff = env.Program(target=radbin('normtiff'),source=['normtiff.c'],
103 >                CPPPATH = tiffincl, LIBPATH=tifflib,
104                  LIBS=['tiff','rtpic','rtio','rtmem'] + mlib)
105          progs.append(normtiff)
106  
107  
108   # X11 targets
109   if env.has_key('X11LIB'):
110 <    xincl = env.get('CPPPATH', []) + ['$X11INCLUDE']
111 <    xlibp = env.get('LIBPATH', []) + ['$X11LIB']
112 <    xlibs = ['X11','rtpic','rtio','rtmath','rtargs','rtmem']
113 <    x11findwind = env.Object(source='../common/x11findwind.c', # XXX ../not/nice
114 <        CPPPATH=xincl)
110 >        xincl = env.get('CPPPATH', []) + ['$X11INCLUDE']
111 >        xlibp = env.get('LIBPATH', []) + ['$X11LIB']
112 >        xlibs = ['X11','rtpic','rtargs','rtio','rtmath','rtmem']
113 >        env.x11findwind = env.Object(source='../common/x11findwind.c', # XXX remote magic
114 >                CPPPATH=xincl)
115  
116 <    ximage = env.Program(target=radbin('ximage'),
117 <        source=Split('x11image.c x11raster.c')+[clrtab],
118 <        CPPPATH=xincl, LIBPATH=xlibp, LIBS=xlibs + mlib)
119 <    progs.append(ximage)
116 >        ximage = env.Program(target=radbin('ximage'),
117 >                source=Split('x11image.c x11raster.c')+[clrtab],
118 >                CPPPATH=xincl, LIBPATH=xlibp, LIBS=xlibs + mlib)
119 >        progs.append(ximage)
120  
121 <    xshowtrace = env.Program(target=radbin('xshowtrace'),
122 <        source=Split('xshowtrace.c') + [x11findwind],
123 <        CPPPATH=xincl, LIBPATH=xlibp, LIBS=xlibs + mlib)
124 <    progs.append(xshowtrace)
121 >        xshowtrace = env.Program(target=radbin('xshowtrace'),
122 >                source=Split('xshowtrace.c') + [env.x11findwind], # XXX remote magic
123 >                CPPPATH=xincl, LIBPATH=xlibp, LIBS=xlibs + mlib)
124 >        progs.append(xshowtrace)
125  
119
126   if os.name == 'posix': # XXX ignoring trad.wsh
127 <        for s in Split('''normpat falsecolor pdfblur
128 <                        pmblur xyzimage phisto pdelta pgblur ra_pfm'''):
127 >        for s in Split('''normpat falsecolor pdfblur pmblur pmdblur pbilat
128 >                        xyzimage phisto pdelta pgblur ra_pfm ran2tiff'''):
129                  Default(env.InstallCsh(radbin(s), s + '.csh'))
130   # XXX probably needs fixing
131   #else:
132   #       for s in Split('''falsecolor'''):
133   #               Default(env.InstallCsh(radbin(s), s + '.csh'))
134 + # ignored by Rmakefile: pacuity phisteq psquish pveil vlpic
135  
136   Default('#src/px')
137   env.Install('$RAD_BINDIR', progs)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines