diff --git a/binr/ravc2/Makefile b/binr/ravc2/Makefile index a8f7d8e8db..e016b1e575 100644 --- a/binr/ravc2/Makefile +++ b/binr/ravc2/Makefile @@ -3,8 +3,11 @@ BINDEPS=r_core r_main include ../rules.mk include ../../libr/main/deps.mk +include ../../libr/util/deps.mk include ../../shlr/zip/deps.mk include ../../shlr/java/deps.mk include ../../shlr/gdb/deps.mk LDFLAGS+=$(LINK) + +LDFLAGS+=-lexecinfo diff --git a/libr/debug/Makefile b/libr/debug/Makefile index 0ca51a4a34..ab079daece 100644 --- a/libr/debug/Makefile +++ b/libr/debug/Makefile @@ -5,6 +5,8 @@ R2DEPS=r_reg r_anal r_bp r_io r_parse r_cons r_syscall r_hash r_flag r_util r_eg R2DEPS+=r_socket CFLAGS+=-DR2_PLUGIN_INCORE +include ../util/deps.mk + ifeq (${BUILD_OS},serenityos) LDFLAGS+= else @@ -12,6 +14,7 @@ ifeq ($(OSTYPE),bsd) LDFLAGS+=-lkvm endif endif +LDFLAGS+=-lexecinfo foo: @${MAKE} libs diff --git a/libr/util/Makefile b/libr/util/Makefile index e56926b77f..5bb49875a6 100644 --- a/libr/util/Makefile +++ b/libr/util/Makefile @@ -4,13 +4,6 @@ NAME=r_util CFLAGS+=-DR2_PLUGIN_INCORE -I$(TOP)/shlr PCLIBS=@LIBZIP@ @DL_LIBS@ -ifneq ($(OSTYPE),darwin) -ifneq ($(OSTYPE),haiku) -LDFLAGS+=-lm -LINK=-lm -endif -endif - OBJS=binheap.o mem.o unum.o str.o hex.o file.o range.o charset.o OBJS+=prof.o cache.o sys.o buf.o sys_w32.o ubase64.o base85.o base91.o OBJS+=list.o flist.o chmod.o graph.o event.o alloc.o donut.o print_code.o diff --git a/libr/util/deps.mk b/libr/util/deps.mk index 40580bc598..b14811a27c 100644 --- a/libr/util/deps.mk +++ b/libr/util/deps.mk @@ -12,9 +12,10 @@ endif # FreeBSD 10.0 ships with backtrace(3) in -lexecinfo ifeq (${BUILD_OS},freebsd) -ifneq ($(shell expr "`uname -r`" : '[0-9]\.'), 2) - LDFLAGS+=-lexecinfo -endif + ifneq ($(shell expr "`uname -r`" : '[0-9]\.'), 2) + LDFLAGS+=-lexecinfo + endif + LDFLAGS+=-lutil endif ifeq (${BUILD_OS},dragonfly) @@ -24,3 +25,11 @@ endif ifeq (${BUILD_OS},haiku) LDFLAGS+=-lexecinfo endif + +ifneq ($(OSTYPE),darwin) +ifneq ($(OSTYPE),haiku) +LDFLAGS+=-lm +LINK+=-lm +endif +endif + diff --git a/preconfigure b/preconfigure index c6c1ed0a93..e4220aea13 100755 --- a/preconfigure +++ b/preconfigure @@ -1,7 +1,7 @@ #!/bin/sh if [ ! -f config-user.mk ]; then printf "[*] Configuring the build system ... " - ./configure > /dev/null || exit 1 + ./configure || exit 1 fi printf "[*] Checking out capstone... " rm -rf shlr/capstone