1
0
Fork 0
mirror of https://github.com/puma/puma.git synced 2022-11-09 13:48:40 -05:00
puma--puma/tasks/native.rake
Luis Lavena c79c3b786a Try loading versioned http parser first.
Also, add the versioned directory to the clean task
2010-04-28 02:22:58 -03:00

25 lines
739 B
Ruby

# use rake-compiler for building the extension
require 'rake/extensiontask'
# build http11 C extension
Rake::ExtensionTask.new('http11', HOE.spec) do |ext|
# define target for extension (supporting fat binaries)
if RUBY_PLATFORM =~ /mingw|mswin/ then
RUBY_VERSION =~ /(\d+\.\d+)/
ext.lib_dir = "lib/#{$1}"
else
# define cross-compilation tasks when not on Windows.
ext.cross_compile = true
ext.cross_platform = ['i386-mswin32', 'i386-mingw32']
ext.cross_compiling do |gs|
gs.dependencies.delete gs.dependencies.find { |d| d.name == 'daemons' }
end
end
# cleanup versioned library directory
CLEAN.include 'lib/{1.8,1.9}'
end
# ensure things are built prior testing
task :test => [:compile]