2010-07-06 13:20:03 -04:00
|
|
|
@echo off
|
2010-08-23 16:45:26 -04:00
|
|
|
echo /* generated from gmp-h.in by gen_mpt_h.bat */ >tmp.h
|
2010-08-28 06:03:41 -04:00
|
|
|
if /i "%1" EQU "win32" set bits=32
|
|
|
|
if /i "%1" EQU "x64" set bits=64
|
2010-08-23 16:45:26 -04:00
|
|
|
for /f "tokens=1,2 delims=@" %%a in (..\gmp-h.in) do (
|
2010-07-06 16:37:03 -04:00
|
|
|
if "%%a" NEQ "DEFN_LONG_LONG_LIMB" if "%%a" NEQ "GMP_CC" if "%%a" NEQ "GMP_CFLAGS" (
|
|
|
|
if "%%b" NEQ "LIBGMP_DLL" if "%%b" NEQ "CC" if "%%b" NEQ "CFLAGS" (
|
|
|
|
if "%%b" NEQ "HAVE_HOST_CPU_FAMILY_power" if "%%b" NEQ "HAVE_HOST_CPU_FAMILY_powerpc" (
|
|
|
|
if "%%b" EQU "BITS_PER_MP_LIMB" (
|
2010-08-23 16:45:26 -04:00
|
|
|
echo %%a %bits%>>tmp.h
|
2010-07-06 16:37:03 -04:00
|
|
|
) else if "%%b" EQU "GMP_NAIL_BITS" (
|
2010-08-23 16:45:26 -04:00
|
|
|
echo %%a 0 >>tmp.h
|
|
|
|
echo #define SIZEOF_MP_LIMB_T ^(GMP_LIMB_BITS ^>^> 3^)>>tmp.h
|
2010-08-28 06:03:41 -04:00
|
|
|
if "%1" EQU "win32" (
|
2010-08-23 16:45:26 -04:00
|
|
|
echo #if defined _LONG_LONG_LIMB>>tmp.h
|
|
|
|
echo # undef _LONG_LONG_LIMB>>tmp.h
|
|
|
|
echo #endif>>tmp.h
|
2010-07-06 16:37:03 -04:00
|
|
|
)
|
2010-08-28 06:03:41 -04:00
|
|
|
if "%1" EQU "x64" (
|
2010-08-23 16:45:26 -04:00
|
|
|
echo #if !defined _LONG_LONG_LIMB>>tmp.h
|
|
|
|
echo # define _LONG_LONG_LIMB 1 >>tmp.h
|
|
|
|
echo #endif>>.\tmp.h
|
2010-10-30 11:06:27 -04:00
|
|
|
echo #if !defined _WIN64>>tmp.h
|
|
|
|
echo #define _WIN64 >>.\tmp.h
|
|
|
|
echo #endif>>.\tmp.h
|
2010-07-06 13:20:03 -04:00
|
|
|
)
|
2010-08-23 16:45:26 -04:00
|
|
|
) else (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
|
|
|
|
del tmp.h
|