mingw32.bat 1.8 KB

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