mirror of
https://github.com/radareorg/radare2.git
synced 2024-11-26 22:50:48 +00:00
78 lines
1.8 KiB
Plaintext
78 lines
1.8 KiB
Plaintext
# config.mk.tail
|
|
|
|
-include ../../config-user.mk
|
|
-include ../../global.mk
|
|
-include ../../mk/${COMPILER}.mk
|
|
|
|
-include ../../../config-user.mk
|
|
-include ../../../global.mk
|
|
-include ../../../mk/${COMPILER}.mk
|
|
|
|
CFLAGS+=-DUSE_RIO=${USE_RIO}
|
|
CFLAGS+=${CFLAGS_APPEND}
|
|
|
|
ifeq ($(WITHPIC),1)
|
|
LDFLAGS+=$(subst r_,-lr_,$(DEPS))
|
|
LDFLAGS+=$(subst r_,-L../,$(DEPS))
|
|
LDFLAGS+=$(subst r_,-lr_,$(BINDEPS))
|
|
LDFLAGS+=$(subst r_,-L../../,$(BINDEPS))
|
|
CFLAGS+=${PIC_CFLAGS}
|
|
LDFLAGS+=${PIC_CFLAGS}
|
|
else
|
|
# TODO: is there somebody brave enought to replace this perl oneliner?
|
|
ifneq ($(DEPS),)
|
|
#LDFLAGS+=`echo "${DEPS} " | perl -ne 's,r_([^ ]*),../$$1/libr_$$1.a,g; print'`
|
|
LDFLAGS+=`echo $DEPS | awk '{gsub(/r_([^ ]*)/,"../&/lib&.a");gsub(/\/r_/,"\/");print}'`
|
|
endif
|
|
ifneq ($(BINDEPS),)
|
|
#LDFLAGS+=`echo "${BINDEPS} " | if [ -d ../../libr ]; then perl -ne 's,r_([^ ]*),../../libr/$$1/libr_$$1.a,g; print' ; else perl -ne 's,r_([^ ]*),../../$$1/libr_$$1.a,g; print' ; fi `
|
|
LDFLAGS+=`echo "${BINDEPS} " | if [ -d ../../libr ]; then echo $BINDEPS | awk '{gsub(/r_([^ ]*)/,"../../libr/&/lib&.a");gsub(/\/r_/,"\/");print}' ; else awk '{gsub(/r_([^ ]*)/,"../../&/lib&.a");gsub(/\/r_/,"\/");print}'; fi`
|
|
endif
|
|
endif
|
|
|
|
# Compiler: see mk/gcc.mk
|
|
# CC CFLAGS CC_LIB CC_AR LINK
|
|
|
|
# Debug
|
|
CFLAGS+=-g -Wall
|
|
|
|
# libgmp
|
|
ifeq (${HAVE_LIB_GMP},1)
|
|
CFLAGS+=-DHAVE_LIB_GMP=1
|
|
BN_LIBS=-lgmp
|
|
endif
|
|
|
|
# XXX do it in configure stage
|
|
OSTYPE?=gnulinux
|
|
# Output
|
|
ifeq (${OSTYPE},windows)
|
|
CFLAGS+=-D__WINDOWS__=1
|
|
EXT_AR=lib
|
|
EXT_SO=dll
|
|
EXT_EXE=.exe
|
|
TH_LIBS=
|
|
endif
|
|
ifeq (${OSTYPE},gnulinux)
|
|
CFLAGS+=-D__UNIX__=1
|
|
EXT_AR=a
|
|
EXT_SO=so
|
|
EXT_EXE=
|
|
TH_LIBS=-lpthread
|
|
endif
|
|
ifeq (${OSTYPE},darwin)
|
|
CFLAGS+=-D__UNIX__=1
|
|
EXT_AR=a
|
|
EXT_SO=dylib
|
|
EXT_EXE=
|
|
TH_LIBS=-lpthread
|
|
endif
|
|
|
|
ifeq (${EXT_SO},)
|
|
all:
|
|
@echo Unidentified platform; exit 1
|
|
endif
|
|
|
|
LIB=lib${NAME}
|
|
LIBAR=${LIB}.${EXT_AR}
|
|
LIBSO=${LIB}.${EXT_SO}
|