Skip to content

Instantly share code, notes, and snippets.

@xumingyong
Created February 8, 2012 07:41
Show Gist options
  • Select an option

  • Save xumingyong/1766559 to your computer and use it in GitHub Desktop.

Select an option

Save xumingyong/1766559 to your computer and use it in GitHub Desktop.
Build LibOpenssl with MinGW

Download openssl

http://www.openssl.org/source/openssl-0.9.8l.tar.gz

Extract openssl

Copy the openssl tarball into the `c:\mingw` directory
#cd mingw
#tar zxf openssl-0.9.8l.tar.gz

Make openssl libraries

#cd mingw/openssl-0.9.8l
after comment 1062 line in Configure file
[$IsMK1MF=1 if ($target eq "mingw" && $^O ne "cygwin" && !is_msys());]

#./Configure -no-idea -no-rc5 -no-mdc2 mingw

Edit Makefile and remove the "test:" and "tests:" sections

#rm -rf ./test
#cd crypto/
#find ./ -name "*.h" -exec cp {} ../include/openssl/ \;
#cd ../ssl/"
#find ./ -name "*.h" -exec cp {} ../include/openssl/ \;
#cd ..
#cp *.h include/openssl/
#find ./fips -type f -name "*.h" -exec cp {} include/openssl/ \;

Build

#make
#copy *.a c:\mingw\lib
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment