Sha256: e61e6f40a17b16a6fa8ec736ba3657d9d1fdc18dc6f9d8ce0bf8bc517e4c1664
Contents?: true
Size: 892 Bytes
Versions: 10
Compression:
Stored size: 892 Bytes
Contents
require 'mkmf' require 'rubygems' require 'libyajl2' RbConfig::MAKEFILE_CONFIG['CC'] = ENV['CC'] if ENV['CC'] # pick up the vendored libyajl2 out of the libyajl2 gem $CFLAGS = "-I#{Libyajl2.include_path} #{$CFLAGS}" $LDFLAGS = "-L#{Libyajl2.opt_path} #{$LDFLAGS}" puts $CFLAGS puts $LDFLAGS # except if you're doing an unoptimized gcc install we're going to help you out a bit if RbConfig::MAKEFILE_CONFIG['CC'] =~ /gcc|clang/ $CFLAGS << " -O3" unless $CFLAGS[/-O\d/] # how many people realize that -Wall is a compiler-specific flag??? # apparently not many based on reading lots of shitty extconf.rb's out there $CFLAGS << " -Wall" end def windows? !!(RUBY_PLATFORM =~ /mswin|mingw|windows/) end if windows? # include our libyajldll.a definitions on windows in the libyajl2 gem $libs = "#{$libs} -lyajldll" end dir_config 'parser' create_makefile 'ffi_yajl/ext/parser'
Version data entries
10 entries across 10 versions & 1 rubygems