2009-03-25 19:53:26 +00:00
|
|
|
PKGNAME radare2
|
2019-05-15 09:17:03 +00:00
|
|
|
VERSION 3.6.0-git
|
2009-03-25 19:53:26 +00:00
|
|
|
CONTACT pancake ; pancake@nopcode.org
|
|
|
|
|
|
|
|
LANG_C!
|
|
|
|
|
2012-09-12 17:35:27 +00:00
|
|
|
ARG_DISABLE DEBUGGER debugger disable native debugger features ;
|
2009-04-19 20:55:25 +00:00
|
|
|
|
2010-01-15 12:02:54 +00:00
|
|
|
(( -ldl -dynamic ... ))
|
|
|
|
USE_DL
|
|
|
|
|
2016-02-06 22:14:05 +00:00
|
|
|
CHKPRG! PATCH patch
|
|
|
|
CHKPRG GIT git
|
2011-10-18 07:38:20 +00:00
|
|
|
CHKLIB magic
|
2011-10-18 16:12:17 +00:00
|
|
|
ARG_WITH USE_MAGIC sysmagic force to use system's magic ;
|
2011-10-18 07:38:20 +00:00
|
|
|
IFAND HAVE_LIB_MAGIC USE_MAGIC {
|
|
|
|
USE_LIB_MAGIC = 1 ;
|
2011-10-18 16:12:17 +00:00
|
|
|
LIBMAGIC = -lmagic ;
|
2011-10-18 07:38:20 +00:00
|
|
|
}{
|
|
|
|
USE_LIB_MAGIC = 0 ;
|
2018-01-29 10:36:59 +00:00
|
|
|
LIBMAGIC = '' ;
|
2011-10-18 07:38:20 +00:00
|
|
|
}
|
|
|
|
|
2019-05-07 10:47:27 +00:00
|
|
|
ARG_WITH CSNEXT capstone5 build next branch of the capstone repository ;
|
|
|
|
|
2015-04-09 22:17:30 +00:00
|
|
|
(( useful for static builds . see sys/static.sh ))
|
|
|
|
ARG_DISABLE LOADLIBS loadlibs disable loading plugins ;
|
|
|
|
|
2015-04-11 03:00:05 +00:00
|
|
|
ARG_WITHOUT HAVE_FORK fork disable fork ;
|
2019-02-14 23:16:33 +00:00
|
|
|
ARG_WITHOUT WANT_PTRACE_WRAP ptrace-wrap disable ptrace-wrap build ;
|
2015-04-11 03:00:05 +00:00
|
|
|
|
2018-05-28 15:14:49 +00:00
|
|
|
ARG_WITH WITH_LIBR libr build libr.a and libr.dylib ;
|
2018-05-09 21:31:52 +00:00
|
|
|
|
2015-02-16 19:51:24 +00:00
|
|
|
ARG_WITH WITH_CAPSTONE syscapstone force to use system-wide capstone ;
|
2018-10-01 14:08:47 +00:00
|
|
|
IF WITH_CAPSTONE {
|
|
|
|
PKGCFG CAPSTONE_CFLAGS CAPSTONE_LDFLAGS capstone
|
|
|
|
}
|
2015-02-16 19:51:24 +00:00
|
|
|
IFAND WITH_CAPSTONE HAVE_PKGCFG_CAPSTONE {
|
2014-06-24 15:47:38 +00:00
|
|
|
USE_CAPSTONE = 1 ;
|
|
|
|
}{
|
|
|
|
USE_CAPSTONE = 0 ;
|
|
|
|
}
|
2014-06-24 10:48:29 +00:00
|
|
|
|
2014-01-30 00:45:08 +00:00
|
|
|
CHKLIB z
|
|
|
|
CHKLIB zip
|
|
|
|
ARG_WITH USE_ZIP syszip force to use system's libzip and zlib ;
|
|
|
|
IFAND HAVE_LIB_Z USE_ZIP {
|
|
|
|
IF HAVE_LIB_ZIP {
|
|
|
|
USE_LIB_ZIP = 1 ;
|
|
|
|
LIBZIP = -lz -lzip ;
|
|
|
|
}{
|
|
|
|
USE_LIB_ZIP = 0 ;
|
2018-01-29 10:36:59 +00:00
|
|
|
LIBZIP = '' ; (( static linking to shlr/zip ))
|
2014-01-30 00:45:08 +00:00
|
|
|
}
|
|
|
|
}{
|
|
|
|
USE_LIB_ZIP = 0 ;
|
2018-01-29 10:36:59 +00:00
|
|
|
LIBZIP = '' ; (( static linking to shlr/zip ))
|
2014-01-30 00:45:08 +00:00
|
|
|
}
|
|
|
|
|
2018-08-06 13:18:50 +00:00
|
|
|
CHKLIB xxhash
|
|
|
|
ARG_WITH USE_XXHASH sysxxhash force to use system's xxhash ;
|
|
|
|
IFAND HAVE_LIB_XXHASH USE_XXHASH {
|
|
|
|
USE_LIB_XXHASH = 1 ;
|
|
|
|
LIBXXHASH = -lxxhash ;
|
|
|
|
}{
|
|
|
|
USE_LIB_XXHASH = 0 ;
|
|
|
|
LIBXXHASH = '' ;
|
|
|
|
}
|
|
|
|
|
2015-02-07 00:41:54 +00:00
|
|
|
ARG_WITHOUT WITH_GPL gpl do not build GPL code (grub, cxx, ... ) ;
|
|
|
|
|
2018-04-16 08:29:29 +00:00
|
|
|
CHKDECL sys/personality.h ADDR_NO_RANDOMIZE
|
2018-06-12 23:01:46 +00:00
|
|
|
CHKFNC c arc4random_uniform
|
2018-06-13 14:38:08 +00:00
|
|
|
CHKFNC c explicit_bzero
|
2018-12-02 23:32:39 +00:00
|
|
|
CHKFNC c explicit_memset
|
2018-11-28 16:08:09 +00:00
|
|
|
CHKFNC c clock_nanosleep
|
2018-04-16 08:29:29 +00:00
|
|
|
|
2018-01-10 14:08:35 +00:00
|
|
|
(( TODO must deprecate
|
2010-05-24 09:15:32 +00:00
|
|
|
CHKLIB gmp
|
|
|
|
ARG_WITHOUT HAVE_GMP gmp disable GMP dependency ;
|
|
|
|
IFNOT HAVE_GMP { HAVE_LIB_GMP = 0 ; }
|
2016-05-15 21:02:37 +00:00
|
|
|
HAVE_GMP = 0 ;
|
2012-12-14 16:46:33 +00:00
|
|
|
))
|
|
|
|
HAVE_LIB_GMP = 0 ;
|
2009-03-31 00:57:39 +00:00
|
|
|
|
2011-07-14 20:14:11 +00:00
|
|
|
CHKLIB ssl
|
2011-07-13 17:22:38 +00:00
|
|
|
PKGCFG SSL_CFLAGS SSL_LDFLAGS openssl
|
2013-03-26 12:50:05 +00:00
|
|
|
IFNOTNULL SSL_LDFLAGS {
|
2012-10-26 00:49:33 +00:00
|
|
|
HAVE_OPENSSL = 1 ;
|
|
|
|
}
|
|
|
|
(( ARG_WITHOUT HAVE_OPENSSL ssl disable openssl dependency ; ))
|
|
|
|
ARG_WITH WANT_OPENSSL openssl build with openssl if possible ;
|
|
|
|
IFAND WANT_OPENSSL HAVE_OPENSSL {
|
|
|
|
HAVE_OPENSSL = 1 ;
|
|
|
|
}{
|
|
|
|
HAVE_OPENSSL = 0 ;
|
|
|
|
}
|
2018-01-10 14:08:35 +00:00
|
|
|
IFNULL SSL_LDFLAGS {
|
2011-07-14 20:14:11 +00:00
|
|
|
IFNOT HAVE_LIB_SSL {
|
|
|
|
HAVE_OPENSSL = 0 ;
|
|
|
|
}{
|
|
|
|
SSL_LDFLAGS = -lssl ;
|
|
|
|
}
|
|
|
|
}
|
2010-07-16 21:13:34 +00:00
|
|
|
|
2019-01-19 23:06:34 +00:00
|
|
|
CHKVER libuv 1.0.0
|
|
|
|
IF HAVE_LIBUV_VERSION_1_0_0 {
|
|
|
|
PKGCFG LIBUV_CFLAGS LIBUV_LDFLAGS libuv
|
|
|
|
IFNOTNULL LIBUV_LDFLAGS {
|
|
|
|
HAVE_LIBUV = 1 ;
|
|
|
|
}{
|
|
|
|
HAVE_LIBUV = 0 ;
|
|
|
|
}
|
|
|
|
ARG_WITHOUT WANT_LIBUV libuv disable libuv dependency ;
|
|
|
|
IFNOT WANT_LIBUV {
|
|
|
|
HAVE_LIBUV = 0 ;
|
|
|
|
}
|
2018-09-17 10:07:00 +00:00
|
|
|
}{
|
|
|
|
HAVE_LIBUV = 0 ;
|
|
|
|
}
|
|
|
|
|
2012-08-27 15:02:58 +00:00
|
|
|
ARG_WITH USE_RPATH rpath use rpath to build ;
|
|
|
|
|
2009-04-03 11:11:17 +00:00
|
|
|
(( rules for the compiler ))
|
|
|
|
ARG_WITH USERCC=gcc compiler Define compiler to use (see mk/) ;
|
2013-06-07 11:21:51 +00:00
|
|
|
ARG_WITH USEROSTYPE=auto ostype Choose OS type ( gnulinux windows darwin haiku ) ;
|
2010-02-21 19:24:28 +00:00
|
|
|
|
|
|
|
(( TODO: throw error if unknown ostype ))
|
2010-07-03 01:35:26 +00:00
|
|
|
(( TODO: handle BSD os as different ostype? ))
|
2010-02-21 19:49:39 +00:00
|
|
|
IFEQ USEROSTYPE auto ; {
|
2015-11-23 01:36:02 +00:00
|
|
|
IFEQ HOST_OS mingw32_nt-6.2 ; {
|
|
|
|
USEROSTYPE = mingw32 ;
|
|
|
|
}{
|
2015-07-12 23:45:38 +00:00
|
|
|
IFEQ HOST_OS mingw32_nt ; {
|
2015-11-11 22:40:22 +00:00
|
|
|
USEROSTYPE = mingw32 ;
|
2015-07-12 23:45:38 +00:00
|
|
|
}{
|
2019-02-16 10:43:51 +00:00
|
|
|
IFEQ HOST_OS wsl ; {
|
|
|
|
USEROSTYPE = wsl ;
|
|
|
|
}{
|
2010-02-21 19:24:28 +00:00
|
|
|
IFEQ HOST_OS linux ; {
|
|
|
|
USEROSTYPE = gnulinux ;
|
|
|
|
}{
|
2011-04-13 14:39:44 +00:00
|
|
|
IFEQ HOST_OS gnu ; {
|
2011-04-18 20:46:21 +00:00
|
|
|
(( GNU / HURD ))
|
2011-04-13 14:39:44 +00:00
|
|
|
USEROSTYPE = gnulinux ;
|
2011-04-20 11:56:58 +00:00
|
|
|
HAVE_LIB_DL = 1 ;
|
|
|
|
DL_LIBS = -ldl ;
|
2011-04-13 14:39:44 +00:00
|
|
|
}{
|
2017-01-17 23:47:46 +00:00
|
|
|
IFEQ HOST_OS sunos ; {
|
|
|
|
USEROSTYPE = solaris ;
|
|
|
|
}{
|
2011-04-13 09:34:27 +00:00
|
|
|
IFEQ HOST_OS gnu/kfreebsd ; {
|
2015-10-25 02:53:55 +00:00
|
|
|
USEROSTYPE = bsd ;
|
2011-04-13 09:34:27 +00:00
|
|
|
}{
|
2010-07-03 01:35:26 +00:00
|
|
|
IFEQ HOST_OS netbsd ; {
|
2015-10-25 02:53:55 +00:00
|
|
|
USEROSTYPE = bsd ;
|
2010-07-03 01:35:26 +00:00
|
|
|
}{
|
|
|
|
IFEQ HOST_OS freebsd ; {
|
2015-10-25 02:53:55 +00:00
|
|
|
USEROSTYPE = bsd ;
|
2010-07-03 01:35:26 +00:00
|
|
|
}{
|
|
|
|
IFEQ HOST_OS openbsd ; {
|
2015-10-25 02:53:55 +00:00
|
|
|
USEROSTYPE = bsd ;
|
2010-07-03 01:35:26 +00:00
|
|
|
}{
|
|
|
|
IFEQ HOST_OS darwin ; {
|
|
|
|
USEROSTYPE = darwin ;
|
2019-02-16 10:43:51 +00:00
|
|
|
} } } } } } } } } } }
|
2010-02-21 19:24:28 +00:00
|
|
|
}
|
2009-04-03 11:11:17 +00:00
|
|
|
|
2011-10-18 07:38:20 +00:00
|
|
|
(( this hack is required for openbsd ports ))
|
2011-04-25 16:11:01 +00:00
|
|
|
ARG_WITH LIBVERSION=xxx libversion specify different libversion ;
|
2017-10-09 14:57:43 +00:00
|
|
|
ARG_WITHOUT HAVE_JEMALLOC jemalloc build without jemalloc ;
|
2010-01-12 18:57:33 +00:00
|
|
|
|
2011-04-25 16:11:01 +00:00
|
|
|
IFEQ LIBVERSION xxx ; {
|
2011-04-20 11:56:58 +00:00
|
|
|
LIBVERSION = $VERSION ;
|
|
|
|
}
|
|
|
|
|
2018-10-12 10:20:18 +00:00
|
|
|
IFEQ USEROSTYPE gnulinux ; {
|
|
|
|
HAVE_PTRACE = 1 ;
|
|
|
|
USE_PTRACE_WRAP = 1 ;
|
|
|
|
}{
|
2019-02-16 10:43:51 +00:00
|
|
|
IFEQ USEROSTYPE wsl ; {
|
2019-02-17 03:45:12 +00:00
|
|
|
BUILD = ${SPLIT_CPU}-unknown-linux-gnu ;
|
|
|
|
HOST = $BUILD ;
|
|
|
|
TARGET = $HOST ;
|
|
|
|
USEROSTYPE = gnulinux ;
|
2019-02-16 10:43:51 +00:00
|
|
|
HAVE_PTRACE = 1 ;
|
|
|
|
USE_PTRACE_WRAP = 0 ;
|
|
|
|
}{
|
2019-01-22 23:13:59 +00:00
|
|
|
IFEQ USEROSTYPE android ; {
|
|
|
|
HAVE_PTRACE = 1 ;
|
|
|
|
USE_PTRACE_WRAP = 1 ;
|
|
|
|
}{
|
2018-10-12 10:20:18 +00:00
|
|
|
IFEQ USEROSTYPE mingw32 ; {
|
|
|
|
HAVE_PTRACE = 0 ;
|
|
|
|
USE_PTRACE_WRAP = 0 ;
|
|
|
|
}{
|
|
|
|
IFEQ USEROSTYPE solaris ; {
|
|
|
|
HAVE_PTRACE = 0 ;
|
|
|
|
USE_PTRACE_WRAP = 0 ;
|
|
|
|
}{
|
|
|
|
HAVE_PTRACE = 1 ;
|
|
|
|
USE_PTRACE_WRAP = 0 ;
|
2019-02-16 10:43:51 +00:00
|
|
|
} } } } }
|
2018-10-12 10:20:18 +00:00
|
|
|
|
2018-10-21 12:56:56 +00:00
|
|
|
IFNOT DEBUGGER {
|
|
|
|
HAVE_PTRACE = 0 ;
|
|
|
|
}
|
|
|
|
|
2019-02-14 23:16:33 +00:00
|
|
|
IFEQ WANT_PTRACE_WRAP 0 ; {
|
|
|
|
USE_PTRACE_WRAP = 0 ;
|
|
|
|
}
|
|
|
|
|
2018-09-16 21:24:57 +00:00
|
|
|
ARG_WITH R_CHECKS_LEVEL=2 checks-level value between 0 and 3 to enable different level of assert (see R_CHECKS_LEVEL) ;
|
|
|
|
|
2018-10-12 10:20:18 +00:00
|
|
|
REPORT R_CHECKS_LEVEL PREFIX HAVE_LIB_GMP HAVE_OPENSSL HAVE_LIBUV USE_CAPSTONE HAVE_PTRACE USE_PTRACE_WRAP HAVE_FORK
|
2018-08-06 13:18:50 +00:00
|
|
|
VERSION USE_LIB_ZIP USE_LIB_MAGIC USE_LIB_XXHASH DEBUGGER CC USERCC HAVE_ARC4RANDOM_UNIFORM
|
2018-12-02 23:32:39 +00:00
|
|
|
HAVE_EXPLICIT_BZERO HAVE_EXPLICIT_MEMSET USEROSTYPE LIBVERSION BUILD HOST TARGET ;
|
2009-03-31 00:57:39 +00:00
|
|
|
|
2009-07-16 00:30:20 +00:00
|
|
|
(( TODO: Add the rest of .pc files here.. add a rule for acr? ))
|
2011-07-14 20:14:11 +00:00
|
|
|
SUBDIRS ./config-user.mk
|
|
|
|
libr/include/r_userconf.h
|
|
|
|
pkgcfg/r_io.pc
|
2011-09-09 23:30:03 +00:00
|
|
|
pkgcfg/r_magic.pc
|
2011-07-14 20:14:11 +00:00
|
|
|
pkgcfg/r_asm.pc
|
|
|
|
pkgcfg/r_bin.pc
|
|
|
|
pkgcfg/r_anal.pc
|
|
|
|
pkgcfg/r_hash.pc
|
|
|
|
pkgcfg/r_cons.pc
|
|
|
|
pkgcfg/r_core.pc
|
|
|
|
pkgcfg/r_lang.pc
|
|
|
|
pkgcfg/r_socket.pc
|
|
|
|
pkgcfg/r_debug.pc
|
|
|
|
pkgcfg/r_reg.pc
|
|
|
|
pkgcfg/r_config.pc
|
2016-10-26 23:02:26 +00:00
|
|
|
pkgcfg/r_flag.pc
|
2011-07-14 20:14:11 +00:00
|
|
|
pkgcfg/r_syscall.pc
|
|
|
|
pkgcfg/r_util.pc
|
|
|
|
pkgcfg/r_search.pc
|
|
|
|
pkgcfg/r_bp.pc
|
|
|
|
pkgcfg/r_parse.pc
|
|
|
|
pkgcfg/r_fs.pc
|
2018-01-10 14:08:35 +00:00
|
|
|
pkgcfg/r_egg.pc
|
|
|
|
pkgcfg/r_crypto.pc
|
2009-07-16 00:30:20 +00:00
|
|
|
;
|