File: extconf.rb

package info (click to toggle)
libserialport-ruby 0.7.0-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 140 kB
  • ctags: 113
  • sloc: ansic: 1,331; ruby: 59; makefile: 7
file content (13 lines) | stat: -rwxr-xr-x 288 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
require 'mkmf'

printf("checking for OS... ")
STDOUT.flush
os = /-([a-z]+)/.match(RUBY_PLATFORM)[1]
puts(os)
$CFLAGS += " -DOS_#{os.upcase}"

if !(os == 'mswin' or os == 'bccwin')
  exit(1) if not have_header("termios.h") or not have_header("unistd.h")
end

create_makefile('serialport')