From ca5a68ebb30bc5d3e42773f8f0cc7dded7a9f9c2 Mon Sep 17 00:00:00 2001 From: xarkes Date: Tue, 20 Jun 2017 11:12:42 +0200 Subject: [PATCH] Adding files to meson + windows env refactor --- binr/rabin2/meson.build | 2 +- libr/anal/meson.build | 8 ++++---- libr/asm/meson.build | 4 ++-- libr/bin/meson.build | 4 ++-- libr/core/core.c | 7 +++---- shlr/meson.build | 26 +++++++++++++------------- 6 files changed, 25 insertions(+), 26 deletions(-) diff --git a/binr/rabin2/meson.build b/binr/rabin2/meson.build index cc5d258a0c..c68ee07af0 100644 --- a/binr/rabin2/meson.build +++ b/binr/rabin2/meson.build @@ -1,7 +1,7 @@ executable('rabin2', 'rabin2.c', include_directories: [platform_inc], - link_with: [r_util, r_cons, r_config, r_hash, r_io, r_crypto, r_core, r_magic], + link_with: [r_util, r_cons, r_config, r_hash, r_io, r_crypto, r_core, r_magic, libr2java], objects: [ libr2sdb.extract_all_objects(), r_bin.extract_all_objects() diff --git a/libr/anal/meson.build b/libr/anal/meson.build index e66c768b72..1e3bdc9451 100644 --- a/libr/anal/meson.build +++ b/libr/anal/meson.build @@ -61,12 +61,12 @@ files=[ 'p/anal_vax.c', 'p/anal_ws.c', 'p/anal_x86_cs.c', -#'p/anal_x86_udis.c', +'p/anal_x86_udis.c', 'p/anal_xap.c', 'p/anal_xcore_cs.c', #'p/anal_xtensa.c', 'p/anal_z80.c', -#'p/esil_x86_udis.c', +'p/esil_x86_udis.c', 'pin.c', 'ref.c', 'reflines.c', @@ -83,7 +83,7 @@ files=[ r_anal = shared_library('r_anal', files, include_directories: [platform_inc, include_directories([ 'arch/gb', - '../asm/arch/8051', + '../asm/arch/8051', '../asm/arch/cr16', '../asm/arch/include/', '../../shlr/capstone/include', @@ -91,7 +91,7 @@ r_anal = shared_library('r_anal', files, ])], c_args : ['-DCORELIB=1', '-I' + meson.current_build_dir() + '/../..'], - link_with: [r_util, r_reg, r_syscall, r_search, r_cons], + link_with: [r_util, r_reg, r_syscall, r_search, r_cons, libr2udis86], objects: [ libr2capstone.extract_all_objects(), libr2sdb.extract_all_objects(), diff --git a/libr/asm/meson.build b/libr/asm/meson.build index dae9f4d693..f426ebb60f 100644 --- a/libr/asm/meson.build +++ b/libr/asm/meson.build @@ -21,7 +21,7 @@ files=[ 'p/asm_hppa_gnu.c', 'p/asm_i4004.c', 'p/asm_i8080.c', -#'p/asm_java.c', +'p/asm_java.c', 'p/asm_lanai_gnu.c', 'p/asm_lh5801.c', 'p/asm_lm32.c', @@ -156,7 +156,7 @@ r_asm = shared_library('r_asm', files, 'arch/8051', ])], c_args : ['-DCORELIB=1', '-I' + meson.current_build_dir() + '/../..'], - link_with: [r_util, r_syscall, r_parse, r_lang, r_flag, r_socket, libr2udis86], + link_with: [r_util, r_syscall, r_parse, r_lang, r_flag, r_socket, libr2java, libr2udis86], objects: [ libr2capstone.extract_all_objects(), libr2sdb.extract_all_objects(), diff --git a/libr/bin/meson.build b/libr/bin/meson.build index 27a23e7818..0d4d3221a0 100644 --- a/libr/bin/meson.build +++ b/libr/bin/meson.build @@ -23,7 +23,7 @@ files=[ 'p/bin_elf.c', 'p/bin_elf64.c', 'p/bin_fs.c', -#'p/bin_java.c', +'p/bin_java.c', 'p/bin_mach0.c', 'p/bin_mach064.c', 'p/bin_mbn.c', @@ -110,7 +110,7 @@ r_bin = shared_library('r_bin', files, 'format' ])], c_args : ['-DCORELIB=1', '-I' + meson.current_build_dir() + '/../..'], - link_with: [r_util, r_io, r_socket, r_magic], + link_with: [r_util, r_io, r_socket, r_magic, libr2java], objects: [ libr2sdb.extract_all_objects() ], diff --git a/libr/core/core.c b/libr/core/core.c index 814d251e67..5b54550260 100644 --- a/libr/core/core.c +++ b/libr/core/core.c @@ -1532,13 +1532,12 @@ R_API const char *r_core_anal_optype_colorfor(RCore *core, ut64 addr, bool verbo static void r_core_setenv (RCore *core) { char *e = r_sys_getenv ("PATH"); - char *h = r_str_home (".config/radare2/prefix/bin"); #if __WINDOWS__ && !__CYGWIN__ - char sep = ';'; + char *h = r_str_home(".config\\radare2\\prefix\\bin;"); #else - char sep = ':'; + char *h = r_str_home(".config/radare2/prefix/bin:"); #endif - char *n = r_str_newf ("%s%c%s", h, sep, e); + char *n = r_str_newf ("%s%s", h, e); r_sys_setenv ("PATH", n); free (n); free (h); diff --git a/shlr/meson.build b/shlr/meson.build index e80dd4016f..ba34ca30ba 100644 --- a/shlr/meson.build +++ b/shlr/meson.build @@ -30,19 +30,19 @@ libr2gdb = static_library('libr2gdb', gdb_files, ])] ) -#java_files=[ -#'java/class.c', -#'java/code.c', -#'java/dsojson.c', -#'java/ops.c', -##'java/main.c', -#] -# -#libr2java = static_library('libr2java', java_files, -# include_directories: [platform_inc, include_directories([ -# 'java' -# ])] -#) +java_files=[ +'java/class.c', +'java/code.c', +'java/dsojson.c', +'java/ops.c', +#'java/main.c', +] + +libr2java = static_library('libr2java', java_files, + include_directories: [platform_inc, include_directories([ + 'java' + ])] +) qnx_files=[ 'qnx/src/core.c',