在MAC上为ios交叉编译mono的AOT工具

新的编译命令:

#!/bin/bash

BUILD_MAC_X64=1

BUILD_MAC_i386=1

BUILD_ARMv7_ANDROID=0

BUILD_I386_IOS_SIM=0

BUILD_ARMV7_IPHONE=0

BUILD_ARMV7S_IPHONE=0

BUILD_AOT_HOST_MAC_TARGET_ARMv7=0

BUILD_TARGET=mono_target

IOS_MIN_SDK=6.1

(

PWD=`pwd`

PREFIX=${PWD}/${BUILD_TARGET}

EXTRA_MAKE_FLAGS="-j4"

if [ $BUILD_MAC_X64 -eq 1 ]

then

echo "##################"

echo " x64 for MAC "

echo "##################"

(

rm -rf ${PREFIX}/mac/x64

make clean

./configure --prefix="${PREFIX}/mac/x64" --enable-nls=no --host=x86_64-apple-darwin

make ${EXTRA_MAKE_FLAGS}

make ${EXTRA_MAKE_FLAGS} install

)

echo "##################"

echo " x64 for MAC End"

echo "##################"

fi

if [ $BUILD_MAC_i386 -eq 1 ]

then

echo "##################"

echo " i386 for MAC "

echo "##################"

(

rm -rf ${PREFIX}/mac/i386

make clean

./configure --prefix="${PREFIX}/mac/i386" --enable-nls=no --host=i386-apple-darwin

make ${EXTRA_MAKE_FLAGS}

make ${EXTRA_MAKE_FLAGS} install

)

echo "##################"

echo " i386 for MAC End"

echo "##################"

fi

if [ $BUILD_AOT_HOST_MAC_TARGET_ARMv7 -eq 1 ]

then

echo "##################"

echo " Aot host MAC target armv7 "

echo "##################"

(

rm -rf ${PREFIX}/aot_host_mac_target_armv7

make clean

./configure --prefix="${PREFIX}/aot_host_mac_target_armv7" --enable-small-config=yes --with-ikvm-native=no --with-sigaltstack=no --with-tls=pthread --without-mcs-docs --disable-mcs-build --enable-nls=no --enable-minimal=profiler,logging,full_messages,reflection_emit,reflection_emit_save
--host=x86_64-apple-darwin --target=armv7-apple-darwin

make ${EXTRA_MAKE_FLAGS}

make ${EXTRA_MAKE_FLAGS} install

)

echo "##################"

echo " Aot host MAC target armv7 end"

echo "##################"

fi

if [ $BUILD_ARMv7_ANDROID -eq 1 ]

then

echo "##################"

echo " armv7 for android"

echo "##################"

(

rm -rf ${PREFIX}/android/ARMv7

make clean

export NDK=/Users/user/Desktop/Mono/android-ndk-r10e

#$NDK/build/tools/make-standalone-toolchain.sh --platform=android-19 --install-dir=/Users/user/Desktop/Mono/tmp/my-android-toolchain --arch=arm

export PATH=/Users/user/Desktop/Mono/tmp/my-android-toolchain/bin:$PATH

export CC="arm-linux-androideabi-gcc -DPLATFORM_ANDROID"

export CXX=arm-linux-androideabi-g++

export AR=arm-linux-androideabi-ar

export AS=arm-linux-androideabi-as

export CPP=arm-linux-androideabi-cpp

export LD=arm-linux-androideabi-ld

export RANLIB=arm-linux-androideabi-ranlib

export STRIP=arm-linux-androideabi-strip

export SYSROOT=$NDK/plarforms/android-19/arch-arm

./configure --prefix="${PREFIX}/android/ARMv7" --host=armv7-linux-androideabi --enable-minimal=profiler,logging --with-tls=pthread --with-monotouch=no --without-mcs-docs --with-sigaltstack=no --disable-mcs-build --enable-nls=no

make ${EXTRA_MAKE_FLAGS}

make ${EXTRA_MAKE_FLAGS} install

)

echo "##################"

echo " armv7 for android End "

echo "##################"

fi

XCODEDIR=`xcode-select --print-path`

IOS_SDK=$(xcodebuild -showsdks | grep iphoneos | sort | head -n 1 | awk ‘{print $NF}‘)

SIM_SDK=$(xcodebuild -showsdks | grep iphonesimulator | sort | head -n 1 | awk ‘{print $NF}‘)

IPHONEOS_PLATFORM=${XCODEDIR}/Platforms/iPhoneOS.platform

IPHONEOS_SYSROOT=${IPHONEOS_PLATFORM}/Developer/SDKs/${IOS_SDK}.sdk

IPHONESIMULATOR_PLATFORM=${XCODEDIR}/Platforms/iPhoneSimulator.platform

IPHONESIMULATOR_SYSROOT=${IPHONESIMULATOR_PLATFORM}/Developer/SDKs/${SIM_SDK}.sdk

CC=clang

CFLAGS="-O2 -std=gnu99 -DHOST_IOS"

CXX=clang

CXXFLAGS="${CFLAGS} -stdlib=libc++"

LDFLAGS="-stdlib=libc++"

LIBS="-lc++ -lc++abi"

CPP="xcrun -sdk iphoneos cpp"

AR="xcrun -sdk iphoneos ar rcu"

CPPFLAGS="${CFLAGS}"

if [ $BUILD_ARMV7_IPHONE -eq 1 ]

then

echo "##################"

echo " armv7 for iPhone"

echo "##################"

(

rm -rf ${PREFIX}/armv7

make clean

./configure  --enable-small-config=yes --with-ikvm-native=no --with-sigaltstack=no --with-tls=pthread --without-mcs-docs --disable-mcs-build --enable-nls=no --enable-minimal=profiler,logging,full_messages,reflection_emit,reflection_emit_save --build=x86_64-apple-darwin
--host=armv7-apple-darwin --prefix="${PREFIX}/armv7" CC=clang "CFLAGS=${CFLAGS} -miphoneos-version-min=${IOS_MIN_SDK} -arch armv7 -isysroot ${IPHONEOS_SYSROOT}" "CXX=${CXX}" "CXXFLAGS=${CXXFLAGS} -arch armv7 -isysroot ${IPHONEOS_SYSROOT}" LDFLAGS="-arch armv7
-miphoneos-version-min=${IOS_MIN_SDK} ${LDFLAGS}" "LIBS=${LIBS}"

make ${EXTRA_MAKE_FLAGS}

make ${EXTRA_MAKE_FLAGS} install

)

echo "##################"

echo " armv7 for iPhone end"

echo "##################"

fi

if [ $BUILD_ARMV7S_IPHONE -eq 1 ]

then

echo "###################"

echo " armv7s for iPhone"

echo "###################"

(

rm -rf ${PREFIX}/armv7s

make clean

./configure  --enable-small-config=yes --with-ikvm-native=no --with-sigaltstack=no --with-tls=pthread --without-mcs-docs --disable-mcs-build --enable-nls=no --enable-minimal=profiler,logging,full_messages,reflection_emit,reflection_emit_save --build=x86_64-apple-darwin
--host=armv7s-apple-darwin --prefix="${PREFIX}/armv7s" "CC=${CC}" "CFLAGS=${CFLAGS} -miphoneos-version-min=${IOS_MIN_SDK} -arch armv7s -isysroot ${IPHONEOS_SYSROOT}" "CXX=${CXX}" "CXXFLAGS=${CXXFLAGS} -arch armv7s -isysroot ${IPHONEOS_SYSROOT}" LDFLAGS="-arch
armv7s -miphoneos-version-min=${IOS_MIN_SDK} ${LDFLAGS}" "LIBS=${LIBS}"

make ${EXTRA_MAKE_FLAGS}

make ${EXTRA_MAKE_FLAGS} install

)

echo "###################"

echo " armv7s for iPhone end"

echo "###################"

fi

if [ $BUILD_I386_IOS_SIM -eq 1 ]

then

echo "###########################"

echo " i386 for iPhone Simulator"

echo "###########################"

(

rm -rf ${PREFIX}/sim

make clean

./configure  --enable-small-config=yes --with-ikvm-native=no --with-sigaltstack=no --with-tls=pthread --without-mcs-docs --disable-mcs-build --enable-nls=no --enable-minimal=profiler,logging,full_messages,reflection_emit,reflection_emit_save --build=x86_64-apple-darwin
--host=i386-apple-darwin --prefix="${PREFIX}/sim" "CC=${CC}" "CFLAGS=${CFLAGS} -miphoneos-version-min=${IOS_MIN_SDK} -arch i386 -isysroot ${IPHONESIMULATOR_SYSROOT}" "CXX=${CXX}" "CXXFLAGS=${CXXFLAGS} -arch i386 -isysroot ${IPHONESIMULATOR_SYSROOT}" LDFLAGS="-arch
i386 -miphoneos-version-min=${IOS_MIN_SDK} ${LDFLAGS}" "LIBS=${LIBS}"

make ${EXTRA_MAKE_FLAGS}

make ${EXTRA_MAKE_FLAGS} install

)

echo "###########################"

echo " i386 for iPhone Simulator end"

echo "###########################"

fi

) 2>&1

#) >build.log 2>&1

echo "done"

时间: 2024-11-05 16:07:39

在MAC上为ios交叉编译mono的AOT工具的相关文章

MAC上搭建IOS自动化环境

Mac上搭建RF环境步骤(以及一些坑): mac自带python环境,python --version 检查python环境. 注意:         1.不要使用mac自带的python环境,因为自带的是64位的,wxPython需要只有32位的,所以python使用32位的(自己下载32 python 2.7安装).         2.不要卸载mac自带的python环境,mac中的某些应用会用到python         3.安装完32位的python环境之后,命令行验证python的

【IOS开发】如何在一台mac上进行ios开发

1.CertificateSigningRequest.certSigningRequest文件,一直以为这个文件和IOS开发有关系,原来不是的,你只要有苹果用户就算不是开发者也可以得到这个文件.(就因为这一点,所以我一开始一直很乱不知道怎么回事.) 2.进入开发者平台 3.从上到下1,2,3,4下来就OK 1)cer需要刚刚得到的CertificateSigningRequest.certSigningRequest文件: 2)配置iOS App IDs,就是ios应用中的Targets–ge

在Mac上运行ASP.NET 5

原文:http://stephenwalther.com/archive/2015/02/03/asp-net-5-and-angularjs-part-7-running-on-a-mac 这篇文章中, 我会把之前的ASP.NET 5 项目在我的Mac上运行起来. 安装 Mono 首先你得安装Mono. Mono项目独立于Microsoft. Mono是一个.NET运行在Mac OSX和Linux上的开源实现. http://www.mono-project.com/download/ 安装M

cheatsheet——mac 上的一款可以显示软件所有快捷键的小工具

https://www.mediaatelier.com/CheatSheet/ 发现一款可以显示 mac 上各种软件所有快捷键的小工具:cheatsheet,只要长按 command 键就可以了~ 快快下载下来试试吧!!

Mac上配置GTK环境

Mac上配置GTK环境 安装command line工具, 如果安装了Xcode, 就直接跳过该步骤 安装Homebrew 使用brew install pkg-config 使用brew install gtk+3 使用clang编译时, 使用clang 'pkg-config --libs --cflags gtk+-3.0' main.c 原文地址:https://www.cnblogs.com/caijunchao/p/10686703.html

iOS逆向工程之Reveal工具的安装、配置与使用

今天博客内容比较简单,不过还是蛮重要的.经常有小伙伴在QQ上私下问我,说博客中是如何使用Reveal查看AppStore中下载应用的UI层级的,那么就在今天这篇博客中作为一个主题来统一的介绍一下吧.虽然网上相关资料一抓一大把,不过还是有必要详细的总结一下的. 还是那句话,“工欲善其事,必先利其器”,在之前的多篇博客中不止一次用到这个强大的分析工具Reveal,之前我们用它来查看自己App以及从AppStore中下载的App的UI层级,效果都是非常不错的.Reveal在逆向工程中不仅仅是用来查看U

图文教程:在Mac上搭建Titanium的iOS开发环境

http://mobile.51cto.com/web-317170_all.htm 跨平台开发工具Titanium的兴起之路:HTML 5是最大威胁 比较Titanium和PhoneGap两大iOS移动应用开发框架 跨平台移动Web开发工具 Titanium Mobile简介 图文教程:在Windows 7上搭建Titanium Mobile开发环境 Titanium架构分析图文教程:在Mac上搭建Titanium的iOS开发环境,码迷,mamicode.com

Mono 4.0 Mac上运行asp.net mvc 5.2.3

Mono 4.0 已经发布,二进制包已经准备好,具体的发布说明参见:http://www.mono-project.com/docs/about-mono/releases/4.0.0/. 今天在Mac上更新了Mono 4 和Xamarin Studio 5.9. 使用Xamarin Studio 创建了一个asp.net mvc 项目: 模版使用的是5.2.0 版本的,目标框架是Mono/.NET 4.5,我通过Nuget 更新到了5.2.3 , 更新包的过程中需要调整下web.config

appium1.6在mac上环境搭建启动ios模拟器上Safari浏览器

前言 在mac上搭建appium踩了不少坑,先是版本低了,启动后无限重启模拟器.后来全部升级最新版本,就稳稳的了. 环境准备: 1.OS版本号10.12 2.xcode版本号8.3.2 3.appium版本号1.6.4(appium-desktop1.1.0) 4.ios模拟器版本号10.3 一.OS10.12 1.这里Mac上的OS系统一定要升级到10.12,低于10.12是无法安装8.3.2的xcode版本的 2.下载地址:https://www.apple.com/macos/sierra