cflags := @CPPFLAGS@ @CXXFLAGS@ -DYYDEBUG=1 $(filter -DHAVE_FFI% -DHAVE_READLINE% -DHAVE_HISTORY_H,@DEFS@)
objcxxflags := @OBJCXXFLAGS@
ldflags := @LDFLAGS@
+ltflags := @LTFLAGS@
library := @LIBS@ @LTLIBAPR@ @LTLIBICONV@
sed := @SED@
bison := @BISON@
$(libtool) --mode=compile $(objcxx) $(objcxxflags) $(cflags) -c -o $@ $<
libcycript.la: $(code)
- $(libtool) --mode=link $(cxx) $(ldflags) -o $@ $(filter %.lo,$^) $(library) $(link) -rpath $(libdir)
+ $(libtool) --mode=link $(cxx) $(ltflags) $(ldflags) -o $@ $(filter %.lo,$^) $(library) $(link) -rpath $(libdir)
$(ldid) $@
cycript: Console.lo libcycript.la $(inject)
- $(libtool) --mode=link $(cxx) $(ldflags) -o $@ $(filter %.lo,$^) libcycript.la $(link) -rpath $(libdir)
+ $(libtool) --mode=link $(cxx) $(ltflags) $(ldflags) -o $@ $(filter %.lo,$^) libcycript.la $(link) -rpath $(libdir)
$(entitle) cycript
package: $(deb)
TIME
_BASH
GMAKE
+LTFLAGS
ifGNUmake
PKG_CONFIG
CPP
apple) :
case $host_cpu in #(
- i386|x86_64) :
+ armv6|i386|x86_64) :
- for cy_arch in i386 x86_64; do
+ for cy_arch in armv6 i386 x86_64; do
cy_save_CXXFLAGS=$CXXFLAGS
for element in "-arch $cy_arch"; do
apple) :
case $host_cpu in #(
- i386|x86_64) :
+ armv6|i386|x86_64) :
- for cy_arch in i386 x86_64; do
+ for cy_arch in armv6 i386 x86_64; do
cy_save_CXXFLAGS=$CXXFLAGS
for element in "-arch $cy_arch"; do
PKG_PROG_PKG_CONFIG([0.22])
CHECK_GNU_MAKE
AC_SUBST([GMAKE], [$_cv_gnu_make_command])
+AC_SUBST([LTFLAGS])
AS_IF([test "x$GMAKE" = x], [AC_MSG_ERROR([You need GNU make])])
AC_PATH_PROGS([_BASH], [bash])
AS_IF([test "x$_BASH" = x], [AC_MSG_ERROR([You need GNU bash])])
AC_DEFUN([CY_CHECK_UNIVERSAL], [
AC_MSG_CHECKING([for universal binary support])
AS_CASE([$host_vendor], [apple], [
- AS_CASE([$host_cpu], [i386|x86_64], [
- for cy_arch in i386 x86_64; do
+ AS_CASE([$host_cpu], [armv6|i386|x86_64], [
+ for cy_arch in armv6 i386 x86_64; do
cy_save_CXXFLAGS=$CXXFLAGS
AC_LIB_APPENDTOVAR([CXXFLAGS], ["-arch $cy_arch"])
AC_TRY_LINK([], [], [
--- /dev/null
+#!/usr/bin/env bash
+
+mkdir -p sysroot.ios
+
+for deb in apr-lib_1.3.3-2 readline_6.0-7; do
+ deb=${deb}_iphoneos-arm.deb
+ #wget http://apt.saurik.com/debs/"${deb}"
+ tar=data.tar.lzma
+ ar -x "${deb}" "${tar}"
+ tar -C sysroot.ios -xf "${tar}"
+ rm -f "${tar}"
+done
+
+dev=/Developer/Platforms/iPhoneOS.platform/Developer
+export CC=${dev}/usr/bin/gcc
+export CXX=${dev}/usr/bin/g++
+
+flags_armv6=()
+flags_armv6+=(-isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk)
+
+flags_armv6+=(-Isysroot.ios/usr/include)
+flags_armv6+=(-Lsysroot.ios/usr/lib)
+
+flags=()
+for flag in "${flags_armv6[@]}"; do
+ flags+=(-Xarch_armv6 "${flag}")
+done
+
+cflags=${flags[*]}
+export CFLAGS=${cflags}
+export CXXFLAGS=${cflags}
+
+lflags=()
+for flag in "${flags[@]}"; do
+ lflags+=("-Xcompiler ${flag}")
+done
+
+lflags=${lflags[*]}
+export LTFLAGS=${lflags}
+
+./configure --prefix=/usr "$@"