1. 编译openssl
下载openssl, http://www.openssl.org/source/
我下载了openssl-1.0.1c ,解压。比如我解压到/Users/rick/rtmp/openssl下面
进入Terminal,执行
# cd /Users/rick/rtmp/openssl
(1)先编译armv6
# makdir openssl-armv6
# cd openssl-1.0.1c
# ./configure BSD-generic32 --openssldir=/Users/rick/rtmp/openssl/openssl-armv6
先把terminal放一边,我们进入openssl-1.0.1c目录里面,找到makefile,打开编辑,修改下面
#CC= gcc 改成 CC= /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc -arch armv6
# CFLAG=。。。里面多添加一项 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk
比如我的是:CC= /Applications/Xcode.app/Contents/Developer/usr/bin/gcc -arch armv6
CFLAG= -DOPENSSL_THREADS -pthread -D_THREAD_SAFE -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DTERMIOS -O3 -fomit-frame-pointer -Wall -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS