Compile ra_tiff and normtiff for Windows using MinGW + MSYS

For those of you interested in compiling ra_tiff and normtiff for Windows,
below are the instructions on how it could be done.

Get from
Get MinGW + MSYS shell from

To open a MSYS shell: Go to C:\msys\1.0\msys.bat (or where you installed

Original instructions from:
Only step 5 should be enough to compile libtiff (since we do not use libz
nor libjpeg)
To make it work with Radiance I had to modify the procedure a bit:

    download the latest sources:
    uncompress this zip-file
    then open an MSYS shell

cd tiff-3.9.4
./configure --enable-static --enable-logluv --disable-shared --disable-cxx
--disable-jpeg --disable-zlib --disable-pixarlog
make install-strip

Copy the file libtiff.a from C:\msys\1.0\local\lib to C:\..\..\ray\src\lib
(where ..\..\ points to where you extracted the Radiance source files)

To build ra_tiff add these lines to ray\src\px\SConscript:

ra_tiff = env.Program(target=radbin('ra_tiff'), source=['ra_tiff.c'],
    LIBS=['libtiff','rtpic','rtio','rtmem'] + mlib)

In a similar way normtiff can be build:

Add this line to \ray\src\common\SConscript after the section # build

rtall = env.StaticLibrary(target=radlib('rtall'), source=ALL)

To build normtiff add these lines to ray\src\px\SConscript:

normtiff = env.Program(target=radbin('normtiff'),source=['normtiff.c'],
    LIBS=['libtiff','rtall'] + mlib)

Then proceed with building Radiance with scons.

Best Regards,