ios5.1编译带SSL的libcurl
来源:互联网 发布:视频推广软件 编辑:程序博客网 时间:2024/05/22 03:51
编译脚本:
# for iPhoneOS and iPhoneSimulator
#
# Created by Rockee on 2012-7-26.
# Copyright 2012 Rockee. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
###########################################################################
# Change values here #
# #
VERSION="7.26.0" #
SDK="5.1" #
DEVROOT="/Applications/Xcode.app/Contents/Developer/Platforms" #
# #
###########################################################################
# #
# Don't change anything under this line! #
# #
###########################################################################
CURRENTPATH=`pwd`
cd "/Users/**/opensorce/curl-${VERSION}"
BUILDPATH=`pwd`
buildit()
{
target=$1
platform=$2
export CC="${DEVROOT}/${platform}.platform/Developer/usr/bin/gcc"
export CFLAGS="-arch ${target} -isysroot ${DEVROOT}/${platform}.platform/Developer/SDKs/${platform}${SDK}.sdk -I/Users/**/openssl_armv7/include -L/Users/**/openssl_armv7/lib"
export CPP="${DEVROOT}/${platform}.platform/Developer/usr/bin/llvm-cpp-4.2"
export AR="${DEVROOT}/${platform}.platform/Developer/usr/bin/ar"
export RANLIB="${DEVROOT}/${platform}.platform/Developer/usr/bin/ranlib"
export LDFLAGS="-arch armv7 -isysroot ${DEVROOT}/${platform}.platform/Developer/SDKs/${platform}${SDK}.sdk -L/Users/**/openssl_armv7/lib"
./configure --disable-shared --enable-shared=no --with-random=/dev/urandom --with-ssl=/Users/zt/openssl_armv7/(这个是openssl的make install 后的目录) \
--host=${target}-apple-darwin10
make clean
make
$AR rv libcurl.${target}.a lib/*.o
$RANLIB libcurl.${target}.a
}
buildit armv7 iPhoneOS
echo "Build library..."
#lipo -create ${BUILDPATH}/libcurl.i386.a -output ${CURRENTPATH}/libcurl.a(可以把你的i386,armv6,armv7融合在一起)
#mkdir -p ${CURRENTPATH}/include
#cp -R ${BUILDPATH}/include ${CURRENTPATH}/
echo "Building done."
i这些关键字需要自己改的,
附上 openssl 的configue 和makefile的 改动
./Configure BSD-generic32 --openssldir=/Users/**/openssl_armv7
makefile 文件的部分改动
CC= /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc -arch armv7
CFLAG= -DOPENSSL_THREADS -pthread -D_THREAD_SAFE -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DTERMIOS -O3 -fomit-frame-pointer -Wall -arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk
DEPFLAG= -DOPENSSL_NO_GMP -DOPENSSL_NO_JPAKE -DOPENSSL_NO_MD2 -DOPENSSL_NO_RC5 -DOPENSSL_NO_RFC3779 -DOPENSSL_NO_STORE
make makeinstall
openssl_armv7文件夹脱出libssl.a libcryptto.a
大功告成!
- ios5.1编译带SSL的libcurl
- libcurl编译增加ssl功能
- Libcurl库支持SSL协议的编译方法
- centos编译libcurl库找不到ssl的问题
- vc2015 编译libcurl带openssl
- VC++ 编译libcurl 支持SSL,GZIP
- VC++ 编译libcurl 支持SSL,GZIP
- libcurl 编译指南(支持SSL)
- VC++ 编译libcurl 支持SSL,GZIP
- libcurl 编译指南(支持SSL)
- libCurl的编译
- libcurl的编译
- curL 下载Https 网页的内容 编译的libcurl 需支持ssl
- libcurl SSL
- mips交叉编译libcurl带http2.0
- ubuntu Nginx 编译 带ssl
- vs2015编译libcurl+ssl+zlib(MT静态版)
- 编译libcurl的7命令
- WCF同步和异步调用实例
- 其它数学知识及算法
- Android ApiDemos示例解析(103):Views->Auto Complete->5. Contacts with Hint
- oracle的正则表达式
- C++模板使用介绍
- ios5.1编译带SSL的libcurl
- assert functions in C/C++/C#
- 存储器管理(一)
- 实例案例二:创建数据库
- Android ApiDemos示例解析(104):Views->Auto Complete->6. Multiple Items
- 最简单git服务器搭建教程(Desktop Version)
- java checkstyle检查问题
- ASP.NET 根据TextBox输入的内容自动定位到ListBox中项
- ViewController的生命周期分析和使用