rz_analysis_sources = [
  'analysis.c',
  'block.c',
  'function.c',
  'jmptbl.c',
  'cc.c',
  'class.c',
  'cond.c',
  'cycles.c',
  'data.c',
  'diff.c',
  'esil.c',
  'esil_stats.c',
  'esil_trace.c',
  'esil_interrupt.c',
  'esil_sources.c',
  'esil_cfg.c',
  'esil_dfg.c',
  'fcn.c',
  'flirt.c',
  'hint.c',
  'labels.c',
  'meta.c',
  'op.c',
  'pin.c',
  'reflines.c',
  'rtti.c',
  'rtti_msvc.c',
  'rtti_itanium.c',
  'sign.c',
  'switch.c',
  'type.c',
  'type_pdb.c',
  'dwarf_process.c',
  'value.c',
  'var.c',
  'vtable.c',
  'xrefs.c',
  'serialize_analysis.c',
  'p/analysis_6502.c',
  'p/analysis_6502_cs.c',
  'p/analysis_8051.c',
  'p/analysis_amd29k.c',
  'p/analysis_arc.c',
  'p/analysis_arm_cs.c',
  'p/analysis_arm_gnu.c',
  'p/analysis_avr.c',
  'p/analysis_bf.c',
  'p/analysis_chip8.c',
  'p/analysis_cr16.c',
  'p/analysis_cris.c',
  'p/analysis_dalvik.c',
  'p/analysis_ebc.c',
  'p/analysis_gb.c',
  'p/analysis_h8300.c',
  'p/analysis_hexagon.c',
  'p/analysis_i4004.c',
  'p/analysis_i8080.c',
  'p/analysis_java.c',
  'p/analysis_m68k_cs.c',
  'p/analysis_m680x_cs.c',
  'p/analysis_malbolge.c',
  'p/analysis_mcore.c',
  'p/analysis_mips_cs.c',
  'p/analysis_mips_gnu.c',
  'p/analysis_msp430.c',
  'p/analysis_nios2.c',
  'p/analysis_null.c',
  'p/analysis_or1k.c',
  'p/analysis_pic.c',
  'p/analysis_ppc_cs.c',
  'p/analysis_ppc_gnu.c',
  'p/analysis_propeller.c',
  'p/analysis_pyc.c',
  'p/analysis_riscv.c',
  'p/analysis_rsp.c',
  'p/analysis_sh.c',
  'p/analysis_snes.c',
  'p/analysis_sparc_cs.c',
  'p/analysis_sparc_gnu.c',
  'p/analysis_spc700.c',
  'p/analysis_sysz.c',
  'p/analysis_tms320.c',
  'p/analysis_tms320_c55x_plus.c',
  #'p/analysis_tms320c64x.c',
  'p/analysis_tricore.c',
  'p/analysis_v810.c',
  'p/analysis_v850.c',
  'p/analysis_vax.c',
  'p/analysis_wasm.c',
  'p/analysis_ws.c',
  'p/analysis_x86_cs.c',
  'p/analysis_xap.c',
  'p/analysis_xcore_cs.c',
  'p/analysis_xtensa.c',
  'p/analysis_z80.c',
  #'arch/gb/meta_gb_cmt.c',
  'arch/hexagon/hexagon_analysis.c',
  '../asm/arch/amd29k/amd29k.c',
  '../asm/arch/arm/winedbg/be_arm.c',
  '../asm/arch/avr/avr_disasm.c',
  '../asm/arch/avr/format.c',
  '../asm/arch/avr/disasm.c',
  '../asm/arch/cr16/cr16_disas.c',
  '../asm/arch/ebc/ebc_disas.c',
  '../asm/arch/h8300/h8300_disas.c',
  '../asm/arch/hexagon/hexagon.c',
  '../asm/arch/hexagon/hexagon_disas.c',
  '../asm/arch/mcore/mcore.c',
  '../asm/arch/msp430/msp430_disas.c',
  '../asm/arch/or1k/or1k_disas.c',
  '../asm/arch/pic/pic_midrange.c',
  '../asm/arch/ppc/libvle/vle.c',
  '../asm/arch/propeller/propeller_disas.c',
  '../asm/arch/rsp/rsp_idec.c',
  '../asm/arch/tms320/tms320_dasm.c',
  '../asm/arch/tms320/c55x_plus/ins.c',
  '../asm/arch/tms320/c55x_plus/c55plus.c',
  '../asm/arch/tms320/c55x_plus/c55plus_decode.c',
  '../asm/arch/tms320/c55x_plus/decode_funcs.c',
  '../asm/arch/tms320/c55x_plus/hashtable.c',
  '../asm/arch/tms320/c55x_plus/utils.c',
  '../asm/arch/v810/v810_disas.c',
  '../asm/arch/v850/v850_disas.c',
  '../asm/arch/wasm/wasm.c',
  '../asm/arch/xtensa/gnu/xtensa-dis.c',
  '../asm/arch/xtensa/gnu/elf32-xtensa.c',
  '../asm/arch/xtensa/gnu/xtensa-isa.c',
  '../asm/arch/xtensa/gnu/xtensa-modules.c',
  '../asm/arch/pyc/opcode_10.c',
  '../asm/arch/pyc/opcode_11.c',
  '../asm/arch/pyc/opcode_12.c',
  '../asm/arch/pyc/opcode_13.c',
  '../asm/arch/pyc/opcode_14.c',
  '../asm/arch/pyc/opcode_15.c',
  '../asm/arch/pyc/opcode_16.c',
  '../asm/arch/pyc/opcode_20.c',
  '../asm/arch/pyc/opcode_21.c',
  '../asm/arch/pyc/opcode_22.c',
  '../asm/arch/pyc/opcode_23.c',
  '../asm/arch/pyc/opcode_24.c',
  '../asm/arch/pyc/opcode_25.c',
  '../asm/arch/pyc/opcode_26.c',
  '../asm/arch/pyc/opcode_27.c',
  '../asm/arch/pyc/opcode_2x.c',
  '../asm/arch/pyc/opcode_30.c',
  '../asm/arch/pyc/opcode_31.c',
  '../asm/arch/pyc/opcode_32.c',
  '../asm/arch/pyc/opcode_33.c',
  '../asm/arch/pyc/opcode_34.c',
  '../asm/arch/pyc/opcode_35.c',
  '../asm/arch/pyc/opcode_36.c',
  '../asm/arch/pyc/opcode_37.c',
  '../asm/arch/pyc/opcode_38.c',
  '../asm/arch/pyc/opcode_39.c',
  '../asm/arch/pyc/opcode_3x.c',
  '../asm/arch/pyc/opcode_analysis.c',
  '../asm/arch/pyc/opcode_arg_fmt.c',
  '../asm/arch/pyc/opcode.c',
  '../asm/arch/pyc/pyc_dis.c'
]

rz_analysis_inc = [
  platform_inc,
  include_directories(
    'arch/gb',
    'arch/hexagon',
  )
]

rz_analysis = library('rz_analysis', rz_analysis_sources,
  include_directories: rz_analysis_inc,
  c_args: library_cflags,
  dependencies: [
    rz_util_dep,
    rz_reg_dep,
    rz_syscall_dep,
    rz_search_dep,
    rz_cons_dep,
    rz_flag_dep,
    rz_hash_dep,
    rz_crypto_dep,
    rz_parse_dep,
    rz_asm_dep,
    java_dep,
    capstone_dep
  ],
  install: true,
  implicit_include_directories: false,
  install_rpath: rpath_lib,
  soversion: rizin_libversion
)

rz_analysis_dep = declare_dependency(link_with: rz_analysis,
                                include_directories: rz_analysis_inc)

pkgconfig_mod.generate(rz_analysis,
  subdirs: 'librz',
  version: rizin_version,
  name: 'rz_analysis',
  filebase: 'rz_analysis',
  libraries: pkgcfg_sanitize_libs,
  requires: [
    'rz_util',
    'rz_reg',
    'rz_asm',
    'rz_crypto',
    'rz_parse',
    'rz_syscall',
    'rz_search',
    'rz_cons',
    'rz_flag'
  ],
  description: 'rizin foundation libraries'
)
