博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
cross compile ZThread for ios && android
阅读量:5119 次
发布时间:2019-06-13

本文共 2603 字,大约阅读时间需要 8 分钟。

success for android ,here is the Android.mk

LOCAL_PATH := $(realpath $(call my-dir)/../.. )include $(CLEAR_VARS)LOCAL_MODULE    := zthreadsLOCAL_CPP_EXTENSION := .cxx### Add all source file names to be included in lib separated by a whitespaceLOCAL_SRC_FILES := \ZThread/src/AtomicCount.cxx \ZThread/src/Condition.cxx \ZThread/src/ConcurrentExecutor.cxx \ZThread/src/CountingSemaphore.cxx \ZThread/src/FastMutex.cxx \ZThread/src/FastRecursiveMutex.cxx \ZThread/src/Mutex.cxx \ZThread/src/RecursiveMutexImpl.cxx \ZThread/src/RecursiveMutex.cxx \ZThread/src/Monitor.cxx \ZThread/src/PoolExecutor.cxx \ZThread/src/PriorityCondition.cxx \ZThread/src/PriorityInheritanceMutex.cxx \ZThread/src/PriorityMutex.cxx \ZThread/src/PrioritySemaphore.cxx \ZThread/src/Semaphore.cxx \ZThread/src/SynchronousExecutor.cxx \ZThread/src/Thread.cxx \ZThread/src/ThreadedExecutor.cxx \ZThread/src/ThreadImpl.cxx \ZThread/src/ThreadLocalImpl.cxx \ZThread/src/ThreadQueue.cxx \ZThread/src/Time.cxx \ZThread/src/ThreadOps.cxxLOCAL_C_INCLUDES := $(LOCAL_PATH)/ZThread/include $(LOCAL_PATH)/ZThread/srcLOCAL_CPPFLAGS := -DANDROID -fexceptions -fpermissiveifeq ($(TARGET_ARCH_ABI),x86)LOCAL_CPPFLAGS += -fno-stack-protector endif#include $(BUILD_SHARED_LIBRARY)include $(BUILD_STATIC_LIBRARY)

 

 

 

更新 config.guess 和config.sub

http://opensource.apple.com/source/llvmgcc42/llvmgcc42-2118/config.guess?txt

http://opensource.apple.com/source/llvmgcc42/llvmgcc42-2336.9/config.sub

 

 

./configure --host="arm-apple-darwin10-llvm" --enable-static --disable-shared

  

./configure --prefix=/usr/local/iphone --host=arm-apple-darwin --enable-static=yes --enable-shared=no CC=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc  CFLAGS="-arch armv7 -pipe -mdynamic-no-pic -std=c99 -Wno-trigraphs -fpascal-strings -O2 -Wreturn-type -Wunused-variable -fmessage-length=0 -fvisibility=hidden -miphoneos-version-min=5.1 -I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/usr/include -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk" CPP=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-g++ AR=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ar LDFLAGS="-arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk -miphoneos-version-min=5.1"

 

 

关键是苹果没有像谷歌一样提供arm架构的一些库呀

转载于:https://www.cnblogs.com/maadiah/archive/2012/04/06/2434591.html

你可能感兴趣的文章
关于内存泄漏的一些点
查看>>
iOS开发:如何对使用了autolayout的UIView添加动画
查看>>
NVL NVL2 COALESCE NULLIF decode
查看>>
Android——ContentProvider
查看>>
响应式开发移动端入门必备知识
查看>>
groovy
查看>>
春花无实
查看>>
四则运算二
查看>>
Metasploit之多种后门生成
查看>>
install build essential
查看>>
Hadoop的shell脚本分析
查看>>
EasyUI系列学习(八)-ProgressBar(进度条)
查看>>
AL32UTF8 and UTF8 and ZHS16GBK
查看>>
luogu P1352 (树形dp)
查看>>
关于非二进制的补码与反码
查看>>
Timer的故事----Jdk源码解读
查看>>
Java 之 List<T> 接口的实现:ArrayList
查看>>
第二讲,NT头文件格式,以及文件头格式
查看>>
说说SPI协议
查看>>
Zookeeper简单介绍
查看>>