1@rem OpenSSL with Mingw32+GNU as
2@rem ---------------------------
3
4perl Configure mingw %1 %2 %3 %4 %5 %6 %7 %8
5
6@echo off
7
8perl -e "exit 1 if '%1' eq 'no-asm'"
9if errorlevel 1 goto noasm
10
11echo Generating x86 for GNU assember
12
13echo Bignum
14cd crypto\bn\asm
15perl bn-586.pl gaswin > bn-win32.s
16perl co-586.pl gaswin > co-win32.s
17cd ..\..\..
18
19echo DES
20cd crypto\des\asm
21perl des-586.pl gaswin > d-win32.s
22cd ..\..\..
23
24echo crypt
25cd crypto\des\asm
26perl crypt586.pl gaswin > y-win32.s
27cd ..\..\..
28
29echo Blowfish
30cd crypto\bf\asm
31perl bf-586.pl gaswin > b-win32.s
32cd ..\..\..
33
34echo CAST5
35cd crypto\cast\asm
36perl cast-586.pl gaswin > c-win32.s
37cd ..\..\..
38
39echo RC4
40cd crypto\rc4\asm
41perl rc4-586.pl gaswin > r4-win32.s
42cd ..\..\..
43
44echo MD5
45cd crypto\md5\asm
46perl md5-586.pl gaswin > m5-win32.s
47cd ..\..\..
48
49echo SHA1
50cd crypto\sha\asm
51perl sha1-586.pl gaswin > s1-win32.s
52cd ..\..\..
53
54echo RIPEMD160
55cd crypto\ripemd\asm
56perl rmd-586.pl gaswin > rm-win32.s
57cd ..\..\..
58
59echo RC5\32
60cd crypto\rc5\asm
61perl rc5-586.pl gaswin > r5-win32.s
62cd ..\..\..
63
64:noasm
65
66echo Generating makefile
67perl util\mkfiles.pl >MINFO
68perl util\mk1mf.pl gaswin Mingw32 >ms\mingw32a.mak
69echo Generating DLL definition files
70perl util\mkdef.pl 32 libeay >ms\libeay32.def
71if errorlevel 1 goto end
72perl util\mkdef.pl 32 ssleay >ms\ssleay32.def
73if errorlevel 1 goto end
74
75rem copy ms\tlhelp32.h outinc
76
77echo Building the libraries
78mingw32-make -f ms/mingw32a.mak
79if errorlevel 1 goto end
80
81echo Generating the DLLs and input libraries
82dllwrap --dllname libeay32.dll --output-lib out/libeay32.a --def ms/libeay32.def out/libcrypto.a -lws2_32 -lgdi32
83if errorlevel 1 goto end
84dllwrap --dllname libssl32.dll --output-lib out/libssl32.a --def ms/ssleay32.def out/libssl.a out/libeay32.a
85if errorlevel 1 goto end
86
87echo Done compiling OpenSSL
88
89:end
90
91