From 478095b6e805f2f49b36a8c4d353227e1078e57e Mon Sep 17 00:00:00 2001 From: pancake Date: Sun, 14 May 2017 23:15:07 +0200 Subject: [PATCH] Fix meson build on macOS --- configure-plugins | 9 +++++++-- libr/asm/meson.build | 9 +++++---- libr/config.h.meson | 3 --- libr/config.mk.meson | 6 +++--- libr/debug/meson.build | 6 +++++- meson.build | 3 +++ plugins.meson.cfg | 3 --- 7 files changed, 23 insertions(+), 16 deletions(-) diff --git a/configure-plugins b/configure-plugins index db40807de0..568bcc63c6 100755 --- a/configure-plugins +++ b/configure-plugins @@ -32,6 +32,10 @@ help () { cfg=./plugins.cfg +if [ ! -f "$cfg" ]; then + cp -f ./plugins.def.cfg plugins.cfg +fi + load () { if [ -e $cfg ]; then echo "configure-plugins: Loading $cfg .." @@ -43,8 +47,9 @@ load () { } save () { - echo "STATIC=\"$STATIC\"" > $cfg - echo "SHARED=\"$SHARED\"" >>$cfg + cp $cfg plugins.cfg + # echo "STATIC=\"$STATIC\"" > $cfg + # echo "SHARED=\"$SHARED\"" >>$cfg } generate_configh () { diff --git a/libr/asm/meson.build b/libr/asm/meson.build index 2558743f11..4f85631644 100644 --- a/libr/asm/meson.build +++ b/libr/asm/meson.build @@ -78,7 +78,7 @@ files=[ 'p/asm_arm_cs.c', 'p/asm_arm_gnu.c', 'p/asm_arm_winedbg.c', -'p/asm_avr.c', +#'p/asm_avr.c', 'p/asm_bf.c', 'p/asm_cr16.c', 'p/asm_cris_gnu.c', @@ -146,10 +146,11 @@ files=[ 'arch//arm/gnu/arm-dis.c', 'arch//arm/gnu/floatformat.c', 'arch//arm/winedbg/be_arm.c', -'arch//avr/avr_disasm.c', +# AVR doesnt builds with meson +#'arch//avr/avr_disasm.c', #'arch//avr/avr_instructionset.c', -'arch//avr/disasm.c', -'arch//avr/format.c', +#'arch//avr/disasm.c', +#'arch//avr/format.c', 'arch//cr16/cr16_disas.c', 'arch//cris/gnu/cris-dis.c', 'arch//cris/gnu/cris-opc.c', diff --git a/libr/config.h.meson b/libr/config.h.meson index 2fda61e47c..1a5c8f18e2 100644 --- a/libr/config.h.meson +++ b/libr/config.h.meson @@ -12,7 +12,6 @@ &r_anal_plugin_6502, \ &r_anal_plugin_arc, \ &r_anal_plugin_arm_cs, \ - &r_anal_plugin_avr, \ &r_anal_plugin_bf, \ &r_anal_plugin_cris, \ &r_anal_plugin_dalvik, \ @@ -47,7 +46,6 @@ &r_asm_plugin_arm_as, \ &r_asm_plugin_arm_cs, \ &r_asm_plugin_arm_winedbg, \ - &r_asm_plugin_avr, \ &r_asm_plugin_bf, \ &r_asm_plugin_cris_gnu, \ &r_asm_plugin_dalvik, \ @@ -92,7 +90,6 @@ #define R_BIN_STATIC_PLUGINS \ &r_bin_plugin_any, \ &r_bin_plugin_art, \ - &r_bin_plugin_avr, \ &r_bin_plugin_bf, \ &r_bin_plugin_bflt, \ &r_bin_plugin_bios, \ diff --git a/libr/config.mk.meson b/libr/config.mk.meson index 48c1f58a93..4bc1a42ce5 100644 --- a/libr/config.mk.meson +++ b/libr/config.mk.meson @@ -9,9 +9,9 @@ WINDOWS=0 OSX=0 # config.mk.head -STATIC_ANAL_PLUGINS= p/6502.mk p/arc.mk p/arm_cs.mk p/avr.mk p/bf.mk p/cris.mk p/dalvik.mk p/i4004.mk p/i8080.mk p/m68k_cs.mk p/malbolge.mk p/mips_cs.mk p/mips_gnu.mk p/nios2.mk p/null.mk p/pic18c.mk p/ppc_cs.mk p/ppc_gnu.mk p/riscv.mk p/sh.mk p/snes.mk p/sparc_cs.mk p/sparc_gnu.mk p/sysz.mk p/vax.mk p/ws.mk p/x86_cs.mk p/xap.mk p/xcore_cs.mk p/z80.mk -STATIC_ASM_PLUGINS= p/6502.mk p/arc.mk p/arm_as.mk p/arm_cs.mk p/arm_winedbg.mk p/avr.mk p/bf.mk p/cris_gnu.mk p/dalvik.mk p/dcpu16.mk p/gb.mk p/h8300.mk p/hppa_gnu.mk p/i4004.mk p/i8080.mk p/lanai_gnu.mk p/lm32.mk p/m68k_cs.mk p/malbolge.mk p/mcs96.mk p/mips_cs.mk p/mips_gnu.mk p/nios2.mk p/pic18c.mk p/ppc_cs.mk p/ppc_gnu.mk p/riscv.mk p/sh.mk p/snes.mk p/sparc_cs.mk p/sparc_gnu.mk p/spc700.mk p/sysz.mk p/tricore.mk p/v850.mk p/vax.mk p/wasm.mk p/ws.mk p/x86_as.mk p/x86_cs.mk p/x86_nasm.mk p/x86_nz.mk p/xap.mk p/xcore_cs.mk p/z80.mk -STATIC_BIN_PLUGINS= p/any.mk p/art.mk p/avr.mk p/bf.mk p/bflt.mk p/bios.mk p/bootimg.mk p/cgc.mk p/coff.mk p/dex.mk p/dol.mk p/dyldcache.mk p/elf.mk p/elf64.mk p/fs.mk p/mach0.mk p/mach064.mk p/mbn.mk p/menuet.mk p/mz.mk p/nes.mk p/nin3ds.mk p/ninds.mk p/ningb.mk p/ningba.mk p/nro.mk p/omf.mk p/p9.mk p/pe.mk p/pe64.mk p/pebble.mk p/psxexe.mk p/sfc.mk p/smd.mk p/sms.mk p/spc700.mk p/te.mk p/vsf.mk p/wasm.mk p/xbe.mk p/zimg.mk +STATIC_ANAL_PLUGINS= p/6502.mk p/arc.mk p/arm_cs.mk p/bf.mk p/cris.mk p/dalvik.mk p/i4004.mk p/i8080.mk p/m68k_cs.mk p/malbolge.mk p/mips_cs.mk p/mips_gnu.mk p/nios2.mk p/null.mk p/pic18c.mk p/ppc_cs.mk p/ppc_gnu.mk p/riscv.mk p/sh.mk p/snes.mk p/sparc_cs.mk p/sparc_gnu.mk p/sysz.mk p/vax.mk p/ws.mk p/x86_cs.mk p/xap.mk p/xcore_cs.mk p/z80.mk +STATIC_ASM_PLUGINS= p/6502.mk p/arc.mk p/arm_as.mk p/arm_cs.mk p/arm_winedbg.mk p/bf.mk p/cris_gnu.mk p/dalvik.mk p/dcpu16.mk p/gb.mk p/h8300.mk p/hppa_gnu.mk p/i4004.mk p/i8080.mk p/lanai_gnu.mk p/lm32.mk p/m68k_cs.mk p/malbolge.mk p/mcs96.mk p/mips_cs.mk p/mips_gnu.mk p/nios2.mk p/pic18c.mk p/ppc_cs.mk p/ppc_gnu.mk p/riscv.mk p/sh.mk p/snes.mk p/sparc_cs.mk p/sparc_gnu.mk p/spc700.mk p/sysz.mk p/tricore.mk p/v850.mk p/vax.mk p/wasm.mk p/ws.mk p/x86_as.mk p/x86_cs.mk p/x86_nasm.mk p/x86_nz.mk p/xap.mk p/xcore_cs.mk p/z80.mk +STATIC_BIN_PLUGINS= p/any.mk p/art.mk p/bf.mk p/bflt.mk p/bios.mk p/bootimg.mk p/cgc.mk p/coff.mk p/dex.mk p/dol.mk p/dyldcache.mk p/elf.mk p/elf64.mk p/fs.mk p/mach0.mk p/mach064.mk p/mbn.mk p/menuet.mk p/mz.mk p/nes.mk p/nin3ds.mk p/ninds.mk p/ningb.mk p/ningba.mk p/nro.mk p/omf.mk p/p9.mk p/pe.mk p/pe64.mk p/pebble.mk p/psxexe.mk p/sfc.mk p/smd.mk p/sms.mk p/spc700.mk p/te.mk p/vsf.mk p/wasm.mk p/xbe.mk p/zimg.mk STATIC_BIN_XTR_PLUGINS= p/fatmach0.mk p/xtr_dyldcache.mk STATIC_BP_PLUGINS= p/arm.mk p/bf.mk p/mips.mk p/ppc.mk p/x86.mk STATIC_CORE_PLUGINS= p/anal.mk diff --git a/libr/debug/meson.build b/libr/debug/meson.build index 44b436512b..8d12f8da38 100644 --- a/libr/debug/meson.build +++ b/libr/debug/meson.build @@ -24,7 +24,6 @@ files=[ #'p/native/drx.c', #'p/native/maps/darwin.c', #'p/native/maps/windows.c', -#'p/native/procfs.c', # we need check to add this file to non win build #'p/native/reg.c', #'p/native/w32.c', #'p/native/windows/windows_debug.c', @@ -42,6 +41,11 @@ if host_os == 'linux' 'p/native/linux/linux_coredump.c' ] endif +if host_os != 'windows' + files += [ + 'p/native/procfs.c' + ] +endif if host_os == 'darwin' files += [ diff --git a/meson.build b/meson.build index e98e949c10..f7bd56a341 100644 --- a/meson.build +++ b/meson.build @@ -20,6 +20,9 @@ if host_machine.system() == 'windows' platform_librinc = ['../include/msvc'] platform_binrinc = ['../../libr/include/msvc'] host_os = 'windows' +else + platform_librinc = [] + platform_binrinc = [] endif subdir('libr/util') subdir('binr/rax2') diff --git a/plugins.meson.cfg b/plugins.meson.cfg index 1df1a9f09f..a31f376923 100644 --- a/plugins.meson.cfg +++ b/plugins.meson.cfg @@ -1,7 +1,6 @@ STATIC=" anal.arc anal.arm_cs -anal.avr anal.i4004 anal.bf anal.cris @@ -33,7 +32,6 @@ asm.6502 asm.arc asm.arm_cs asm.arm_winedbg -asm.avr asm.bf asm.cris_gnu asm.dalvik @@ -106,7 +104,6 @@ bin.pe64 bin.pebble bin.smd bin.sms -bin.avr bin.sfc bin.spc700 bin.te