Skip to content

Instantly share code, notes, and snippets.

@jiangzhuo
Created September 12, 2013 03:35
Show Gist options
  • Save jiangzhuo/6532798 to your computer and use it in GitHub Desktop.
Save jiangzhuo/6532798 to your computer and use it in GitHub Desktop.
build openssl(openssl-1.0.1e) for iOS
//download openssl source from http://www.openssl.org/source/
//extract it to Desktop(or somewhere else)
cd openssl-1.0.1e
mkdir openssl_armv7
make clean
./configure BSD-generic32 --openssldir=/Users/<username>/Desktop/openssl-1.0.1e/openssl_armv7
//edit makefile
//change CC=gcc to CC= /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc
//add argument -arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk for CFLAG
make
make install
// now we got libcrypto.a and libssl.a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment