summaryrefslogtreecommitdiffstats
path: root/ms/do_fips.bat
blob: 73b0a3e8e47e6eb96a5757103a0958f5126aa997 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
@echo off

SET ASM=%1
SET EXARG=

if NOT X%PROCESSOR_ARCHITECTURE% == X goto defined 

echo Processor Architecture Undefined: defaulting to X86

goto X86

:defined

if %PROCESSOR_ARCHITECTURE% == x86 goto X86

if %PROCESSOR_ARCHITECTURE% == IA64 goto IA64

if %PROCESSOR_ARCHITECTURE% == AMD64 goto AMD64

echo Processor Architecture Unrecognized: defaulting to X86

:X86
echo Auto Configuring for X86

SET TARGET=VC-WIN32
if x%ASM% == xno-asm goto compile
SET ASM=nasm

goto compile

:IA64

echo Auto Configuring for IA64
SET TARGET=VC-WIN64I

goto compile

:AMD64

echo Auto Configuring for AMD64
SET TARGET=VC-WIN64A
if x%ASM% == xno-asm goto compile
SET ASM=nasm

:compile

if x%ASM% == xno-asm SET EXARG=no-asm
perl Configure %TARGET% %EXARG% fipscheck
pause

echo on

perl util\mkfiles.pl >MINFO
@if ERRORLEVEL 1 goto error
perl util\mk1mf.pl dll %ASM% %TARGET% >ms\ntdll.mak
@if ERRORLEVEL 1 goto error

nmake -f ms\ntdll.mak clean
nmake -f ms\ntdll.mak
@if ERRORLEVEL 1 goto error
nmake -f ms\ntdll.mak install
@if ERRORLEVEL 1 goto error

@echo.
@echo.
@echo.
@echo ***************************
@echo ****FIPS BUILD SUCCESS*****
@echo ***************************

@goto end

:error

@echo.
@echo.
@echo.
@echo ***************************
@echo ****FIPS BUILD FAILURE*****
@echo ***************************

:end