2020-10-01 16:13:03 +02:00
# new rizin shell parser
2021-03-29 18:14:16 +01:00
subdir ( 'rizin-shell-parser' )
2019-11-06 10:33:23 +01:00
2018-07-09 16:58:38 +02:00
# handle bochs dependency
2018-02-20 11:33:19 +03:00
bochs_files = [
'bochs/src/libbochs.c'
2017-05-30 18:38:19 +02:00
]
2018-07-09 16:58:38 +02:00
bochs_inc = [ platform_inc , include_directories ( 'bochs/include' ) ]
2020-11-06 12:44:10 +08:00
librzbochs = static_library ( 'rzbochs' , bochs_files ,
2020-10-01 16:13:03 +02:00
dependencies : [ rz_util_dep ] ,
2018-07-09 16:58:38 +02:00
include_directories : bochs_inc ,
2018-02-20 11:33:19 +03:00
implicit_include_directories : false
2017-05-31 13:38:47 +02:00
)
2017-08-03 14:58:39 +02:00
2018-07-23 20:39:58 +03:00
bochs_dep = declare_dependency (
2020-10-01 16:13:03 +02:00
link_with : librzbochs ,
2018-07-23 20:39:58 +03:00
include_directories : bochs_inc
)
2018-07-09 16:58:38 +02:00
2021-12-11 13:30:01 +01:00
if get_option ( 'use_gpl' )
# handle qnx dependency
qnx_files = [
'qnx/src/core.c' ,
'qnx/src/packet.c' ,
'qnx/src/sigutil.c' ,
'qnx/src/utils.c' ,
]
qnx_inc = [ platform_inc , include_directories ( 'qnx/include' ) ]
librzqnx = static_library ( 'rzqnx' , qnx_files ,
dependencies : [ rz_util_dep , rz_socket_dep ] ,
include_directories : qnx_inc ,
implicit_include_directories : false
)
qnx_dep = declare_dependency (
link_with : librzqnx ,
include_directories : qnx_inc
)
2018-07-17 23:01:40 +02:00
endif
2017-05-30 18:38:19 +02:00
2020-08-24 08:01:10 -03:00
# handle winkd dependency
winkd_files = [
'winkd/iob_pipe.c' ,
2020-08-26 10:24:20 +08:00
'winkd/iob_net.c' ,
2020-08-24 08:01:10 -03:00
'winkd/kd.c' ,
'winkd/transport.c' ,
'winkd/winkd.c' ,
2017-05-31 13:38:47 +02:00
]
2020-08-24 08:01:10 -03:00
winkd_inc = [ platform_inc , include_directories ( 'winkd' ) ]
2018-07-09 16:58:38 +02:00
2021-07-04 22:27:57 +01:00
librzwinkd_deps = [ rz_util_dep , rz_socket_dep , rz_hash_dep , rz_crypto_dep ]
if host_machine . system ( ) == 'haiku'
librzwinkd_deps + = [
cc . find_library ( 'network' )
]
endif
2020-11-06 12:44:10 +08:00
librzwinkd = static_library ( 'rzwinkd' , winkd_files ,
2021-07-04 22:27:57 +01:00
dependencies : librzwinkd_deps ,
2020-08-24 08:01:10 -03:00
include_directories : winkd_inc ,
2018-02-20 11:33:19 +03:00
implicit_include_directories : false
2017-05-31 13:38:47 +02:00
)
2020-08-24 08:01:10 -03:00
winkd_dep = declare_dependency (
2020-10-01 16:13:03 +02:00
link_with : librzwinkd ,
2020-08-24 08:01:10 -03:00
include_directories : winkd_inc
2018-07-23 20:39:58 +03:00
)
2018-07-09 16:58:38 +02:00
# handle ar dependency
2018-02-20 11:33:19 +03:00
ar_files = [
'ar/ar.c'
2017-08-17 10:33:58 +02:00
]
2018-07-09 16:58:38 +02:00
ar_inc = [ platform_inc , include_directories ( [ 'ar' ] ) ]
2020-11-06 12:44:10 +08:00
librzar = static_library ( 'rzar' , ar_files ,
2020-10-01 16:13:03 +02:00
dependencies : [ rz_util_dep ] ,
2018-07-09 16:58:38 +02:00
include_directories : ar_inc ,
2018-02-20 11:33:19 +03:00
implicit_include_directories : false
2017-08-17 10:33:58 +02:00
)
2018-02-20 11:33:19 +03:00
2018-07-23 20:39:58 +03:00
ar_dep = declare_dependency (
2020-10-01 16:13:03 +02:00
link_with : librzar ,
2018-07-23 20:39:58 +03:00
include_directories : ar_inc
)
2018-10-12 12:20:18 +02:00
# handle ptrace-wrap dependency
if use_ptrace_wrap
subdir ( 'ptrace-wrap' )
endif
2019-07-20 12:50:27 +02:00
2019-10-27 18:24:22 -03:00
if host_machine . system ( ) == 'windows'
subdir ( 'w32dbg_wrap' )
endif
2019-07-20 12:50:27 +02:00
# handle mpc dependency
2021-02-12 22:57:14 +01:00
r = run_command ( py3_exe , check_meson_subproject_py , 'mpc' )
if r . returncode ( ) == 1 and get_option ( 'subprojects_check' )
error ( 'Subprojects are not updated. Please run `git clean -dxff subprojects/` to delete all local subprojects directories. If you want to compile against current subprojects then set option `subprojects_check=false`.' )
endif
2019-07-20 12:50:27 +02:00
2021-02-12 22:57:14 +01:00
mpc_proj = subproject ( 'mpc' , default_options : [ 'default_library=static' ] )
mpc_dep = mpc_proj . get_variable ( 'mpc_dep' )
2020-05-12 18:58:10 +09:00
# handle yxml dependency
2021-02-11 17:45:32 +01:00
r = run_command ( py3_exe , check_meson_subproject_py , 'yxml' )
if r . returncode ( ) == 1 and get_option ( 'subprojects_check' )
error ( 'Subprojects are not updated. Please run `git clean -dxff subprojects/` to delete all local subprojects directories. If you want to compile against current subprojects then set option `subprojects_check=false`.' )
endif
2020-05-12 18:58:10 +09:00
2021-02-11 17:45:32 +01:00
yxml_proj = subproject ( 'yxml' , default_options : [ 'default_library=static' ] )
2021-07-04 22:27:57 +01:00
yxml_dep = yxml_proj . get_variable ( 'yxml_dep' )