cd build."${dir}"
CC="${cc} ${flg}" CXX="${cxx} ${flg}" OBJCXX="${cxx} ${flg}" \
- ../configure "${flags[@]}" --prefix="/usr" "$@"
+ ../configure --enable-maintainer-mode "${flags[@]}" --prefix="/usr" "$@"
cd ..
}
-for arch in i386 x86_64; do
- configure "mac-${arch}" "${mac}" "-arch ${arch} -mmacosx-version-min=10.6" \
- CPPFLAGS="-I../readline" LDFLAGS="-L../readline"
-done
-
function build() {
local dir=$1
local sdk=$2
configure "${dir}" "${sdk}" "${flg}" "$@" --enable-static --with-pic
}
-for arch in i386; do
+for arch in i386 x86_64; do
+ build "osx-${arch}" "${mac}" "-arch ${arch} -mmacosx-version-min=10.6" \
+ CPPFLAGS="-I../readline" LDFLAGS="-L../readline"
+done
+
+for arch in i386 x86_64; do
build "sim-${arch}" iphonesimulator "-arch ${arch} -mios-simulator-version-min=4.0" \
OBJCXXFLAGS="-fobjc-abi-version=2 -fobjc-legacy-dispatch" \
CPPFLAGS="-I../libffi.${arch}/include" \
cpf="-I../libffi.${arch}/include"
ldf="-L.."
+ flg=()
if [[ ${arch} != armv6 ]]; then
- flg=(--disable-console)
+ flg+=(--disable-console)
else
- flg=(LTLIBAPR="../sysroot.ios/usr/lib/libapr-1.dylib")
- cpf+=" -I../sysroot.ios/usr/include -I../sysroot.ios/usr/include/apr-1"
+ flg+=(LTLIBGCC="-lgcc_s.1")
+ cpf+=" -include ${PWD}/xcode.h"
+ cpf+=" -mllvm -arm-reserve-r9"
+ cpf+=" -I../sysroot.ios/usr/include"
ldf+=" -L../sysroot.ios/usr/lib"
fi
- build "ios-${arch}" iphoneos "-arch ${arch} -miphoneos-version-min=2.0" --host=arm-apple-darwin10 \
+ if [[ ${arch} == arm64 ]]; then
+ min=7.0
+ else
+ min=2.0
+ #cpf+=" -mthumb"
+ fi
+
+ build "ios-${arch}" iphoneos "-arch ${arch} -miphoneos-version-min=${min}" --host=arm-apple-darwin10 \
CPPFLAGS="${cpf}" LDFLAGS="${ldf}" "${flg[@]}" --host=arm-apple-darwin10
done