Skip to content

Commit

Permalink
Fix iOS build
Browse files Browse the repository at this point in the history
  • Loading branch information
radare committed Jun 4, 2015
1 parent d7f6b4f commit c0b1e5f
Show file tree
Hide file tree
Showing 12 changed files with 30 additions and 16 deletions.
2 changes: 1 addition & 1 deletion libr/asm/p/asm_msp430.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@ RAsmPlugin r_asm_plugin_msp430 = {
#ifndef CORELIB
struct r_lib_struct_t radare_plugin = {
.type = R_LIB_TYPE_ASM,
.data = &r_asm_plugin_propeller,
.data = &r_asm_plugin_msp430
};
#endif
5 changes: 3 additions & 2 deletions libr/asm/p/cr16.mk
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
OBJ_CR16=asm_cr16.o
OBJ_CR16+=../arch/cr16/cr16_disas.o
CFLAGS+=-I./arch/cr16
CR16_ROOT=$(LIBR)/asm/arch/cr16
OBJ_CR16+=$(CR16_ROOT)/cr16_disas.o
CFLAGS+=-I$(CR16_ROOT)


STATIC_OBJ+=${OBJ_CR16}
Expand Down
8 changes: 5 additions & 3 deletions libr/asm/p/ebc.mk
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
EBC_ROOT=$(LIBR)/asm/arch/ebc
OBJ_EBC=asm_ebc.o
OBJ_EBC+=../arch/ebc/ebc_disas.o
CFLAGS+=-I./arch/ebc/
OBJ_EBC+=$(EBC_ROOT)/ebc_disas.o
CFLAGS+=-I$(EBC_ROOT)

STATIC_OBJ+=${OBJ_EBC}
TARGET_EBC=asm_ebc.${EXT_SO}
Expand All @@ -9,5 +10,6 @@ ifeq ($(WITHPIC),1)
ALL_TARGETS+=${TARGET_EBC}

${TARGET_EBC}: ${OBJ_EBC}
${CC} ${LDFLAGS} ${CFLAGS} -o ${TARGET_EBC} ${OBJ_EBC}
${CC} ${LDFLAGS} ${CFLAGS} \
-o ${TARGET_EBC} ${OBJ_EBC}
endif
5 changes: 3 additions & 2 deletions libr/asm/p/h8300.mk
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
OBJ_H8300=asm_h8300.o
OBJ_H8300+=../arch/h8300/h8300_disas.o
CFLAGS+=-I./arch/h8300
H8300_ROOT=$(LIBR)/asm/arch/h8300
OBJ_H8300+=$(H8300_ROOT)/h8300_disas.o
CFLAGS+=-I$(H8300_ROOT)

STATIC_OBJ+=${OBJ_H8300}
TARGET_H8300=asm_h8300.${EXT_SO}
Expand Down
4 changes: 2 additions & 2 deletions libr/asm/p/msp430.mk
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
OBJ_MSP430=asm_msp430.o
OBJ_MSP430+=../arch/msp430/msp430_disas.o
CFLAGS+=-I./arch/msp430/
OBJ_MSP430+=$(LIBR)/asm/arch/msp430/msp430_disas.o
CFLAGS+=-I$(LIBR)/asm/arch/msp430/

STATIC_OBJ+=${OBJ_MSP430}
TARGET_MSP430=asm_msp430.${EXT_SO}
Expand Down
4 changes: 2 additions & 2 deletions libr/asm/p/v850.mk
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
OBJ_V850=asm_v850.o
OBJ_V850+=../arch/v850/v850_disas.o
CFLAGS+=-I./arch/v850
OBJ_V850+=$(LIBR)/asm/arch/v850/v850_disas.o
CFLAGS+=-I$(LIBR)/asm/arch/v850


STATIC_OBJ+=${OBJ_V850}
Expand Down
2 changes: 1 addition & 1 deletion libr/bin/p/elf.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ OBJ_ELF+=../format/elf/elf.o ../format/elf/elf_write.o

STATIC_OBJ+=${OBJ_ELF}
TARGET_ELF=bin_elf.${EXT_SO}
LINK+=-lr_db -L../../db
LINK+=-L../../db -lr_db

ifeq ($(WITHPIC),1)
ALL_TARGETS+=${TARGET_ELF}
Expand Down
1 change: 1 addition & 0 deletions libr/bin/p/te.mk
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ OBJ_TE=bin_te.o ../format/te/te.o

STATIC_OBJ+=${OBJ_TE}
TARGET_TE=bin_te.${EXT_SO}
LINK+=-L../../db -lr_db $(SHLR)/sdb/src/libsdb.a

ALL_TARGETS+=${TARGET_TE}

Expand Down
2 changes: 1 addition & 1 deletion sys/cydia/radare2/CONFIG
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PACKAGE=radare2
VERSION=0.9.8.git10
VERSION=0.9.8.git11
ARCH=iphoneos-arm
SECTION=user/shell
PRIORITY=optional
Expand Down
6 changes: 4 additions & 2 deletions sys/ios-cydia.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,16 @@ export IOSVER=8.3
export IOSINC=`pwd`/sys/ios-include
export CFLAGS=-O2

if true ; then
if false ; then
make clean
./configure --prefix=${PREFIX} --with-ostype=darwin \
--with-compiler=ios-sdk --target=arm-unknown-darwin
else
true
fi

if [ $? = 0 ]; then
time make -j4
time true # make -j4
if [ $? = 0 ]; then
( cd binr/radare2 ; make ios_sdk_sign )
rm -rf /tmp/r2ios
Expand Down
3 changes: 3 additions & 0 deletions sys/ios-sdk-gcc
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ LDFLAGS="-isysroot ${SDKROOT}"
# -Wl, -syslibroot ${SDKROOT}"
export PATH=${DEVROOT}/usr/bin:${SDKROOT}/Developer/usr/bin:${PATH}
CC=${DEVROOT}/usr/bin/gcc
CC="xcrun --sdk iphoneos gcc"
CXX="xcrun --sdk iphoneos g++"
LD=${CC}
export CC CXX LD
for a in ${CPU} ; do
CFLAGS="${CFLAGS} -arch ${a}"
done
Expand Down
4 changes: 4 additions & 0 deletions sys/ios-sdk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ export IOSINC=`pwd`/sys/ios-include
export CFLAGS=-O2
export USE_SIMULATOR=0

if [ "$1" = -s ]; then
exec $SHELL
fi

if true ; then
make clean
cp -f plugins.tiny.cfg plugins.cfg
Expand Down

0 comments on commit c0b1e5f

Please sign in to comment.