2018-07-09 22:58:38 +08:00
|
|
|
# handle capstone dependency
|
|
|
|
capstone_dep = dependency('capstone', version: '>=3.0.4', required: false)
|
|
|
|
if not capstone_dep.found() or not get_option('use_sys_capstone')
|
|
|
|
message('Use bundled capstone')
|
|
|
|
|
2018-08-10 16:31:17 +08:00
|
|
|
if get_option('capstone_in_builddir')
|
|
|
|
capstone_path = join_paths(meson.current_build_dir(), 'capstone')
|
|
|
|
else
|
2020-05-20 11:55:15 +08:00
|
|
|
capstone_path = 'capstone'
|
2018-08-10 16:31:17 +08:00
|
|
|
endif
|
|
|
|
|
2020-09-01 17:36:16 +08:00
|
|
|
capstone_version = get_option('use_capstone_version')
|
|
|
|
|
2018-07-23 20:39:10 +08:00
|
|
|
res = run_command(py3_exe, '-c', '__import__("sys").exit(__import__("os").path.exists("@0@"))'.format(capstone_path))
|
2018-07-09 22:58:38 +08:00
|
|
|
if res.returncode() == 0
|
|
|
|
if not git_exe.found()
|
|
|
|
error('Cannot load capstone library. Either provide capstone in ./shlr/capstone or install git, so it can be downloaded')
|
|
|
|
endif
|
|
|
|
|
2021-05-13 09:01:28 +08:00
|
|
|
patches_files = []
|
2018-07-30 14:51:47 +08:00
|
|
|
# NOTE: when you update CS_TIP or CS_BRA, also update them in shlr/Makefile
|
2020-09-01 17:36:16 +08:00
|
|
|
if capstone_version == 'v5'
|
2022-03-11 01:29:49 +08:00
|
|
|
CS_TIP = '31af3c3e3bf75ca5074715fe966094606c816ba6'
|
2019-05-07 18:47:27 +08:00
|
|
|
CS_BRA = 'next'
|
2021-05-13 09:01:28 +08:00
|
|
|
patches_files = [
|
|
|
|
'fix-x86-16.patch',
|
|
|
|
'mmm.patch'
|
|
|
|
]
|
2020-09-01 17:36:16 +08:00
|
|
|
elif capstone_version == 'v3'
|
|
|
|
CS_TIP = '61bf71c771680033651f16cff832446e421847b1'
|
|
|
|
CS_BRA = 'v3'
|
|
|
|
elif capstone_version == 'v4'
|
2021-05-20 05:05:41 +08:00
|
|
|
CS_TIP = 'a7cac8352f7397aa73bb2e2dcc1b6cdb2e1b8461'
|
2019-05-07 18:47:27 +08:00
|
|
|
CS_BRA = 'v4'
|
2021-05-13 09:01:28 +08:00
|
|
|
patches_files = [
|
|
|
|
'capstone-calloc.patch',
|
|
|
|
'fix-x86-16.patch',
|
|
|
|
'sparc-crash.patch',
|
|
|
|
'sstream-null.patch'
|
|
|
|
]
|
2020-09-01 17:36:16 +08:00
|
|
|
else
|
|
|
|
error('Wrong capstone version selected. Please use one of the supported versions.')
|
2019-05-07 18:47:27 +08:00
|
|
|
endif
|
2018-07-23 20:39:10 +08:00
|
|
|
|
2022-01-07 05:51:47 +08:00
|
|
|
capstone_git_user = 'capstone-engine'
|
2018-07-30 14:51:47 +08:00
|
|
|
|
|
|
|
message('Cloning capstone ' + CS_BRA + ' branch, commit ' + CS_TIP + ', into ' + capstone_path)
|
|
|
|
git_cmd = 'clone -b @0@ https://github.com/@1@/capstone.git @2@'.format(CS_BRA, capstone_git_user, capstone_path)
|
2018-07-23 20:39:10 +08:00
|
|
|
clone_cmd = run_command(git_exe, git_cmd.split())
|
|
|
|
if clone_cmd.returncode() != 0
|
|
|
|
error('Cannot execute git clone command')
|
|
|
|
endif
|
|
|
|
|
|
|
|
reset_cmd_str = '-C @0@ reset --hard @1@'.format(capstone_path, CS_TIP)
|
|
|
|
reset_cmd = run_command(git_exe, reset_cmd_str.split())
|
|
|
|
if reset_cmd.returncode() != 0
|
|
|
|
error('Cannot execute git reset command')
|
|
|
|
endif
|
2018-07-14 00:19:56 +08:00
|
|
|
|
|
|
|
message('Patching capstone with radare\'s patches')
|
|
|
|
foreach file : patches_files
|
2021-04-25 04:04:51 +08:00
|
|
|
patch_path = join_paths(meson.current_source_dir(), 'capstone-patches', capstone_version, file)
|
2018-07-23 20:39:10 +08:00
|
|
|
patch_cmd_str = '-C @0@ apply -p1 @1@'.format(capstone_path, patch_path)
|
|
|
|
patch_cmd = run_command(git_exe, patch_cmd_str.split())
|
|
|
|
if patch_cmd.returncode() != 0
|
2019-04-12 22:13:35 +08:00
|
|
|
warning('Cannot apply patch ' + file)
|
2018-07-23 20:39:10 +08:00
|
|
|
endif
|
2018-07-14 00:19:56 +08:00
|
|
|
endforeach
|
2018-05-16 14:32:26 +08:00
|
|
|
endif
|
|
|
|
|
2018-07-23 20:39:10 +08:00
|
|
|
rel_cs_files = [
|
2022-02-01 06:54:00 +08:00
|
|
|
'arch/AArch64/AArch64BaseInfo.c',
|
|
|
|
'arch/AArch64/AArch64Disassembler.c',
|
|
|
|
'arch/AArch64/AArch64InstPrinter.c',
|
|
|
|
'arch/AArch64/AArch64Mapping.c',
|
|
|
|
'arch/AArch64/AArch64Module.c',
|
|
|
|
'arch/ARM/ARMDisassembler.c',
|
|
|
|
'arch/ARM/ARMInstPrinter.c',
|
|
|
|
'arch/ARM/ARMMapping.c',
|
|
|
|
'arch/ARM/ARMModule.c',
|
|
|
|
'arch/Mips/MipsDisassembler.c',
|
|
|
|
'arch/Mips/MipsInstPrinter.c',
|
|
|
|
'arch/Mips/MipsMapping.c',
|
|
|
|
'arch/Mips/MipsModule.c',
|
|
|
|
'arch/PowerPC/PPCDisassembler.c',
|
|
|
|
'arch/PowerPC/PPCInstPrinter.c',
|
|
|
|
'arch/PowerPC/PPCMapping.c',
|
|
|
|
'arch/PowerPC/PPCModule.c',
|
|
|
|
'arch/Sparc/SparcDisassembler.c',
|
|
|
|
'arch/Sparc/SparcInstPrinter.c',
|
|
|
|
'arch/Sparc/SparcMapping.c',
|
|
|
|
'arch/Sparc/SparcModule.c',
|
|
|
|
'arch/SystemZ/SystemZDisassembler.c',
|
|
|
|
'arch/SystemZ/SystemZInstPrinter.c',
|
|
|
|
'arch/SystemZ/SystemZMapping.c',
|
|
|
|
'arch/SystemZ/SystemZMCTargetDesc.c',
|
|
|
|
'arch/SystemZ/SystemZModule.c',
|
|
|
|
'arch/X86/X86ATTInstPrinter.c',
|
|
|
|
'arch/X86/X86Disassembler.c',
|
|
|
|
'arch/X86/X86DisassemblerDecoder.c',
|
|
|
|
'arch/X86/X86IntelInstPrinter.c',
|
|
|
|
'arch/X86/X86Mapping.c',
|
|
|
|
'arch/X86/X86Module.c',
|
|
|
|
'arch/XCore/XCoreDisassembler.c',
|
|
|
|
'arch/XCore/XCoreInstPrinter.c',
|
|
|
|
'arch/XCore/XCoreMapping.c',
|
|
|
|
'arch/XCore/XCoreModule.c',
|
2018-07-23 20:39:10 +08:00
|
|
|
'cs.c',
|
|
|
|
'MCInst.c',
|
|
|
|
'MCInstrDesc.c',
|
|
|
|
'MCRegisterInfo.c',
|
|
|
|
'SStream.c',
|
|
|
|
'utils.c',
|
2018-07-09 22:58:38 +08:00
|
|
|
]
|
2020-09-01 17:36:16 +08:00
|
|
|
rel_cs4_files = [
|
2022-02-01 06:54:00 +08:00
|
|
|
'arch/M680X/M680XDisassembler.c',
|
|
|
|
'arch/M680X/M680XInstPrinter.c',
|
|
|
|
'arch/M680X/M680XModule.c',
|
|
|
|
'arch/M68K/M68KDisassembler.c',
|
|
|
|
'arch/M68K/M68KInstPrinter.c',
|
|
|
|
'arch/M68K/M68KModule.c',
|
|
|
|
'arch/TMS320C64x/TMS320C64xDisassembler.c',
|
|
|
|
'arch/TMS320C64x/TMS320C64xInstPrinter.c',
|
|
|
|
'arch/TMS320C64x/TMS320C64xMapping.c',
|
|
|
|
'arch/TMS320C64x/TMS320C64xModule.c',
|
2020-09-01 17:36:16 +08:00
|
|
|
]
|
|
|
|
rel_cs5_files = [
|
2022-02-01 06:54:00 +08:00
|
|
|
'arch/X86/X86InstPrinterCommon.c',
|
2021-04-25 04:04:51 +08:00
|
|
|
# Add riscv files
|
2022-02-01 06:54:00 +08:00
|
|
|
'arch/RISCV/RISCVMapping.c',
|
|
|
|
'arch/RISCV/RISCVModule.c',
|
|
|
|
'arch/RISCV/RISCVInstPrinter.c',
|
|
|
|
'arch/RISCV/RISCVDisassembler.c'
|
2020-09-01 17:36:16 +08:00
|
|
|
]
|
2018-07-09 22:58:38 +08:00
|
|
|
|
2021-02-20 21:45:20 +08:00
|
|
|
user_plugins = get_option('plugins').split(',')
|
|
|
|
no_user_plugins = get_option('plugins') == ''
|
|
|
|
cs_c_args = [
|
|
|
|
'-DCAPSTONE_USE_SYS_DYN_MEM',
|
|
|
|
'-DCAPSTONE_DIET_NO',
|
|
|
|
]
|
|
|
|
if user_plugins.contains('x86') or no_user_plugins
|
|
|
|
cs_c_args += [
|
|
|
|
'-DCAPSTONE_HAS_X86',
|
|
|
|
'-DCAPSTONE_X86_ATT_DISABLE_NO',
|
|
|
|
'-DCAPSTONE_X86_REDUCE_NO',
|
|
|
|
]
|
|
|
|
endif
|
|
|
|
if user_plugins.contains('arm') or no_user_plugins
|
|
|
|
cs_c_args += [
|
|
|
|
'-DCAPSTONE_HAS_ARM',
|
|
|
|
'-DCAPSTONE_HAS_ARM64',
|
|
|
|
]
|
|
|
|
endif
|
|
|
|
if user_plugins.contains('sparc') or no_user_plugins
|
|
|
|
cs_c_args += [
|
|
|
|
'-DCAPSTONE_HAS_SPARC',
|
|
|
|
]
|
|
|
|
endif
|
|
|
|
if user_plugins.contains('mips') or no_user_plugins
|
|
|
|
cs_c_args += [
|
|
|
|
'-DCAPSTONE_HAS_MIPS',
|
|
|
|
]
|
|
|
|
endif
|
|
|
|
if no_user_plugins
|
|
|
|
cs_c_args += [
|
|
|
|
'-DCAPSTONE_HAS_M68K',
|
|
|
|
'-DCAPSTONE_HAS_M680X',
|
|
|
|
'-DCAPSTONE_HAS_POWERPC',
|
|
|
|
'-DCAPSTONE_HAS_SPARC',
|
|
|
|
'-DCAPSTONE_HAS_SYSZ',
|
|
|
|
'-DCAPSTONE_HAS_XCORE',
|
|
|
|
'-DCAPSTONE_HAS_TMS320C64X',
|
|
|
|
]
|
|
|
|
endif
|
|
|
|
|
2018-07-23 20:39:10 +08:00
|
|
|
cs_files = []
|
|
|
|
foreach rel_cs_file : rel_cs_files
|
|
|
|
cs_files += [join_paths(capstone_path, rel_cs_file)]
|
|
|
|
endforeach
|
2020-09-01 17:36:16 +08:00
|
|
|
if capstone_version == 'v4' or capstone_version == 'v5'
|
|
|
|
foreach rel_cs_file : rel_cs4_files
|
|
|
|
cs_files += [join_paths(capstone_path, rel_cs_file)]
|
|
|
|
endforeach
|
|
|
|
endif
|
|
|
|
if capstone_version == 'v5'
|
|
|
|
foreach rel_cs_file : rel_cs5_files
|
|
|
|
cs_files += [join_paths(capstone_path, rel_cs_file)]
|
|
|
|
endforeach
|
2021-02-20 21:45:20 +08:00
|
|
|
cs_c_args += [ '-DCAPSTONE_HAS_RISCV' ]
|
2019-05-07 19:19:22 +08:00
|
|
|
endif
|
2018-07-23 20:39:10 +08:00
|
|
|
|
2021-11-15 06:30:46 +08:00
|
|
|
capstone_includes = [platform_inc, include_directories(join_paths('capstone','include'))]
|
2020-09-01 17:36:16 +08:00
|
|
|
if capstone_version == 'v4' or capstone_version == 'v5'
|
2021-11-15 06:30:46 +08:00
|
|
|
capstone_includes += [include_directories(join_paths('capstone','include','capstone'))]
|
2020-09-01 17:36:16 +08:00
|
|
|
endif
|
2018-07-09 22:58:38 +08:00
|
|
|
|
|
|
|
libr2capstone = static_library('r2capstone', cs_files,
|
2021-02-20 21:45:20 +08:00
|
|
|
c_args: cs_c_args,
|
2018-07-09 22:58:38 +08:00
|
|
|
include_directories: capstone_includes,
|
|
|
|
implicit_include_directories: false
|
|
|
|
)
|
|
|
|
|
2018-07-24 01:39:58 +08:00
|
|
|
capstone_dep = declare_dependency(
|
|
|
|
link_with: libr2capstone,
|
|
|
|
include_directories: capstone_includes
|
|
|
|
)
|
2018-07-09 22:58:38 +08:00
|
|
|
else
|
|
|
|
message('Use system-provided capstone library')
|
2018-03-05 07:10:28 +08:00
|
|
|
endif
|
|
|
|
|
2018-07-09 22:58:38 +08:00
|
|
|
# handle bochs dependency
|
2018-02-20 16:33:19 +08:00
|
|
|
bochs_files = [
|
2021-11-15 06:30:46 +08:00
|
|
|
join_paths('bochs','src','libbochs.c')
|
2017-05-31 00:38:19 +08:00
|
|
|
]
|
|
|
|
|
2021-11-15 06:30:46 +08:00
|
|
|
bochs_inc = [platform_inc, include_directories(join_paths('bochs','include'))]
|
2018-07-09 22:58:38 +08:00
|
|
|
|
2018-03-31 05:35:12 +08:00
|
|
|
libr2bochs = static_library('r2bochs', bochs_files,
|
2020-07-21 16:28:43 +08:00
|
|
|
dependencies: [r_util_dep],
|
2018-07-09 22:58:38 +08:00
|
|
|
include_directories: bochs_inc,
|
2018-02-20 16:33:19 +08:00
|
|
|
implicit_include_directories: false
|
2017-05-31 19:38:47 +08:00
|
|
|
)
|
2017-08-03 20:58:39 +08:00
|
|
|
|
2018-07-24 01:39:58 +08:00
|
|
|
bochs_dep = declare_dependency(
|
|
|
|
link_with: libr2bochs,
|
|
|
|
include_directories: bochs_inc
|
|
|
|
)
|
2018-07-09 22:58:38 +08:00
|
|
|
|
|
|
|
|
|
|
|
# handle java dependency
|
2018-02-20 16:33:19 +08:00
|
|
|
java_files = [
|
2022-02-01 06:54:00 +08:00
|
|
|
'java/class.c',
|
|
|
|
'java/code.c',
|
|
|
|
'java/ops.c',
|
2018-02-20 16:33:19 +08:00
|
|
|
#'java/main.c',
|
2017-06-20 17:12:42 +08:00
|
|
|
]
|
|
|
|
|
2018-07-09 22:58:38 +08:00
|
|
|
java_inc = [platform_inc, include_directories('java')]
|
|
|
|
|
2018-03-31 05:35:12 +08:00
|
|
|
libr2java = static_library('r2java', java_files,
|
2020-07-21 16:28:43 +08:00
|
|
|
dependencies: [r_util_dep],
|
2018-07-09 22:58:38 +08:00
|
|
|
include_directories: java_inc,
|
2018-02-20 16:33:19 +08:00
|
|
|
implicit_include_directories: false
|
2017-06-20 17:12:42 +08:00
|
|
|
)
|
2017-05-31 00:38:19 +08:00
|
|
|
|
2018-07-24 01:39:58 +08:00
|
|
|
java_dep = declare_dependency(
|
|
|
|
link_with: libr2java,
|
|
|
|
include_directories: java_inc
|
|
|
|
)
|
2018-07-09 22:58:38 +08:00
|
|
|
|
|
|
|
|
|
|
|
# handle qnx dependency
|
2018-02-20 16:33:19 +08:00
|
|
|
qnx_files = [
|
2022-02-01 06:54:00 +08:00
|
|
|
'qnx/src/core.c',
|
|
|
|
'qnx/src/libqnxr.c',
|
|
|
|
'qnx/src/packet.c',
|
|
|
|
'qnx/src/sigutil.c',
|
|
|
|
'qnx/src/utils.c',
|
2017-05-31 00:38:19 +08:00
|
|
|
]
|
|
|
|
|
2022-02-01 06:54:00 +08:00
|
|
|
qnx_inc = [platform_inc, include_directories('qnx/include')]
|
2018-07-09 22:58:38 +08:00
|
|
|
|
2018-03-31 05:35:12 +08:00
|
|
|
libr2qnx = static_library('r2qnx', qnx_files,
|
2020-07-21 16:28:43 +08:00
|
|
|
dependencies: [r_socket_dep],
|
2018-07-09 22:58:38 +08:00
|
|
|
include_directories: qnx_inc,
|
2018-02-20 16:33:19 +08:00
|
|
|
implicit_include_directories: false
|
2017-05-31 19:38:47 +08:00
|
|
|
)
|
2017-05-31 00:38:19 +08:00
|
|
|
|
2018-07-24 01:39:58 +08:00
|
|
|
qnx_dep = declare_dependency(
|
|
|
|
link_with: libr2qnx,
|
|
|
|
include_directories: qnx_inc
|
|
|
|
)
|
2018-07-09 22:58:38 +08:00
|
|
|
|
2017-08-03 20:58:39 +08:00
|
|
|
|
2018-07-09 22:58:38 +08:00
|
|
|
# handle grub dependency
|
2018-02-20 16:33:19 +08:00
|
|
|
grub_files = [
|
2018-08-08 15:04:23 +08:00
|
|
|
#'grub/fs/affs.c',
|
2018-02-20 16:33:19 +08:00
|
|
|
#'grub/fs/afs.c',
|
|
|
|
#'grub/fs/afs_be.c',
|
|
|
|
#'grub/fs/befs.c',
|
|
|
|
#'grub/fs/befs_be.c',
|
2018-08-08 15:04:23 +08:00
|
|
|
#'grub/fs/btrfs.c',
|
2022-02-01 06:54:00 +08:00
|
|
|
'grub/fs/cpio.c',
|
|
|
|
'grub/fs/ext2.c',
|
|
|
|
'grub/fs/fat.c',
|
|
|
|
'grub/fs/fb.c',
|
|
|
|
'grub/fs/fshelp.c',
|
|
|
|
'grub/fs/hfs.c',
|
|
|
|
'grub/fs/hfsplus.c',
|
|
|
|
'grub/fs/iso9660.c',
|
|
|
|
'grub/fs/jfs.c',
|
|
|
|
'grub/fs/minix.c',
|
|
|
|
#'grub/fs/minix2.c',
|
|
|
|
#'grub/fs/nilfs2.c',
|
|
|
|
'grub/fs/ntfs.c',
|
|
|
|
'grub/fs/ntfscomp.c',
|
|
|
|
'grub/fs/reiserfs.c',
|
|
|
|
'grub/fs/sfs.c',
|
|
|
|
'grub/fs/tar.c',
|
|
|
|
'grub/fs/udf.c',
|
|
|
|
'grub/fs/ufs.c',
|
|
|
|
'grub/fs/ufs2.c',
|
|
|
|
'grub/fs/xfs.c',
|
|
|
|
'grub/grubfs.c',
|
|
|
|
'grub/kern/device.c',
|
|
|
|
'grub/kern/disk.c',
|
|
|
|
'grub/kern/env.c',
|
|
|
|
'grub/kern/err.c',
|
|
|
|
'grub/kern/file.c',
|
|
|
|
'grub/kern/fs.c',
|
|
|
|
'grub/kern/list.c',
|
|
|
|
'grub/kern/misc.c',
|
|
|
|
'grub/kern/mm.c',
|
|
|
|
'grub/kern/partition.c',
|
|
|
|
'grub/kern/term.c',
|
|
|
|
'grub/kern/time.c',
|
|
|
|
#'grub/main.c',
|
|
|
|
#'grub/partmap/acorn.c',
|
|
|
|
'grub/partmap/amiga.c',
|
|
|
|
'grub/partmap/apple.c',
|
|
|
|
'grub/partmap/bsdlabel.c',
|
|
|
|
'grub/partmap/gpt.c',
|
|
|
|
'grub/partmap/msdos.c',
|
|
|
|
'grub/partmap/sun.c',
|
|
|
|
'grub/partmap/sunpc.c',
|
2017-05-31 00:38:19 +08:00
|
|
|
]
|
|
|
|
|
2022-02-01 06:54:00 +08:00
|
|
|
grub_inc = [platform_inc, include_directories('grub', 'grub/include')]
|
2018-07-09 22:58:38 +08:00
|
|
|
|
2018-03-31 05:35:12 +08:00
|
|
|
libr2grub = static_library('r2grub', grub_files,
|
2020-07-21 16:28:43 +08:00
|
|
|
dependencies: [r_util_dep],
|
2018-07-09 22:58:38 +08:00
|
|
|
include_directories: grub_inc,
|
2018-02-20 16:33:19 +08:00
|
|
|
implicit_include_directories: false
|
2017-05-31 19:38:47 +08:00
|
|
|
)
|
|
|
|
|
2018-07-24 01:39:58 +08:00
|
|
|
grub_dep = declare_dependency(
|
|
|
|
link_with: libr2grub,
|
|
|
|
include_directories: grub_inc
|
|
|
|
)
|
2018-07-09 22:58:38 +08:00
|
|
|
|
2020-08-24 19:01:10 +08:00
|
|
|
# handle winkd dependency
|
|
|
|
winkd_files = [
|
2022-02-01 06:54:00 +08:00
|
|
|
'winkd/iob_pipe.c',
|
|
|
|
'winkd/iob_net.c',
|
|
|
|
'winkd/kd.c',
|
|
|
|
'winkd/transport.c',
|
|
|
|
'winkd/winkd.c',
|
2017-05-31 19:38:47 +08:00
|
|
|
]
|
|
|
|
|
2020-08-24 19:01:10 +08:00
|
|
|
winkd_inc = [platform_inc, include_directories('winkd')]
|
2018-07-09 22:58:38 +08:00
|
|
|
|
2020-08-24 19:01:10 +08:00
|
|
|
libr2winkd = static_library('r2winkd', winkd_files,
|
2020-08-26 10:24:20 +08:00
|
|
|
dependencies: [r_hash_dep, r_crypto_dep, r_socket_dep, r_util_dep],
|
2020-08-24 19:01:10 +08:00
|
|
|
include_directories: winkd_inc,
|
2018-02-20 16:33:19 +08:00
|
|
|
implicit_include_directories: false
|
2017-05-31 19:38:47 +08:00
|
|
|
)
|
|
|
|
|
2020-08-24 19:01:10 +08:00
|
|
|
winkd_dep = declare_dependency(
|
|
|
|
link_with: libr2winkd,
|
|
|
|
include_directories: winkd_inc
|
2018-07-24 01:39:58 +08:00
|
|
|
)
|
2018-07-09 22:58:38 +08:00
|
|
|
|
2022-03-02 08:20:43 +08:00
|
|
|
libr2winkd_static = static_library('r2winkd_static', winkd_files,
|
|
|
|
dependencies: [r_hash_static_dep, r_crypto_static_dep, r_socket_static_dep, r_util_static_dep],
|
|
|
|
include_directories: winkd_inc,
|
|
|
|
implicit_include_directories: false
|
|
|
|
)
|
|
|
|
|
|
|
|
winkd_static_dep = declare_dependency(
|
|
|
|
link_with: libr2winkd_static,
|
|
|
|
include_directories: winkd_inc
|
|
|
|
)
|
2018-07-09 22:58:38 +08:00
|
|
|
|
|
|
|
# handle ar dependency
|
2018-02-20 16:33:19 +08:00
|
|
|
ar_files = [
|
|
|
|
'ar/ar.c'
|
2017-08-17 16:33:58 +08:00
|
|
|
]
|
|
|
|
|
2018-07-09 22:58:38 +08:00
|
|
|
ar_inc = [platform_inc, include_directories(['ar'])]
|
|
|
|
|
2018-03-31 05:35:12 +08:00
|
|
|
libr2ar = static_library('r2ar', ar_files,
|
2020-07-21 16:28:43 +08:00
|
|
|
dependencies: [r_util_dep],
|
2018-07-09 22:58:38 +08:00
|
|
|
include_directories: ar_inc,
|
2018-02-20 16:33:19 +08:00
|
|
|
implicit_include_directories: false
|
2017-08-17 16:33:58 +08:00
|
|
|
)
|
2018-02-20 16:33:19 +08:00
|
|
|
|
2018-07-24 01:39:58 +08:00
|
|
|
ar_dep = declare_dependency(
|
|
|
|
link_with: libr2ar,
|
|
|
|
include_directories: ar_inc
|
|
|
|
)
|
2018-10-12 18:20:18 +08:00
|
|
|
|
2019-07-20 18:50:27 +08:00
|
|
|
# handle mpc dependency
|
|
|
|
mpc_files = [
|
2022-02-01 06:54:00 +08:00
|
|
|
'mpc/mpc.c'
|
2019-07-20 18:50:27 +08:00
|
|
|
]
|
|
|
|
|
|
|
|
mpc_inc = [platform_inc, include_directories(['mpc'])]
|
|
|
|
|
|
|
|
libmpc = static_library('r2mpc', mpc_files,
|
|
|
|
include_directories: mpc_inc,
|
|
|
|
implicit_include_directories: false
|
|
|
|
)
|
|
|
|
|
|
|
|
mpc_dep = declare_dependency(
|
|
|
|
link_with: libmpc,
|
|
|
|
include_directories: mpc_inc
|
|
|
|
)
|
2020-05-12 17:58:10 +08:00
|
|
|
|
|
|
|
# handle yxml dependency
|
|
|
|
yxml_files = [
|
2022-02-01 06:54:00 +08:00
|
|
|
'yxml/yxml.c'
|
2020-05-12 17:58:10 +08:00
|
|
|
]
|
|
|
|
|
|
|
|
yxml_inc = [platform_inc, include_directories(['yxml'])]
|
|
|
|
|
|
|
|
libyxml = static_library('r2yxml', yxml_files,
|
|
|
|
include_directories: yxml_inc,
|
|
|
|
implicit_include_directories: false
|
|
|
|
)
|
|
|
|
|
|
|
|
yxml_dep = declare_dependency(
|
|
|
|
link_with: libyxml,
|
|
|
|
include_directories: yxml_inc
|
|
|
|
)
|