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.18 by schorsch, Sun Apr 27 17:22:49 2008 UTC vs.
Revision 1.22 by schorsch, Thu Mar 10 17:36:18 2016 UTC

# Line 7 | Line 7 | progs = []
7  
8   # compose paths
9   def radbin(name): return os.path.join('$RAD_BUILDBIN', name)
10 #def radbin(name): return name
10   def radlib(name): return os.path.join('$RAD_BUILDLIB', name)
11  
12   warp3d = env.Object(source="warp3d.c")
# Line 48 | Line 47 | PROGS = (
47   ('ra_pict',  ['ra_pict.c'],   ['rtpic','rtio','rtmem']),
48   ('ra_hexbit',['ra_hexbit.c'], ['rtpic','rtio','rtmem']),
49   ('ra_xyze',  ['ra_xyze.c'],   ['rtpic','rtio','rtmem']),
50 + ('pmblur2',  ['pmblur2.c'],   ['rtpic','rtargs','rtio','rtargs','rtmath','rtmem','rtcont','rterror',mlib]),
51  
52   ('ttyimage', ['ttyimage.c'],  ['rtpic','rtio','rtmem']),
53   )
# Line 57 | 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 <
65 <        libtiff = env.Command(radlib(env['LIBPREFIX'] + 'tiff' + env['LIBSUFFIX']),
66 <                None,
66 >        libtiff = env.Command(libtiff_fn, None,
67          [('cd "%(tiffdir)s"; '
68                  'env CC="$CC" '
69                  './configure -C '
# Line 80 | Line 80 | if os.name == 'posix':
80          }
81          ])
82  
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 +        libtiff = env.get('RAD_LIBTIFF')
90          # tiff programs
91 +        tiffi = env.get('RAD_TIFFINCLUDE')
92 +        if tiffi: tiffincl = [tiffi] + env.get('CPPPATH', [])
93 +        else: tiffincl = env.get('CPPPATH', [])
94 +        tiffl = env.get('RAD_TIFFLIB')
95 +        if tiffl: tifflib = [tiffl] + env.get('LIBPATH', [])
96 +        else: tifflib = env.get('LIBPATH', [])
97 +
98          ra_tiff = env.Program(target=radbin('ra_tiff'), source=['ra_tiff.c'],
99 <                LIBS=['tiff','rtpic','rtio','rtmem'] + mlib)
99 >                CPPPATH = tiffincl, LIBPATH=tifflib,
100 >                LIBS=[libtiff,'rtpic','rtio','rtmem'] + mlib)
101          progs.append(ra_tiff)
102  
103          normtiff = env.Program(target=radbin('normtiff'),source=['normtiff.c'],
104 <                LIBS=['tiff','rtpic','rtio','rtmem'] + mlib)
104 >                CPPPATH = tiffincl, LIBPATH=tifflib,
105 >                LIBS=[libtiff,'rtpic','rtio','rtmem', 'rtproc', 'rtpath', 'rterror'] + mlib)
106          progs.append(normtiff)
107  
108  
109   # X11 targets
110   if env.has_key('X11LIB'):
111 <    xincl = env.get('CPPPATH', []) + ['$X11INCLUDE']
112 <    xlibp = env.get('LIBPATH', []) + ['$X11LIB']
113 <    xlibs = ['X11','rtpic','rtargs','rtio','rtmath','rtmem']
114 <    x11findwind = env.Object(source='../common/x11findwind.c', # XXX ../not/nice
115 <        CPPPATH=xincl)
111 >        xincl = env.get('CPPPATH', []) + ['$X11INCLUDE']
112 >        xlibp = env.get('LIBPATH', []) + ['$X11LIB']
113 >        xlibs = ['X11','rtpic','rtargs','rtio','rtmath','rtmem']
114 >        env.x11findwind = env.Object(source='../common/x11findwind.c', # XXX remote magic
115 >                CPPPATH=xincl)
116  
117 <    ximage = env.Program(target=radbin('ximage'),
118 <        source=Split('x11image.c x11raster.c')+[clrtab],
119 <        CPPPATH=xincl, LIBPATH=xlibp, LIBS=xlibs + mlib)
120 <    progs.append(ximage)
117 >        ximage = env.Program(target=radbin('ximage'),
118 >                source=Split('x11image.c x11raster.c')+[clrtab],
119 >                CPPPATH=xincl, LIBPATH=xlibp, LIBS=xlibs + mlib)
120 >        progs.append(ximage)
121  
122 <    xshowtrace = env.Program(target=radbin('xshowtrace'),
123 <        source=Split('xshowtrace.c') + [x11findwind],
124 <        CPPPATH=xincl, LIBPATH=xlibp, LIBS=xlibs + mlib)
125 <    progs.append(xshowtrace)
122 >        xshowtrace = env.Program(target=radbin('xshowtrace'),
123 >                source=Split('xshowtrace.c') + [env.x11findwind], # XXX remote magic
124 >                CPPPATH=xincl, LIBPATH=xlibp, LIBS=xlibs + mlib)
125 >        progs.append(xshowtrace)
126  
127   if os.name == 'posix': # XXX ignoring trad.wsh
128 <        for s in Split('''normpat falsecolor pdfblur pmblur pmdblur pbilat
129 <                        xyzimage phisto pdelta pgblur ra_pfm ran2tiff'''):
130 <                Default(env.InstallCsh(radbin(s), s + '.csh'))
128 >        for s in Split('''normpat pdfblur pmblur pmdblur
129 >                        xyzimage phisto pdelta pgblur ra_pfm ran2tiff pbilat'''):
130 >                Default(env.InstallScript(radbin(s), s + '.csh'))
131 >        for s in Split('''falsecolor'''):
132 >                Default(env.InstallScript(radbin(s), s + '.pl'))
133   # XXX probably needs fixing
134   #else:
135   #       for s in Split('''falsecolor'''):
136 < #               Default(env.InstallCsh(radbin(s), s + '.csh'))
136 > #               Default(env.InstallScript(radbin(s), s + '.pl'))
137   # ignored by Rmakefile: pacuity phisteq psquish pveil vlpic
138  
139   Default('#src/px')
140   env.Install('$RAD_BINDIR', progs)
141  
142 + # vim: set syntax=python:

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines