ios|ios wolfssl编译

ios wolfssl编译

  1. 官网下载wolfssl源码
  2. 解压源码
  3. 进入源码目录,执行./autogen.sh生成configure
  4. 生成makefile:
    ./configure --enable-static=yes --enable-shared=no --enable-examples=disabled --enable-ipv6 --enable-ecc --enable-aesgcm --enable-hkdf --enable-chacha --enable-poly1305 --enable-alpn --enable-sni --enable-oldtls --enable-supportedcurves --enable-curve25519 --enable-opensslextra --enable-ecccustcurves --enable-sha512 --enable-lighty
  5. 编译armv7静态库:
    make CC=“clang -arch armv7” CFLAGS="-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk"
  6. 拷贝armv7静态库到自定义目录
  7. 编译arm64静态库
    make CC=“clang -arch arm64” CFLAGS="-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk"
  8. 拷贝arm64静态库到自定义目录
  9. 【ios|ios wolfssl编译】合并静态库:lipo armv7/libwolfssl.a arm64/libwolfssl.a -create -output ./libwolfssl.a

    推荐阅读