2009-07-12 15:20:21 -04:00
|
|
|
@echo off
|
|
|
|
if not exist config_params.bat (
|
|
|
|
echo run configure first
|
2009-07-12 20:19:43 -04:00
|
|
|
exit /b 1
|
2009-07-12 15:20:21 -04:00
|
|
|
)
|
|
|
|
call config_params.bat
|
|
|
|
if "%1" == "" goto :make
|
|
|
|
if "%1" == "clean" goto :clean
|
|
|
|
if "%1" == "install" goto :install
|
|
|
|
if "%1" == "check" goto :check
|
|
|
|
if "%1" == "speed" goto :speed
|
|
|
|
if "%1" == "tune" goto :speed
|
|
|
|
if "%1" == "try" goto :try
|
|
|
|
if "%1" == "help" (
|
|
|
|
echo Usage : make [clean|install|check|speed|tune|try|help]
|
2009-07-12 20:19:43 -04:00
|
|
|
exit /b 0
|
2009-07-12 15:20:21 -04:00
|
|
|
)
|
|
|
|
echo Unkwown option
|
2009-07-12 20:19:43 -04:00
|
|
|
exit /b 1
|
2009-07-12 15:20:21 -04:00
|
|
|
|
|
|
|
:make
|
|
|
|
vcbuild gen-mpir\gen-mpir.vcproj "Release|Win32"
|
|
|
|
vcbuild gen-bases\gen-bases.vcproj "Release|Win32"
|
|
|
|
vcbuild gen-fac_ui\gen-fac_ui.vcproj "Release|Win32%"
|
|
|
|
vcbuild gen-fib\gen-fib.vcproj "Release|Win32"
|
|
|
|
vcbuild gen-psqr\gen-psqr.vcproj "Release|Win32"
|
|
|
|
set LIBBUILD=%LIBTYPE%_mpir_%BCPU%
|
|
|
|
vcbuild %LIBBUILD%\%LIBBUILD%.vcproj "Release|%ARCHW%"
|
|
|
|
:: c++ to build if static
|
|
|
|
if %LIBTYPE% == lib (
|
|
|
|
vcbuild lib_mpir_cpp\lib_mpir_cpp.vcproj "Release|%ARCHW%"
|
|
|
|
)
|
2009-07-12 20:19:43 -04:00
|
|
|
exit /b 0
|
2009-07-12 15:20:21 -04:00
|
|
|
|
|
|
|
:check
|
|
|
|
:: this gives an error if we dont build the c++ stuff
|
|
|
|
vcbuild mpir-tests.sln "Release|%ARCHW%"
|
|
|
|
cd mpir-tests
|
|
|
|
python --version >nul 2>&1
|
|
|
|
if not errorlevel 1 goto :got
|
|
|
|
if exist c:\Python26 (
|
2009-07-12 16:02:00 -04:00
|
|
|
set "PATH=%PATH%;c:\Python26"
|
2009-07-12 15:20:21 -04:00
|
|
|
python --version >nul 2>&1
|
|
|
|
if not errorlevel 1 goto :got
|
|
|
|
)
|
|
|
|
if exist c:\Python30 (
|
2009-07-12 16:02:00 -04:00
|
|
|
set "PATH=%PATH%;c:\Python30"
|
2009-07-12 15:20:21 -04:00
|
|
|
python --version >nul 2>&1
|
|
|
|
if not errorlevel 1 goto :got
|
|
|
|
)
|
|
|
|
echo ERROR Could not find PYTHON
|
2009-07-12 20:19:43 -04:00
|
|
|
exit /b 1
|
2009-07-12 15:20:21 -04:00
|
|
|
:got
|
|
|
|
python run-tests.py
|
|
|
|
cd ..
|
2009-07-12 20:19:43 -04:00
|
|
|
exit /b 0
|
2009-07-12 15:20:21 -04:00
|
|
|
|
|
|
|
:install
|
2009-07-12 20:19:43 -04:00
|
|
|
echo HOW???
|
|
|
|
exit /b 1
|
2009-07-12 15:20:21 -04:00
|
|
|
|
|
|
|
:speed
|
|
|
|
vcbuild speed.sln "Release|%ARCHW%"
|
|
|
|
echo tune.exe and speed.exe are in %ARCHW%\Release\
|
2009-07-12 20:19:43 -04:00
|
|
|
exit /b 0
|
2009-07-12 15:20:21 -04:00
|
|
|
|
|
|
|
:try
|
|
|
|
vcbuild try\try.vcproj "Release|%ARCHW%"
|
|
|
|
echo try.exe is in try\%ARCHW%\Release\
|
2009-07-12 20:19:43 -04:00
|
|
|
exit /b 0
|
2009-07-12 15:20:21 -04:00
|
|
|
|
|
|
|
:clean
|
|
|
|
del config_params.bat config.guess.bat config.guess.exe config.guess.obj last_build.txt
|
2009-07-12 16:16:29 -04:00
|
|
|
del ..\config.h ..\mpir.h ..\gmp.h ..\gmp-mparam.h
|
|
|
|
del gen-psqr\gen-psqr.exe gen-fac_ui\gen-fac_ui.exe gen-bases\gen-bases.exe
|
|
|
|
del gen-fib\gen-fib.exe gen-mpir\gen-mpir.exe gen-mpir\gen-mpir.pdb
|
|
|
|
rmdir /s/q x64 win32 %LIBTYPE%_mpir_%BCPU%\%ARCHW% lib_mpir_cpp\%ARCHW% lib\%ARCHW% dll\%ARCHW% mpir-tests\%ARCHW%
|
|
|
|
rmdir /s/q gen-psqr\Win32 gen-fac_ui\Win32 gen-bases\Win32 gen-fib\Win32 gen-mpir\Win32
|
2009-07-12 15:20:21 -04:00
|
|
|
rmdir /s/q lib_speed\%ARCHW% speed\%ARCHW% tune\%ARCHW% try\%ARCHW%
|
2009-07-12 20:19:43 -04:00
|
|
|
exit /b 0
|