* Move binrz meson directives to binrz/ dir * Move rizin-shell-parser to a subproject * Move bochs to a meson subproject * Move rzqnx to meson subproject * Move winkd to a meson subproject * Move rzar to a meson subproject * Move rzw32dbg_wrap to a meson subproject * Move ptrace-wrap to a meson subproject * Move rzgdb to a meson subproject * Rename w32dbg_wrap to rzw32dbg_wrap * Update CODEOWNERS * Remove old references to shlr * Move shlr/heap stuff in core and remove shlr/arm * Move spp to a meson subproject * Remove last references to shlr * Remove use_webui option * Move include files directives to librz/include/meson.build * Move librz meson directives into librz/meson.build * Handle d/ directories inside the specific module meson.build * Move plugins listing to specific module meson.build * Move rzheap to its own subproject * Fix js linter and licenses * Use meson.override_dependency for all rz_ modules
361 lines
7.8 KiB
Meson
361 lines
7.8 KiB
Meson
asm_plugins = [
|
|
'6502',
|
|
'8051',
|
|
'amd29k',
|
|
'arm_as',
|
|
'arm_cs',
|
|
'avr',
|
|
'bf',
|
|
'chip8',
|
|
'cr16',
|
|
'dalvik',
|
|
'dcpu16',
|
|
'ebc',
|
|
'gb',
|
|
'h8300',
|
|
'hexagon',
|
|
'i4004',
|
|
'i8080',
|
|
'java',
|
|
'lh5801',
|
|
'lm32',
|
|
'luac',
|
|
'm68k_cs',
|
|
'm680x_cs',
|
|
'malbolge',
|
|
'mcore',
|
|
'mcs96',
|
|
'mips_cs',
|
|
'msp430',
|
|
'or1k',
|
|
'pic',
|
|
'ppc_as',
|
|
'ppc_cs',
|
|
'propeller',
|
|
'pyc',
|
|
'rsp',
|
|
'snes',
|
|
'sparc_cs',
|
|
'spc700',
|
|
'sysz',
|
|
'tms320',
|
|
'tms320c64x',
|
|
'v810',
|
|
'v850',
|
|
'wasm',
|
|
'x86_as',
|
|
'x86_cs',
|
|
'x86_nasm',
|
|
'x86_nz',
|
|
'xap',
|
|
'xcore_cs',
|
|
]
|
|
|
|
if capstone_dep.version().split('.')[0].to_int() > 4
|
|
asm_plugins += 'riscv_cs'
|
|
endif
|
|
|
|
if get_option('use_gpl')
|
|
asm_plugins += [
|
|
'arc',
|
|
'cris_gnu',
|
|
'hppa_gnu',
|
|
'lanai_gnu',
|
|
'mips_gnu',
|
|
'nios2',
|
|
'riscv',
|
|
'sh',
|
|
'sparc_gnu',
|
|
'tricore',
|
|
'vax',
|
|
'xtensa',
|
|
'z80',
|
|
]
|
|
endif
|
|
|
|
rz_asm_sources = [
|
|
'asm.c',
|
|
'aop.c',
|
|
'acode.c',
|
|
'binutils_as.c',
|
|
'p/asm_6502.c',
|
|
'p/asm_6502_cs.c',
|
|
'p/asm_8051.c',
|
|
'p/asm_amd29k.c',
|
|
'p/asm_arm_as.c',
|
|
'p/asm_arm_cs.c',
|
|
'p/asm_avr.c',
|
|
'p/asm_bf.c',
|
|
'p/asm_chip8.c',
|
|
'p/asm_cr16.c',
|
|
'p/asm_dalvik.c',
|
|
'p/asm_dcpu16.c',
|
|
'p/asm_ebc.c',
|
|
'p/asm_gb.c',
|
|
'p/asm_h8300.c',
|
|
'p/asm_hexagon.c',
|
|
'p/asm_i4004.c',
|
|
'p/asm_i8080.c',
|
|
'p/asm_java.c',
|
|
'p/asm_lh5801.c',
|
|
'p/asm_lm32.c',
|
|
'p/asm_luac.c',
|
|
'p/asm_m68k_cs.c',
|
|
'p/asm_m680x_cs.c',
|
|
'p/asm_malbolge.c',
|
|
'p/asm_mcs96.c',
|
|
'p/asm_mips_cs.c',
|
|
'p/asm_msp430.c',
|
|
'p/asm_or1k.c',
|
|
'p/asm_pic.c',
|
|
'p/asm_mcore.c',
|
|
'p/asm_ppc_as.c',
|
|
'p/asm_ppc_cs.c',
|
|
'p/asm_propeller.c',
|
|
'p/asm_pyc.c',
|
|
'p/asm_rsp.c',
|
|
'p/asm_snes.c',
|
|
'p/asm_sparc_cs.c',
|
|
'p/asm_spc700.c',
|
|
'p/asm_sysz.c',
|
|
'p/asm_tms320.c',
|
|
'p/asm_tms320c64x.c',
|
|
'p/asm_v810.c',
|
|
'p/asm_v850.c',
|
|
'p/asm_wasm.c',
|
|
'p/asm_x86_as.c',
|
|
'p/asm_x86_cs.c',
|
|
'p/asm_x86_nasm.c',
|
|
'p/asm_x86_nz.c',
|
|
#'p/asm_x86_vm.c',
|
|
'p/asm_xap.c',
|
|
'p/asm_xcore_cs.c',
|
|
#'arch/6502/6502dis.c',
|
|
'arch/amd29k/amd29k.c',
|
|
#'arch/8051/8051_disas.c',
|
|
'arch/8051/8051_ass.c',
|
|
'arch/arm/armass.c',
|
|
'arch/arm/armass64.c',
|
|
'arch/avr/disassembler.c',
|
|
'arch/avr/assembler.c',
|
|
'arch/cr16/cr16_disas.c',
|
|
#'arch/dcpu16/asm.c',
|
|
#'arch/dcpu16/dis.c',
|
|
#'arch/dcpu16/main.c',
|
|
'arch/ebc/ebc_disas.c',
|
|
#'arch/gb/gbasm.c',
|
|
#'arch/gb/gbdis.c',
|
|
'arch/h8300/h8300_disas.c',
|
|
'arch/hexagon/hexagon.c',
|
|
'arch/hexagon/hexagon_arch.c',
|
|
'arch/hexagon/hexagon_disas.c',
|
|
#'arch/i4004/i4004dis.c',
|
|
#'arch/i8080/i8080dis.c',
|
|
'arch/java/jvm.c',
|
|
'arch/java/assembler.c',
|
|
'arch/luac/lua_arch.c',
|
|
'arch/luac/v54/opcode_54.c',
|
|
'arch/luac/v54/disassembly_54.c',
|
|
'arch/luac/v54/assembly_54.c',
|
|
'arch/luac/v53/opcode_53.c',
|
|
'arch/luac/v53/disassembly_53.c',
|
|
'arch/luac/v53/assembly_53.c',
|
|
'arch/mips/mipsasm.c',
|
|
'arch/msp430/msp430_disas.c',
|
|
'arch/or1k/or1k_disas.c',
|
|
'arch/pic/pic_baseline.c',
|
|
'arch/pic/pic_midrange.c',
|
|
'arch/pic/pic_pic18.c',
|
|
'arch/mcore/mcore.c',
|
|
'arch/ppc/libvle/vle.c',
|
|
'arch/ppc/libps/libps.c',
|
|
'arch/propeller/propeller_disas.c',
|
|
'arch/pyc/opcode_10.c',
|
|
'arch/pyc/opcode_11.c',
|
|
'arch/pyc/opcode_12.c',
|
|
'arch/pyc/opcode_13.c',
|
|
'arch/pyc/opcode_14.c',
|
|
'arch/pyc/opcode_15.c',
|
|
'arch/pyc/opcode_16.c',
|
|
'arch/pyc/opcode_20.c',
|
|
'arch/pyc/opcode_21.c',
|
|
'arch/pyc/opcode_22.c',
|
|
'arch/pyc/opcode_23.c',
|
|
'arch/pyc/opcode_24.c',
|
|
'arch/pyc/opcode_25.c',
|
|
'arch/pyc/opcode_26.c',
|
|
'arch/pyc/opcode_27.c',
|
|
'arch/pyc/opcode_2x.c',
|
|
'arch/pyc/opcode_30.c',
|
|
'arch/pyc/opcode_31.c',
|
|
'arch/pyc/opcode_32.c',
|
|
'arch/pyc/opcode_33.c',
|
|
'arch/pyc/opcode_34.c',
|
|
'arch/pyc/opcode_35.c',
|
|
'arch/pyc/opcode_36.c',
|
|
'arch/pyc/opcode_37.c',
|
|
'arch/pyc/opcode_38.c',
|
|
'arch/pyc/opcode_39.c',
|
|
'arch/pyc/opcode_3x.c',
|
|
'arch/pyc/opcode_analysis.c',
|
|
'arch/pyc/opcode_arg_fmt.c',
|
|
'arch/pyc/opcode.c',
|
|
'arch/pyc/pyc_dis.c',
|
|
'arch/rsp/rsp_idec.c',
|
|
#'arch/snes/snesdis.c',
|
|
#'arch/spc700/spc700dis.c',
|
|
'arch/tms320/c55x_plus/c55plus.c',
|
|
'arch/tms320/c55x_plus/c55plus_decode.c',
|
|
'arch/tms320/c55x_plus/decode_funcs.c',
|
|
'arch/tms320/c55x_plus/hashtable.c',
|
|
#'arch/tms320/c55x_plus/hashvector.c',
|
|
'arch/tms320/c55x_plus/ins.c',
|
|
'arch/tms320/c55x_plus/utils.c',
|
|
'arch/tms320/tms320_dasm.c',
|
|
'arch/v810/v810_disas.c',
|
|
'arch/v850/v850_disas.c',
|
|
'arch/wasm/wasm.c',
|
|
#'arch/xap/dis.c',
|
|
'arch/z80/z80.c',
|
|
]
|
|
|
|
if capstone_dep.version().split('.')[0].to_int() > 4
|
|
rz_asm_sources += 'p/asm_riscv_cs.c'
|
|
endif
|
|
|
|
if get_option('use_gpl')
|
|
rz_asm_sources += [
|
|
'arch/arc/gnu/arc-dis.c',
|
|
'arch/arc/gnu/arc-ext.c',
|
|
'arch/arc/gnu/arc-opc.c',
|
|
'arch/arc/gnu/arcompact-dis.c',
|
|
'arch/arm/aarch64/aarch64-dis-2.c',
|
|
'arch/arm/aarch64/aarch64-dis.c',
|
|
'arch/arm/aarch64/aarch64-opc-2.c',
|
|
'arch/arm/aarch64/aarch64-opc.c',
|
|
'arch/cris/gnu/cris-dis.c',
|
|
'arch/cris/gnu/cris-opc.c',
|
|
'arch/hppa/gnu/hppa-dis.c',
|
|
'arch/lanai/gnu/lanai-dis.c',
|
|
'arch/lanai/gnu/lanai-opc.c',
|
|
'arch/mips/gnu/mips-dis.c',
|
|
'arch/mips/gnu/mips-opc.c',
|
|
'arch/mips/gnu/mips16-opc.c',
|
|
'arch/nios/gnu/nios2-dis.c',
|
|
'arch/nios/gnu/nios2-opc.c',
|
|
#'arch/riscv/riscv-opc.c',
|
|
#'arch/riscv/riscv.c',
|
|
'arch/sh/gnu/sh-dis.c',
|
|
'arch/sparc/gnu/sparc-dis.c',
|
|
'arch/sparc/gnu/sparc-opc.c',
|
|
'arch/tricore/gnu/cpu-tricore.c',
|
|
'arch/tricore/gnu/tricore-dis.c',
|
|
'arch/tricore/gnu/tricore-opc.c',
|
|
'arch/vax/vax-dis.c',
|
|
'arch/xtensa/gnu/elf32-xtensa.c',
|
|
'arch/xtensa/gnu/xtensa-dis.c',
|
|
'arch/xtensa/gnu/xtensa-isa.c',
|
|
'arch/xtensa/gnu/xtensa-modules.c',
|
|
#'arch/z80/expressions.c',
|
|
#'arch/z80/z80asm.c',
|
|
'p/asm_arc.c',
|
|
'p/asm_cris_gnu.c',
|
|
'p/asm_hppa_gnu.c',
|
|
'p/asm_lanai_gnu.c',
|
|
'p/asm_mips_gnu.c',
|
|
'p/asm_nios2.c',
|
|
'p/asm_riscv.c',
|
|
'p/asm_sh.c',
|
|
'p/asm_sparc_gnu.c',
|
|
'p/asm_tricore.c',
|
|
'p/asm_vax.c',
|
|
'p/asm_xtensa.c',
|
|
'p/asm_z80.c',
|
|
]
|
|
endif
|
|
|
|
rz_asm_inc = [
|
|
platform_inc,
|
|
include_directories(
|
|
'arch/include',
|
|
'arch',
|
|
'arch/h8300',
|
|
'arch/hexagon',
|
|
'arch/msp430',
|
|
'arch/rsp',
|
|
'arch/mcore',
|
|
'arch/v850',
|
|
'arch/propeller',
|
|
'arch/ebc',
|
|
'arch/cr16',
|
|
'arch/8051',
|
|
'arch/v810',
|
|
'arch/or1k'
|
|
)
|
|
]
|
|
|
|
rz_asm = library('rz_asm', rz_asm_sources,
|
|
include_directories: rz_asm_inc,
|
|
c_args: library_cflags,
|
|
dependencies: [
|
|
rz_util_dep,
|
|
rz_syscall_dep,
|
|
rz_flag_dep,
|
|
rz_parse_dep,
|
|
rz_bin_dep,
|
|
capstone_dep,
|
|
dependency('rzspp'),
|
|
],
|
|
install: true,
|
|
implicit_include_directories: false,
|
|
install_rpath: rpath_lib,
|
|
link_args: library_linkflags,
|
|
soversion: rizin_libversion,
|
|
name_suffix: lib_name_suffix,
|
|
name_prefix: lib_name_prefix,
|
|
)
|
|
|
|
rz_asm_dep = declare_dependency(link_with: rz_asm,
|
|
include_directories: rz_asm_inc)
|
|
meson.override_dependency('rz_asm', rz_asm_dep)
|
|
|
|
pkgconfig_mod.generate(rz_asm,
|
|
subdirs: 'librz',
|
|
version: rizin_version,
|
|
name: 'rz_asm',
|
|
filebase: 'rz_asm',
|
|
requires: [
|
|
'rz_util',
|
|
'rz_syscall',
|
|
'rz_parse',
|
|
'rz_flag',
|
|
'rz_bin',
|
|
'rz_socket'
|
|
],
|
|
description: 'rizin foundation libraries',
|
|
variables: [
|
|
'plugindir=@0@'.format(rizin_plugins),
|
|
],
|
|
)
|
|
|
|
if not is_static_libs_only
|
|
conf = configuration_data()
|
|
conf.set('RZ_VERSION', rizin_version)
|
|
conf.set('RIZIN_MODULE', rz_asm.name())
|
|
conf.set('RIZIN_MODULE_DEPS', ' '.join(['rz_util', 'rz_syscall', 'rz_flag', 'rz_parse', 'rz_bin']))
|
|
conf.set('PACKAGE_RELATIVE_PATH', cmake_package_relative_path)
|
|
conf.set('INSTALL_INCDIR', rizin_incdir)
|
|
conf.set('INSTALL_LIBDIR', rizin_libdir)
|
|
conf.set('INSTALL_PLUGDIR', rizin_plugins)
|
|
conf.set('rizin_libname', rz_asm.name())
|
|
cmake_mod.configure_package_config_file(
|
|
name: conf.get('rizin_libname'),
|
|
input: '../RzModulesConfig.cmake.in',
|
|
install_dir: rizin_cmakedir / conf.get('rizin_libname'),
|
|
configuration: conf,
|
|
)
|
|
endif
|
|
|
|
subdir('d')
|
|
subdir('cpus')
|
|
subdir('platforms')
|