OLD | NEW |
| (Empty) |
1 @echo off | |
2 | |
3 SET ASM=%1 | |
4 | |
5 if NOT X%PROCESSOR_ARCHITECTURE% == X goto defined | |
6 | |
7 echo Processor Architecture Undefined: defaulting to X86 | |
8 | |
9 goto X86 | |
10 | |
11 :defined | |
12 | |
13 if %PROCESSOR_ARCHITECTURE% == x86 goto X86 | |
14 | |
15 if %PROCESSOR_ARCHITECTURE% == IA64 goto IA64 | |
16 | |
17 if %PROCESSOR_ARCHITECTURE% == AMD64 goto AMD64 | |
18 | |
19 echo Processor Architecture Unrecognized: defaulting to X86 | |
20 | |
21 :X86 | |
22 echo Auto Configuring for X86 | |
23 | |
24 SET TARGET=VC-WIN32 | |
25 | |
26 if x%ASM% == xno-asm goto compile | |
27 echo Generating x86 for NASM assember | |
28 SET ASM=nasm | |
29 SET ASMOPTS=-DOPENSSL_IA32_SSE2 | |
30 | |
31 echo Bignum | |
32 cd crypto\bn\asm | |
33 perl bn-586.pl win32n %ASMOPTS% > bn_win32.asm | |
34 if ERRORLEVEL 1 goto error | |
35 perl co-586.pl win32n %ASMOPTS% > co_win32.asm | |
36 if ERRORLEVEL 1 goto error | |
37 perl mo-586.pl win32n %ASMOPTS% > mt_win32.asm | |
38 if ERRORLEVEL 1 goto error | |
39 cd ..\..\.. | |
40 | |
41 echo AES | |
42 cd crypto\aes\asm | |
43 perl aes-586.pl win32n %ASMOPTS% > a_win32.asm | |
44 if ERRORLEVEL 1 goto error | |
45 cd ..\..\.. | |
46 | |
47 echo DES | |
48 cd crypto\des\asm | |
49 perl des-586.pl win32n %ASMOPTS% > d_win32.asm | |
50 if ERRORLEVEL 1 goto error | |
51 cd ..\..\.. | |
52 | |
53 echo "crypt(3)" | |
54 | |
55 cd crypto\des\asm | |
56 perl crypt586.pl win32n %ASMOPTS% > y_win32.asm | |
57 if ERRORLEVEL 1 goto error | |
58 cd ..\..\.. | |
59 | |
60 echo Blowfish | |
61 | |
62 cd crypto\bf\asm | |
63 perl bf-586.pl win32n %ASMOPTS% > b_win32.asm | |
64 if ERRORLEVEL 1 goto error | |
65 cd ..\..\.. | |
66 | |
67 echo CAST5 | |
68 cd crypto\cast\asm | |
69 perl cast-586.pl win32n %ASMOPTS% > c_win32.asm | |
70 if ERRORLEVEL 1 goto error | |
71 cd ..\..\.. | |
72 | |
73 echo RC4 | |
74 cd crypto\rc4\asm | |
75 perl rc4-586.pl win32n %ASMOPTS% > r4_win32.asm | |
76 if ERRORLEVEL 1 goto error | |
77 cd ..\..\.. | |
78 | |
79 echo MD5 | |
80 cd crypto\md5\asm | |
81 perl md5-586.pl win32n %ASMOPTS% > m5_win32.asm | |
82 if ERRORLEVEL 1 goto error | |
83 cd ..\..\.. | |
84 | |
85 echo SHA1 | |
86 cd crypto\sha\asm | |
87 perl sha1-586.pl win32n %ASMOPTS% > s1_win32.asm | |
88 if ERRORLEVEL 1 goto error | |
89 perl sha512-sse2.pl win32n %ASMOPTS% > sha512-sse2.asm | |
90 if ERRORLEVEL 1 goto error | |
91 cd ..\..\.. | |
92 | |
93 echo RIPEMD160 | |
94 cd crypto\ripemd\asm | |
95 perl rmd-586.pl win32n %ASMOPTS% > rm_win32.asm | |
96 if ERRORLEVEL 1 goto error | |
97 cd ..\..\.. | |
98 | |
99 echo RC5\32 | |
100 cd crypto\rc5\asm | |
101 perl rc5-586.pl win32n %ASMOPTS% > r5_win32.asm | |
102 if ERRORLEVEL 1 goto error | |
103 cd ..\..\.. | |
104 | |
105 echo CPU-ID | |
106 cd crypto | |
107 perl x86cpuid.pl win32n %ASMOPTS% > cpu_win32.asm | |
108 if ERRORLEVEL 1 goto error | |
109 cd .. | |
110 | |
111 goto compile | |
112 | |
113 :IA64 | |
114 | |
115 echo Auto Configuring for IA64 | |
116 SET TARGET=VC-WIN64I | |
117 perl ms\uplink.pl win64i > ms\uptable.asm | |
118 if ERRORLEVEL 1 goto error | |
119 ias -o ms\uptable.obj ms\uptable.asm | |
120 if ERRORLEVEL 1 goto error | |
121 | |
122 goto compile | |
123 | |
124 :AMD64 | |
125 | |
126 echo Auto Configuring for AMD64 | |
127 SET TARGET=VC-WIN64A | |
128 perl ms\uplink.pl win64a > ms\uptable.asm | |
129 if ERRORLEVEL 1 goto error | |
130 ml64 -c -Foms\uptable.obj ms\uptable.asm | |
131 if ERRORLEVEL 1 goto error | |
132 | |
133 if x%ASM% == xno-asm goto compile | |
134 echo Generating x86_64 for ML64 assember | |
135 SET ASM=ml64 | |
136 | |
137 echo Bignum | |
138 cd crypto\bn\asm | |
139 perl x86_64-mont.pl x86_64-mont.asm | |
140 if ERRORLEVEL 1 goto error | |
141 cd ..\..\.. | |
142 | |
143 echo AES | |
144 cd crypto\aes\asm | |
145 perl aes-x86_64.pl aes-x86_64.asm | |
146 if ERRORLEVEL 1 goto error | |
147 cd ..\..\.. | |
148 | |
149 echo SHA | |
150 cd crypto\sha\asm | |
151 perl sha1-x86_64.pl sha1-x86_64.asm | |
152 if ERRORLEVEL 1 goto error | |
153 perl sha512-x86_64.pl sha256-x86_64.asm | |
154 if ERRORLEVEL 1 goto error | |
155 perl sha512-x86_64.pl sha512-x86_64.asm | |
156 if ERRORLEVEL 1 goto error | |
157 cd ..\..\.. | |
158 | |
159 echo CPU-ID | |
160 cd crypto | |
161 perl x86_64cpuid.pl cpuid-x86_64.asm | |
162 if ERRORLEVEL 1 goto error | |
163 cd .. | |
164 | |
165 :compile | |
166 | |
167 perl Configure %TARGET% fipscanisterbuild | |
168 pause | |
169 | |
170 echo on | |
171 | |
172 perl util\mkfiles.pl >MINFO | |
173 @if ERRORLEVEL 1 goto error | |
174 perl util\mk1mf.pl dll %ASM% %TARGET% >ms\ntdll.mak | |
175 @if ERRORLEVEL 1 goto error | |
176 | |
177 perl util\mkdef.pl 32 libeay > ms\libeay32.def | |
178 @if ERRORLEVEL 1 goto error | |
179 perl util\mkdef.pl 32 ssleay > ms\ssleay32.def | |
180 @if ERRORLEVEL 1 goto error | |
181 | |
182 nmake -f ms\ntdll.mak clean | |
183 nmake -f ms\ntdll.mak | |
184 @if ERRORLEVEL 1 goto error | |
185 | |
186 @echo. | |
187 @echo. | |
188 @echo. | |
189 @echo *************************** | |
190 @echo ****FIPS BUILD SUCCESS***** | |
191 @echo *************************** | |
192 | |
193 @goto end | |
194 | |
195 :error | |
196 | |
197 @echo. | |
198 @echo. | |
199 @echo. | |
200 @echo *************************** | |
201 @echo ****FIPS BUILD FAILURE***** | |
202 @echo *************************** | |
203 | |
204 :end | |
OLD | NEW |