mirror of
https://github.com/radareorg/radare2.git
synced 2024-12-14 00:38:55 +00:00
e76216e92a
* Add STATIC_DEBUG and RUNTIME_DEBUG config.mk variables - Mirrored in C as R_DEBUG and R_RTDEBUG - Defines IFDBG and IFRTDBG macros - used in r_lib, checks for RLIB_RTDEBUG environment variable * Added -f and -L flags to radare2 * Added initial dummy work on r_crypto module - Added 'aes' algorithm * Added EXTRA_TARGETS and EXTRA_CLEAN targets in makefiles to build extra programs or libraries in a single directory * Initial working stuff with hg's bdiff.c - Working as a line based diffing tool. 'linediff' - Added 2 files for testing linediff * Prefix io plugins with io_ - Added ewf and shm io plugins * Prefix lang plugins with lang_
47 lines
1012 B
Ruby
47 lines
1012 B
Ruby
# setup with ruby!
|
|
|
|
rb_so = 'lang_ruby.so'
|
|
rb_c = 'ruby.c'
|
|
rb_o = 'ruby.o'
|
|
inc = '../../include'
|
|
|
|
require 'mkmf'
|
|
INCDIR = Config::CONFIG['rubylibdir'] + "/"+Config::CONFIG['arch']
|
|
LIBDIR = Config::CONFIG['LIBRUBY_ARG_SHARED']
|
|
#LIBS = Config::CONFIG['LIBS'] -lpthread...
|
|
LIBNAM = Config::CONFIG['RUBY_INSTALL_NAME']
|
|
#LDSHARED=compilername -shared..."
|
|
|
|
if ARGV[0] != nil; rb_c = ARGV[0] end
|
|
if ARGV[1] != nil; rb_so = ARGV[1] end
|
|
if ARGV[2] != nil; inc = ARGV[2] end
|
|
|
|
$cc=ENV["CC"]
|
|
if $cc == nil then
|
|
$cc="cc"
|
|
end
|
|
|
|
tobeup=false
|
|
begin
|
|
d0 = File.stat(rb_so).mtime.to_i
|
|
d1 = File.stat(rb_c).mtime.to_i
|
|
if d1 > d0 then
|
|
tobeup=true
|
|
end
|
|
rescue
|
|
tobeup=true
|
|
end
|
|
|
|
def runline(line)
|
|
puts line
|
|
system(line)
|
|
end
|
|
|
|
if tobeup then
|
|
# runline("#{$cc} -I #{inc} -I#{INCDIR} #{rb_c} -fPIC -c #{LIBDIR}" \
|
|
# " -l#{LIBNAM} #{ENV['CFLAGS']} #{ENV['LDFLAGS']} -o #{rb_o}")
|
|
runline("#{$cc} -I #{inc} -I#{INCDIR} #{rb_c} -fPIC -shared #{LIBDIR}" \
|
|
" -l#{LIBNAM} #{ENV['CFLAGS']} #{ENV['LDFLAGS']} -o #{rb_so}")
|
|
end
|
|
exit 0
|
|
|