Skip to content

Commit

Permalink
Finally fix the build on osx-ppc
Browse files Browse the repository at this point in the history
  • Loading branch information
radare committed Jun 6, 2016
1 parent 4f51606 commit 608b79d
Show file tree
Hide file tree
Showing 14 changed files with 27 additions and 16 deletions.
3 changes: 2 additions & 1 deletion libr/asm/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
include ../../global.mk

NAME=r_asm
DEPS=r_util r_parse r_db r_syscall r_lang
DEPS=r_db r_syscall r_lang r_util r_parse
DEPS+=r_flags r_cons r_reg r_anal
CFLAGS+=-DCORELIB -Iarch/include -Iarch -I../../shlr
CURDIR=p/

Expand Down
4 changes: 2 additions & 2 deletions libr/core/cmd_debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -983,8 +983,8 @@ static int cmd_debug_map(RCore *core, const char *input) {
case '=':
r_debug_map_sync (core->dbg);
r_debug_map_list_visual (core->dbg, core->offset,
r_config_get_i (core->config,
"scr.color"));
r_config_get_i (core->config, "scr.color"),
r_cons_get_size (NULL));
break;
}
return true;
Expand Down
2 changes: 1 addition & 1 deletion libr/core/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ R_API int r_core_bin_load(RCore *r, const char *filenameuri, ut64 baddr) {
}
if (r_config_get_i (r->config, "bin.libs")) {
ut64 libaddr = (r->assembler->bits == 64)
? 0x00007fff00000000
? 0x00007fff00000000LL
: 0x7f000000;
const char *lib;
RListIter *iter;
Expand Down
1 change: 1 addition & 0 deletions libr/core/p/anal.mk
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ ${CORE_TARGET_ANAL}: ${CORE_OBJ_ANAL}
${CC} $(call libname,core_anal) ${CFLAGS} \
-o core_anal.${EXT_SO} \
$(SHLR)/sdb/src/libsdb.a \
-L$(LIBR)/crypto -lr_crypto \
${CORE_OBJ_ANAL}
endif
4 changes: 3 additions & 1 deletion libr/core/p/java.mk
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@ CORE_TARGET_JAVA=core_java.${EXT_SO}

ifeq ($(WITHPIC),1)
ALL_TARGETS+=${CORE_TARGET_JAVA}
DEPS+=r_crypto

${CORE_TARGET_JAVA}: ${CORE_OBJ_JAVA}
${CC} $(call libname,core_java) ${CFLAGS} \
-o core_java.${EXT_SO} \
$(SHLR)/java/libr_java.a \
$(SHLR)/sdb/src/libsdb.a \
${CORE_OBJ_JAVA} ${CORE_SHARED2_JAVA}
${CORE_OBJ_JAVA} ${CORE_SHARED2_JAVA} \
-L$(LIBR)/crypto -lr_crypto
endif
2 changes: 1 addition & 1 deletion libr/crypto/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
NAME=r_crypto
DEPS=r_util
DEPS=r_hash r_util
CFLAGS+=-DCORELIB

include ../config.mk
Expand Down
2 changes: 1 addition & 1 deletion libr/crypto/p/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ include ../../../mk/platform.mk

LDFLAGS+=${LINK}

caca:
nop:

foo: all

Expand Down
1 change: 1 addition & 0 deletions libr/crypto/p/aes.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
OBJ_AES=crypto_aes.o crypto_aes_algo.o
DEPS+=r_util

STATIC_OBJ+=${OBJ_AES}
TARGET_AES=crypto_aes.${EXT_SO}
Expand Down
3 changes: 2 additions & 1 deletion libr/debug/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
include ../config.mk

NAME=r_debug
DEPS=r_reg r_db r_anal r_bp r_io r_parse r_cons r_syscall r_hash r_socket r_flags r_util
DEPS=r_reg r_db r_anal r_bp r_io r_parse r_cons r_syscall r_hash r_flags r_util
DEPS+=r_socket
CFLAGS+=-DCORELIB

#SDBPATH=../../shlr/sdb/src/
Expand Down
10 changes: 5 additions & 5 deletions libr/debug/map.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ R_API void r_debug_map_list(RDebug *dbg, ut64 addr, int rad) {
}
}

static void print_debug_map_ascii_art(RList *maps, ut64 addr, int use_color, PrintfCallback cb_printf, int bits) {
static void print_debug_map_ascii_art(RList *maps, ut64 addr, int use_color, PrintfCallback cb_printf, int bits, int cons_width) {
ut64 mul, min = -1, max = 0;
int width = r_cons_get_size (NULL) - 80;
int width = cons_width - 80;
RListIter *iter;
RDebugMap *map;
if (width < 1) width = 30;
Expand Down Expand Up @@ -137,17 +137,17 @@ static void print_debug_map_ascii_art(RList *maps, ut64 addr, int use_color, Pri
}
}

R_API void r_debug_map_list_visual(RDebug *dbg, ut64 addr, int use_color) {
R_API void r_debug_map_list_visual(RDebug *dbg, ut64 addr, int use_color, int cons_cols) {
if (dbg) {
if (dbg->maps) {
print_debug_map_ascii_art (dbg->maps, addr,
use_color, dbg->cb_printf,
dbg->bits);
dbg->bits, cons_cols);
}
if (dbg->maps_user) {
print_debug_map_ascii_art (dbg->maps_user,
addr, use_color,
dbg->cb_printf, dbg->bits);
dbg->cb_printf, dbg->bits, cons_cols);
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions libr/debug/p/native.mk
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ ${TARGET_PTRACE}: ${OBJ_PTRACE}
${LDFLAGS_LINKPATH}.. -L.. -lr_debug \
${LDFLAGS_LINKPATH}../../io -L../../io -lr_io \
${LDFLAGS_LINKPATH}../../bp -L../../bp -lr_bp \
${LDFLAGS_LINKPATH}../../db -L../../db -lr_db \
${LDFLAGS_LINKPATH}../../anal -L../../anal -lr_anal \
${LDFLAGS_LINKPATH}../../reg -L../../reg -lr_reg \
${LDFLAGS_LINKPATH}../../util -L../../util -lr_util \
${LDFLAGS_LINKPATH}../../syscall -L../../util -lr_syscall \
${OBJ_PTRACE}
4 changes: 3 additions & 1 deletion libr/egg/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
include ../config.mk

NAME=r_egg
DEPS=r_asm r_syscall r_db r_util
DEPS=r_asm r_syscall r_db r_util r_parse r_reg r_anal
DEPS+=r_flags r_cons
LINK+=$(SHLR)/java/libr_java.a

OBJS=egg.o lang.o
OBJS+=emit_x86.o
Expand Down
2 changes: 1 addition & 1 deletion libr/include/r_debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ R_API RDebugMap *r_debug_map_get(RDebug *dbg, ut64 addr);
R_API RDebugMap *r_debug_map_new (char *name, ut64 addr, ut64 addr_end, int perm, int user);
R_API void r_debug_map_free(RDebugMap *map);
R_API void r_debug_map_list(RDebug *dbg, ut64 addr, int rad);
R_API void r_debug_map_list_visual(RDebug *dbg, ut64 addr, int use_color);
R_API void r_debug_map_list_visual(RDebug *dbg, ut64 addr, int use_color, int cons_cols);

/* descriptors */
R_API RDebugDesc *r_debug_desc_new (int fd, char* path, int perm, int type, int off);
Expand Down
3 changes: 2 additions & 1 deletion libr/util/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,8 @@ R_API char *r_file_abspath(const char *file) {
if (!ret) ret = strdup (file);
#if __UNIX__
{
char *abspath = realpath (ret, NULL);
char *resolved_path = calloc(4096, 1); // TODO: use MAXPATH
char *abspath = realpath (ret, resolved_path);
if (abspath) {
free (ret);
ret = abspath;
Expand Down

0 comments on commit 608b79d

Please sign in to comment.