Skip to content

Instantly share code, notes, and snippets.

@zampino
Created February 1, 2013 10:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zampino/4690481 to your computer and use it in GitHub Desktop.
Save zampino/4690481 to your computer and use it in GitHub Desktop.
# from https://github.com/tomz/liblinear-ruby-swig/blob/master/ext/extconf.rb
require 'mkmf'
CONFIG["LDSHARED"] = case RUBY_PLATFORM
when /darwin/
"g++ -dynamic -bundle -undefined suppress -flat_namespace"
else
"g++ -shared"
end
$CFLAGS = "#{ENV['CFLAGS']} -Wall -O3 "
if CONFIG["MAJOR"].to_i >= 1 && CONFIG["MINOR"].to_i >= 8
$CFLAGS << " -DHAVE_DEFINE_ALLOC_FUNCTION"
end
create_makefile('liblinear-ruby-swig/liblinear')
=begin
extra_mk = <<-eos
eos
File.open("Makefile", "a") do |mf|
mf.puts extra_mk
end
=end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment