1 require 'lib/ffi/generator_task'
3 desc "Build extensions from lib/ext"
4 task :extensions => %w[
7 extension:digest_rmd160
21 namespace :extension do
22 FFI::Generator::Task.new %w[
30 task :digest_md5 => "lib/ext/digest/md5/md5.#{$dlext}"
32 file "lib/ext/digest/md5/md5.#{$dlext}" => FileList[
33 'shotgun/lib/subtend/*',
34 'lib/ext/digest/md5/build.rb',
35 'lib/ext/digest/md5/*.c',
36 'lib/ext/digest/md5/*.h',
37 'lib/ext/digest/defs.h',
39 compile 'lib/ext/digest/md5'
42 task :digest_rmd160 => "lib/ext/digest/rmd160/rmd160.#{$dlext}"
44 file "lib/ext/digest/rmd160/rmd160.#{$dlext}" => FileList[
45 'shotgun/lib/subtend/*',
46 'lib/ext/digest/rmd160/build.rb',
47 'lib/ext/digest/rmd160/*.c',
48 'lib/ext/digest/rmd160/*.h',
49 'lib/ext/digest/defs.h',
51 compile 'lib/ext/digest/rmd160'
54 task :digest_sha1 => "lib/ext/digest/sha1/sha1.#{$dlext}"
56 file "lib/ext/digest/sha1/sha1.#{$dlext}" => FileList[
57 'shotgun/lib/subtend/*',
58 'lib/ext/digest/sha1/build.rb',
59 'lib/ext/digest/sha1/*.c',
60 'lib/ext/digest/sha1/*.h',
61 'lib/ext/digest/defs.h',
63 compile 'lib/ext/digest/sha1'
66 task :digest_sha2 => "lib/ext/digest/sha2/sha2.#{$dlext}"
68 file "lib/ext/digest/sha2/sha2.#{$dlext}" => FileList[
69 'shotgun/lib/subtend/*',
70 'lib/ext/digest/sha2/build.rb',
71 'lib/ext/digest/sha2/*.c',
72 'lib/ext/digest/sha2/*.h',
73 'lib/ext/digest/defs.h',
75 compile 'lib/ext/digest/sha2'
78 task :mongrel => "lib/ext/mongrel/http11.#{$dlext}"
80 file "lib/ext/mongrel/http11.#{$dlext}" => FileList[
81 'shotgun/lib/subtend/*',
82 'lib/ext/mongrel/build.rb',
83 'lib/ext/mongrel/*.c',
84 'lib/ext/mongrel/*.h',
86 compile "lib/ext/mongrel"
89 task :readline => %W[lib/ext/readline/readline.#{$dlext} lib/readline.rb]
91 file "lib/ext/readline/readline.#{$dlext}" => FileList[
92 'shotgun/lib/subtend/*',
93 'lib/ext/readline/build.rb',
94 'lib/ext/readline/*.c'
96 compile "lib/ext/readline"