2010-07-12 11:53:49 -04:00
|
|
|
@echo off
|
|
|
|
echo building MPIR for %1
|
|
|
|
set sdir=
|
2010-08-28 06:03:41 -04:00
|
|
|
if /i "%1" EQU "gc" (set sdir=generic) && if "%2" EQU "x64" (set platform=x64) else (set platform=win32)
|
2010-07-12 11:53:49 -04:00
|
|
|
|
2010-08-28 06:03:41 -04:00
|
|
|
if /i "%1" EQU "core2" ((set sdir=x86_64w\core2) & (set platform=x64))
|
|
|
|
if /i "%1" EQU "k8" ((set sdir=x86_64w\k8) & (set platform=x64))
|
|
|
|
if /i "%1" EQU "k10" ((set sdir=x86_64w\k8\k10) & (set platform=x64))
|
|
|
|
if /i "%1" EQU "nehalem" ((set sdir=x86_64w\nehalem) & (set platform=x64))
|
2010-07-12 11:53:49 -04:00
|
|
|
|
2010-08-28 06:03:41 -04:00
|
|
|
if /i "%1" EQU "p0" ((set sdir=x86w\p0) & (set platform=win32))
|
|
|
|
if /i "%1" EQU "p3" ((set sdir=x86w\p3) & (set platform=win32))
|
|
|
|
if /i "%1" EQU "p4" ((set sdir=x86w\p4) & (set platform=win32))
|
2010-07-12 11:53:49 -04:00
|
|
|
|
2010-08-28 06:03:41 -04:00
|
|
|
if /i "%sdir%" EQU "" (call :seterr & echo ERROR: %1 is not supported & exit /b %errorlevel%)
|
2011-04-28 05:34:30 -04:00
|
|
|
if /i "%sdir%" EQU "generic" (set idir=%sdir%) else (set idir=x86_64w)
|
2010-07-12 11:53:49 -04:00
|
|
|
|
2010-08-23 16:45:26 -04:00
|
|
|
call gen_mpir_h %platform%
|
|
|
|
call gen_config_h ..\mpn\%sdir%\
|
|
|
|
call out_copy_rename ..\mpn\%sdir%\gmp-mparam.h ..\ gmp-mparam.h
|
2011-07-13 02:37:51 -04:00
|
|
|
type ..\longlong_pre.h >tmp.h
|
|
|
|
type ..\mpn\%idir%\longlong_inc.h >>tmp.h
|
|
|
|
type ..\longlong_post.h >>tmp.h
|
2011-04-28 05:34:30 -04:00
|
|
|
call out_copy_rename tmp.h ..\ longlong.h
|
|
|
|
del tmp.h
|
2010-07-12 11:53:49 -04:00
|
|
|
exit /b 0
|
|
|
|
|
|
|
|
:seterr
|
2010-08-23 16:45:26 -04:00
|
|
|
exit /b 1
|