2010-07-06 13:20:03 -04:00
|
|
|
@echo off
|
2010-12-17 07:20:33 -05:00
|
|
|
echo creating mpir.h for %1
|
2011-11-21 15:30:25 -05:00
|
|
|
echo /* generated from gmp-h.in by gen_mpir_h.bat */>tmp.h
|
|
|
|
|
|
|
|
rem if /i "%1" EQU "x64" (
|
|
|
|
rem echo ^#ifndef _WIN64 >>tmp.h
|
|
|
|
rem echo ^#define _WIN64 >>tmp.h
|
|
|
|
rem echo ^#endif >>tmp.h
|
|
|
|
rem )
|
|
|
|
|
2010-08-23 16:45:26 -04:00
|
|
|
for /f "tokens=1,2 delims=@" %%a in (..\gmp-h.in) do (
|
2011-11-21 15:30:25 -05:00
|
|
|
if "%%a" NEQ "DEFN_LONG_LONG_LIMB" if "%%a" NEQ "DEFN_LONG_LONG_LIMB" if "%%a" NEQ "GMP_CC" if "%%a" NEQ "GMP_CFLAGS" (
|
|
|
|
if "%%b" EQU "GMP_NAIL_BITS" (
|
|
|
|
echo ^#ifdef _WIN32 >>tmp.h
|
|
|
|
echo ^# ifdef _WIN64 >>tmp.h
|
|
|
|
echo ^# define _LONG_LONG_LIMB 1 >>tmp.h
|
|
|
|
echo ^# define GMP_LIMB_BITS 64 >>tmp.h
|
|
|
|
echo ^# else >>tmp.h
|
|
|
|
echo ^# define GMP_LIMB_BITS 32 >>tmp.h
|
|
|
|
echo ^# endif >>tmp.h
|
|
|
|
echo ^# define __GMP_BITS_PER_MP_LIMB GMP_LIMB_BITS >>tmp.h
|
|
|
|
echo ^# define SIZEOF_MP_LIMB_T ^(GMP_LIMB_BITS ^>^> 3^) >>tmp.h
|
|
|
|
echo ^# define GMP_NAIL_BITS 0 >>tmp.h
|
|
|
|
echo ^#endif >>tmp.h
|
|
|
|
) else if "%%b" EQU "" echo %%a%%b>>tmp.h
|
2010-07-06 13:20:03 -04:00
|
|
|
)
|
|
|
|
)
|
2010-08-23 16:45:26 -04:00
|
|
|
call out_copy_rename tmp.h ..\ mpir.h
|
2011-11-21 15:30:25 -05:00
|
|
|
call out_copy_rename tmp.h ..\ gmp.h
|
2010-08-23 16:45:26 -04:00
|
|
|
del tmp.h
|