bld.bat 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. if "%ARCH%"=="32" (
  2. set OSSL_CONFIGURE=VC-WIN32
  3. ) ELSE (
  4. set OSSL_CONFIGURE=VC-WIN64A
  5. )
  6. REM Configure step
  7. REM
  8. REM Conda currently does not perform prefix replacement on Windows, so
  9. REM OPENSSLDIR cannot (reliably) be used to provide functionality such as a
  10. REM default configuration and standard CA certificates on a per-environment
  11. REM basis. Given that, we set OPENSSLDIR to a location with extremely limited
  12. REM write permissions to limit the risk of non-privileged users exploiting
  13. REM OpenSSL's engines feature to perform arbitrary code execution attacks
  14. REM against applications that load the OpenSSL DLLs.
  15. REM
  16. set PERL=%BUILD_PREFIX%\Library\bin\perl
  17. %BUILD_PREFIX%\Library\bin\perl configure %OSSL_CONFIGURE% ^
  18. --prefix=%LIBRARY_PREFIX% ^
  19. --openssldir="%CommonProgramFiles%\ssl" ^
  20. enable-legacy ^
  21. no-fips ^
  22. no-module ^
  23. no-zlib ^
  24. shared
  25. if errorlevel 1 exit 1
  26. REM Build step
  27. rem if "%ARCH%"=="64" (
  28. rem ml64 -c -Foms\uptable.obj ms\uptable.asm
  29. rem if errorlevel 1 exit 1
  30. rem )
  31. nmake
  32. if errorlevel 1 exit 1
  33. rem nmake -f ms\nt.mak
  34. rem if errorlevel 1 exit 1
  35. rem nmake -f ms\ntdll.mak
  36. rem if errorlevel 1 exit 1
  37. REM Testing step
  38. nmake test
  39. if errorlevel 1 exit 1
  40. REM Install software components only; i.e., skip the HTML docs
  41. nmake install_sw
  42. if errorlevel 1 exit 1
  43. REM Install support files for reference purposes. (Note that the way we
  44. REM configured OPENSSLDIR above makes these files non-functional.)
  45. nmake install_ssldirs OPENSSLDIR=%LIBRARY_PREFIX%\ssl
  46. if errorlevel 1 exit 1
  47. REM Install step
  48. rem copy out32dll\openssl.exe %PREFIX%\openssl.exe
  49. rem copy out32\ssleay32.lib %LIBRARY_LIB%\ssleay32_static.lib
  50. rem copy out32\libeay32.lib %LIBRARY_LIB%\libeay32_static.lib
  51. rem copy out32dll\ssleay32.lib %LIBRARY_LIB%\ssleay32.lib
  52. rem copy out32dll\libeay32.lib %LIBRARY_LIB%\libeay32.lib
  53. rem copy out32dll\ssleay32.dll %LIBRARY_BIN%\ssleay32.dll
  54. rem copy out32dll\libeay32.dll %LIBRARY_BIN%\libeay32.dll
  55. rem mkdir %LIBRARY_INC%\openssl
  56. rem xcopy /S inc32\openssl\*.* %LIBRARY_INC%\openssl\