Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 29 lines (23 sloc) 0.932 kB
1390e5f @luislavena Cleanup extension building process and dependencies.
luislavena authored
1 # use rake-compiler for building the extension
2 require 'rake/extensiontask'
3
f8dd52d @luislavena Updated extension tasks to match newer structure.
luislavena authored
4 # build sqlite3_native C extension
5 Rake::ExtensionTask.new('sqlite3_native', HOE.spec) do |ext|
6 # where to locate the extension
7 ext.ext_dir = 'ext/sqlite3'
8
f344924 @luislavena Build sqlite3_api C extension for cross compilation.
luislavena authored
9 # reference to the sqlite3 library
10 sqlite3_lib = File.expand_path(File.join(File.dirname(__FILE__), '..', 'vendor', 'sqlite3'))
11
12 # automatically add build options to avoid need of manual input
13 if RUBY_PLATFORM =~ /mswin|mingw/ then
f8dd52d @luislavena Updated extension tasks to match newer structure.
luislavena authored
14 # define target for extension (supporting fat binaries)
15 RUBY_VERSION =~ /(\d+\.\d+)/
16 ext.lib_dir = "lib/sqlite3/#{$1}"
f344924 @luislavena Build sqlite3_api C extension for cross compilation.
luislavena authored
17 ext.config_options << "--with-sqlite3-dir=#{sqlite3_lib}"
17608ff @luislavena Trigger cross-compilation anything except Windows.
luislavena authored
18 else
19 ext.cross_compile = true
20 ext.cross_platform = ['i386-mswin32', 'i386-mingw32']
21 ext.cross_config_options << "--with-sqlite3-dir=#{sqlite3_lib}"
f344924 @luislavena Build sqlite3_api C extension for cross compilation.
luislavena authored
22 end
23 end
1390e5f @luislavena Cleanup extension building process and dependencies.
luislavena authored
24
e7c3813 @luislavena Adapt Rakefiles to Hoe.
luislavena authored
25 # ensure things are compiled prior testing
26 task :test => [:compile]
f8dd52d @luislavena Updated extension tasks to match newer structure.
luislavena authored
27
28 # vim: syntax=ruby
Something went wrong with that request. Please try again.