2012-11-25 16:25:43 -05:00
|
|
|
|
2014-03-26 16:19:54 -04:00
|
|
|
rem %1 = mpn directory (generic, x86\... or x86_64\...)
|
2012-11-25 16:25:43 -05:00
|
|
|
rem %2 = platform (win32 or x64)
|
|
|
|
@echo off
|
|
|
|
|
|
|
|
if /i "%2" EQU "win32" ((set platform=win32) & (set bdir=x86w\)) else ((set platform=x64) & (set bdir=x86_64w\))
|
|
|
|
set sdir=
|
|
|
|
if /i "%1" EQU "gc" ((set sdir=generic) & (set bdir=generic)) else (set sdir=%bdir%%1)
|
2014-08-04 17:26:50 -04:00
|
|
|
rem if not exist ..\mpn\%sdir% (call :seterr & echo ERROR: %1 is not supported & exit /b %errorlevel%)
|
2012-11-25 16:25:43 -05:00
|
|
|
|
|
|
|
echo.building MPIR for %1 (%platform%) from directory mpn\%sdir%
|
|
|
|
|
2014-03-27 11:58:13 -04:00
|
|
|
set cdir=cdata\mpn\%sdir%\
|
2012-11-25 16:25:43 -05:00
|
|
|
set sdir=..\mpn\%sdir%\
|
|
|
|
set bdir=..\mpn\%bdir%\
|
|
|
|
|
|
|
|
call gen_mpir_h %platform%
|
2014-03-27 11:58:13 -04:00
|
|
|
call gen_config_h %cdir%
|
2012-11-25 16:25:43 -05:00
|
|
|
|
|
|
|
if exist %sdir%\gmp-mparam.h (call out_copy_rename %sdir%\gmp-mparam.h ..\ gmp-mparam.h) else (
|
|
|
|
call out_copy_rename %bdir%\gmp-mparam.h ..\ gmp-mparam.h)
|
|
|
|
|
|
|
|
type ..\longlong_pre.h >tmp.h
|
|
|
|
type %bdir%\longlong_inc.h >>tmp.h
|
|
|
|
type ..\longlong_post.h >>tmp.h
|
|
|
|
call out_copy_rename tmp.h ..\ longlong.h
|
|
|
|
del tmp.h
|
|
|
|
|
|
|
|
exit /b 0
|
|
|
|
|
|
|
|
:seterr
|
|
|
|
exit /b 1
|