File: Rakefile

package info (click to toggle)
ruby-ffi-compiler 1.0.1-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 156 kB
  • sloc: ruby: 556; ansic: 16; makefile: 4
file content (10 lines) | stat: -rw-r--r-- 344 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
require 'ffi-compiler/compile_task'

FFI::Compiler::CompileTask.new('example') do |t|
  t.have_header?('stdio.h', '/usr/local/include')
  t.have_func?('puts')
  t.have_library?('z')
  t.cflags << "-arch x86_64 -arch i386" if t.platform.mac?
  t.ldflags << "-arch x86_64 -arch i386" if t.platform.mac?
  t.export '../lib/example/example.rb'
end