forked from radareorg/radare2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.acr
163 lines (144 loc) · 3.52 KB
/
configure.acr
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
PKGNAME radare2
VERSION 0.10.4-git
CONTACT pancake ; [email protected]
LANG_C!
ARG_DISABLE DEBUGGER debugger disable native debugger features ;
(( -ldl -dynamic ... ))
USE_DL
CHKPRG! PATCH patch
CHKPRG GIT git
CHKLIB magic
ARG_WITH USE_MAGIC sysmagic force to use system's magic ;
IFAND HAVE_LIB_MAGIC USE_MAGIC {
USE_LIB_MAGIC = 1 ;
LIBMAGIC = -lmagic ;
}{
USE_LIB_MAGIC = 0 ;
LIBMAGIC = -lr_magic ;
}
(( useful for static builds . see sys/static.sh ))
ARG_DISABLE LOADLIBS loadlibs disable loading plugins ;
ARG_WITHOUT HAVE_FORK fork disable fork ;
ARG_WITH WITH_CAPSTONE syscapstone force to use system-wide capstone ;
PKGCFG CAPSTONE_CFLAGS CAPSTONE_LDFLAGS capstone
IFAND WITH_CAPSTONE HAVE_PKGCFG_CAPSTONE {
USE_CAPSTONE = 1 ;
}{
USE_CAPSTONE = 0 ;
}
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 ;
LIBZIP = -lrz ; (( static linking to shlr/zip ))
}
}{
USE_LIB_ZIP = 0 ;
LIBZIP = -lrz ; (( static linking to shlr/zip ))
}
ARG_WITHOUT WITH_GPL gpl do not build GPL code (grub, cxx, ... ) ;
(( TODO must deprecate
CHKLIB gmp
ARG_WITHOUT HAVE_GMP gmp disable GMP dependency ;
IFNOT HAVE_GMP { HAVE_LIB_GMP = 0 ; }
HAVE_GMP = 0 ;
))
HAVE_LIB_GMP = 0 ;
CHKLIB ssl
PKGCFG SSL_CFLAGS SSL_LDFLAGS openssl
IFNOTNULL SSL_LDFLAGS {
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 ;
}
IFNULL SSL_LDFLAGS {
IFNOT HAVE_LIB_SSL {
HAVE_OPENSSL = 0 ;
}{
SSL_LDFLAGS = -lssl ;
}
}
ARG_WITH USE_RPATH rpath use rpath to build ;
CHKLIB lua5.1
(( rules for the compiler ))
ARG_WITH USERCC=gcc compiler Define compiler to use (see mk/) ;
ARG_WITH USEROSTYPE=auto ostype Choose OS type ( gnulinux windows darwin haiku ) ;
(( TODO: throw error if unknown ostype ))
(( TODO: handle BSD os as different ostype? ))
IFEQ USEROSTYPE auto ; {
IFEQ HOST_OS mingw32_nt-6.2 ; {
USEROSTYPE = mingw32 ;
}{
IFEQ HOST_OS mingw32_nt ; {
USEROSTYPE = mingw32 ;
}{
IFEQ HOST_OS linux ; {
USEROSTYPE = gnulinux ;
}{
IFEQ HOST_OS gnu ; {
(( GNU / HURD ))
USEROSTYPE = gnulinux ;
HAVE_LIB_DL = 1 ;
DL_LIBS = -ldl ;
}{
IFEQ HOST_OS gnu/kfreebsd ; {
USEROSTYPE = bsd ;
}{
IFEQ HOST_OS netbsd ; {
USEROSTYPE = bsd ;
}{
IFEQ HOST_OS freebsd ; {
USEROSTYPE = bsd ;
}{
IFEQ HOST_OS openbsd ; {
USEROSTYPE = bsd ;
}{
IFEQ HOST_OS darwin ; {
USEROSTYPE = darwin ;
} } } } } } } } }
}
ARG_WITHOUT WITHPIC pic do not build libr as a program independent location ;
ARG_WITH WITHNONPIC nonpic build the library archives .a ;
(( this hack is required for openbsd ports ))
ARG_WITH LIBVERSION=xxx libversion specify different libversion ;
IFEQ LIBVERSION xxx ; {
LIBVERSION = $VERSION ;
}
REPORT PREFIX HAVE_LIB_GMP HAVE_OPENSSL USE_CAPSTONE HAVE_FORK
VERSION USE_LIB_ZIP USE_LIB_MAGIC DEBUGGER CC USERCC
USEROSTYPE LIBVERSION BUILD HOST TARGET ;
(( TODO: Add the rest of .pc files here.. add a rule for acr? ))
SUBDIRS ./config-user.mk
libr/include/r_userconf.h
pkgcfg/r_io.pc
pkgcfg/r_db.pc
pkgcfg/r_magic.pc
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
pkgcfg/r_flags.pc
pkgcfg/r_syscall.pc
pkgcfg/r_util.pc
pkgcfg/r_search.pc
pkgcfg/r_bp.pc
pkgcfg/r_parse.pc
pkgcfg/r_fs.pc
;