More fixes for ios-static

This commit is contained in:
pancake 2016-09-12 21:13:24 +02:00
parent 496da56a9e
commit 7c1d783d4d
2 changed files with 23 additions and 11 deletions

View file

@ -16,6 +16,7 @@ endif
include ../../libr/socket/deps.mk
include ../../shlr/zip/deps.mk
include ../../shlr/gdb/deps.mk
include ../../shlr/bochs/deps.mk
clean::
rm -f $(BIN).$(EXT_SO) $(BIN).o

View file

@ -1,15 +1,20 @@
#!/bin/sh
if [ -z "${CPU}" ]; then
export CPU=arm64
export CPU=armv7
export CPU=arm64
export CPU=armv7
fi
[ -z "${MAKE}" ] && MAKE=make
[ -z "${MAKE_JOBS}" ] && MAKE_JOBS=12
# if set to 1 build without fork or debugger support
APPSTORE_FRIENDLY=0
export BUILD=1
PREFIX="/usr"
# PREFIX=/var/mobile
[ -z "${MAKE_JOBS}" ] && MAKE_JOBS=12
if [ ! -d sys/ios-include ]; then
(
cd sys && \
@ -23,33 +28,39 @@ export PATH=$(pwd)/sys:${PATH}
export CC=$(pwd)/sys/ios-sdk-gcc
# set only for arm64, otherwise it is armv7
# select ios sdk version
export IOSVER=8.3
export IOSVER=9.3
export IOSINC=$(pwd)/sys/ios-include
export CFLAGS=-O2
export USE_SIMULATOR=0
if [ "${APPSTORE_FRIENDLY}" = 1 ]; then
CFGFLAGS="--without-fork --without-debugger"
else
CFGFLAGS=""
fi
if true ; then
make clean
${MAKE} clean
cp -f plugins.tiny.cfg plugins.cfg
./configure --prefix=${PREFIX} --with-ostype=darwin \
--without-fork \
./configure --prefix="${PREFIX}" \
${CFGFLAGS} \
--with-ostype=darwin \
--without-pic --with-nonpic \
--with-compiler=ios-sdk \
--target=arm-unknown-darwin
fi
if [ $? = 0 ]; then
time make -j${MAKE_JOBS}
time ${MAKE} -j${MAKE_JOBS}
if [ $? = 0 ]; then
( cd binr/radare2 ; make ios_sdk_sign )
( cd binr/radare2 ; ${MAKE} ios_sdk_sign )
rm -rf /tmp/r2ios
make install DESTDIR=/tmp/r2ios
${MAKE} install DESTDIR=/tmp/r2ios
rm -rf /tmp/r2ios/usr/share/radare2/*/www/enyo/node_modules
( cd /tmp/r2ios && tar czvf ../r2ios-${CPU}.tar.gz ./* )
rm -rf sys/cydia/radare2/root
mkdir -p sys/cydia/radare2/root
sudo tar xpzvf /tmp/r2ios-${CPU}.tar.gz -C sys/cydia/radare2/root
( cd sys/cydia/radare2 ; sudo make clean ; sudo make )
( cd sys/cydia/radare2 ; sudo ${MAKE} clean ; sudo ${MAKE} )
fi
fi