Sha256: 66d9f191767719ef61051af70da9c922c12994dd426f8ece4d4243ba07ea0042
Contents?: true
Size: 1.31 KB
Versions: 1
Compression:
Stored size: 1.31 KB
Contents
require 'mkmf' def windows? (/cygwin|mswin|mingw|bccwin|wince|emx/ =~ RUBY_PLATFORM) != nil end def mac? (/darwin/ =~ RUBY_PLATFORM) != nil end def unix? !windows? end puts "compiling libndtypes on your machine..." Dir.chdir(File.join(File.dirname(__FILE__) + "/ndtypes")) do if unix? ["libndtypes", "libndtypes/compat", "libndtypes/serialize"].each do |f| Dir.chdir(f) do Dir.mkdir(".objs") unless Dir.exists? ".objs" end end system("./configure --prefix=#{File.expand_path("../")} --with-docs=no") system("make") system("make install") elsif windows? raise NotImplementedError, "need to specify build instructions for windows." end end $INSTALLFILES = [ ["ruby_ndtypes.h", "$(archdir)"] ] binaries = File.expand_path(File.join(File.dirname(__FILE__) + "/lib/")) headers = File.expand_path(File.join(File.dirname(__FILE__) + "/include/")) $LOAD_PATH << File.expand_path(binaries) ["ndtypes"].each do |lib| find_library(lib, nil, binaries) end ["ndtypes.h"].each do |header| find_header(header, headers) have_header(header) end dir_config("ndtypes", [headers], [binaries]) basenames = %w{gc_guard ruby_ndtypes} $objs = basenames.map { |b| "#{b}.o" } $srcs = basenames.map { |b| "#{b}.c" } $CFLAGS += " -O0 -g " create_makefile("ruby_ndtypes/ruby_ndtypes")
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ndtypes-0.2.0dev4 | ext/ruby_ndtypes/extconf.rb |