Skip to content

Commit

Permalink
* Do not link libr2.dylib in OSX
Browse files Browse the repository at this point in the history
  - Adapt -Wl,-R -> -L in OSX
* Comment some useless mk includes
  • Loading branch information
radare committed Feb 21, 2010
1 parent 931fa40 commit c6c829a
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 8 deletions.
3 changes: 2 additions & 1 deletion global.mk
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
RELEASE=1
DESTDIR=
OSTYPE?= # woot

COMPILER?=gcc
#COMPILER=mingw32-gcc
Expand All @@ -23,7 +22,9 @@ LIBDIR=${PREFIX}/lib
-include config-user.mk
-include ../config-user.mk
-include ../../config-user.mk
-include ../../../config-user.mk

-include mk/${COMPILER}.mk
-include ../mk/${COMPILER}.mk
-include ../../mk/${COMPILER}.mk
-include ../../../mk/${COMPILER}.mk
4 changes: 4 additions & 0 deletions libr/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@ libr: .objs libr2.${EXT_SO} libr2.${EXT_AR}

ifeq ($(WITHPIC),1)
libr2.${EXT_SO}:
ifeq ($(OSTYPE),darwin)
@echo Linkage of libr2.dylib is broken on OSX because of dupped .o in .objs extraction
else
${CC} ${LDFLAGS_LIB} ${PIC_CFLAGS} .objs/*.o -o libr2.${EXT_SO}
endif

libr2.${EXT_AR}:
@echo No archive libr.a. Try --without-pic in configure
Expand Down
4 changes: 4 additions & 0 deletions libr/config.mk.tail
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ LDFLAGS+=$(subst r_,-lr_,$(DEPS))
LDFLAGS+=$(subst r_,-L../,$(DEPS))
LDFLAGS+=$(subst r_,-lr_,$(BINDEPS))
LDFLAGS+=$(subst r_,-L../../,$(BINDEPS))
ifeq ($(OSTYPE),darwin)
BOO=-L../../
else
BOO=-Wl,-R../../
endif
LDFLAGS+=$(subst r_,${BOO},$(BINDEPS))
CFLAGS+=${PIC_CFLAGS}
LDFLAGS+=${PIC_CFLAGS}
Expand Down
12 changes: 5 additions & 7 deletions libr/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@
-include config.mk
-include ../config.mk
-include ../../config.mk
-include global.mk
-include ../global.mk
-include ../../global.mk
-include ../../mk/${COMPILER}.mk
-include ../../../mk/${COMPILER}.mk

#-include ../global.mk
#-include ../../global.mk

#-------------------------------------#
# Rules for libraries
Expand Down Expand Up @@ -85,8 +83,8 @@ else
# Rules for test programs

# XXX can this be removed?
include ../../../config-user.mk
include ../../../mk/${COMPILER}.mk
#include ../../../config-user.mk
#include ../../../mk/${COMPILER}.mk

CFLAGS+=-I../../include -DVERSION=\"${VERSION}\"

Expand Down

0 comments on commit c6c829a

Please sign in to comment.