@echo off REM This file is used only on Windows in order to install the FFTW library. REM REM Forward slashes in directory names must be converted to backslash in order REM to work with xcopy. ARGH! REM The first argument is the directory containing the extracted FFTW archive REM The second argument is the directory that contains the prefix we are installing into. REM Now convert the paths to use backslash and not forward slash REM See http://www.dostips.com/forum/viewtopic.php?f=3&t=422 SETLOCAL EnableDelayedExpansion REM Unpacking the FFTW archive produces this subdirectory which we will copy REM the header files from. set source=%1 set source=!source:/=\! set target=%2 set target=!target:/=\! REM Now that the paths are Kosher, we can finally do what we came here for: REM Install the FFTW library. if not exist %target%\lib mkdir %target%\lib if not exist %target%\include mkdir %target%\include if not exist %target%\bin mkdir %target%\bin REM Produce libfftw3-3.lib from libfftw3-3.def lib /def:%source%\libfftw3-3.def /out:libfftw3-3.lib lib /def:%source%\libfftw3f-3.def /out:libfftw3f-3.lib lib /def:%source%\libfftw3l-3.def /out:libfftw3l-3.lib REM Install library, header and DLL copy libfftw3-3.lib %target%\lib copy libfftw3f-3.lib %target%\lib copy libfftw3l-3.lib %target%\lib copy %source%\fftw3.h %target%\include copy %source%\libfftw3-3.dll %target%\bin copy %source%\libfftw3f-3.dll %target%\bin copy %source%\libfftw3l-3.dll %target%\bin