Sha256: 361acb3af0f9f23c202e51e8b31fdd976f95d35ec03b95e081185b97d7ccee93

Contents?: true

Size: 1.09 KB

Versions: 1

Compression:

Stored size: 1.09 KB

Contents

# Loads mkmf which is used to make makefiles for Ruby extensions
require 'mkmf'

# Load Libraries

LIBDIR      = RbConfig::CONFIG['libdir']
INCLUDEDIR  = RbConfig::CONFIG['includedir']

HEADER_DIRS = [
  # First search /opt/local for macports
  '/opt/local/include',

  # Then search /usr/local for people that installed from source
  '/usr/local/include',

  # Check the ruby install locations
  INCLUDEDIR,

  # Finally fall back to /usr
  '/usr/include',
]

LIB_DIRS = [
  # First search /opt/local for macports
  '/opt/local/lib',

  # Then search /usr/local for people that installed from source
  '/usr/local/lib',

  # Check the ruby install locations
  LIBDIR,

  # Finally fall back to /usr
  '/usr/lib',
]
unless find_header('bcm2835.h')
  abort 'bcm2835 is missing'
end

unless have_library('bcm2835') && append_library($libs, 'bcm2835')
  abort "Can't Appended Library bcm2835!"
end

dir_config('bcm2835', HEADER_DIRS, LIB_DIRS)

$CFLAGS << ' -std=c99'

# Give it a name
#extension_name = 'dht_sensor'

# The destination
#dir_config(extension_name)

# Do the work
create_makefile("dht_sensor/dht_sensor")

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
dht_sensor-0.0.1 ext/dht_sensor/extconf.rb