Sha256: 0c79c60d7c596cc1a06438503e2971eebc722dd86d9efa198f586c7dc034b3df

Contents?: true

Size: 879 Bytes

Versions: 2

Compression:

Stored size: 879 Bytes

Contents

# Creating a gem that includes an extension that is built at install time
# https://guides.rubygems.org/gems-with-extensions/

ENV['RC_ARCHS'] = '' if RUBY_PLATFORM.include?('darwin')

require 'mkmf'

INCLUDE_DIRS = [
  # Check the ruby install locations
  RbConfig::CONFIG['includedir'],
  # First earch /opt/local for macports
  '/opt/local/include',
  # Then search /usr/local for people that installed from source
  '/usr/local/include',
  # Finally fall back to /usr
  '/usr/include'
].freeze

LIB_DIRS = [
  # Check the ruby install locations
  RbConfig::CONFIG['libdir'],
  # First search /opt/local for macports
  '/opt/local/lib',
  # Then search /usr/local for people that installed from source
  '/usr/local/lib',
  # Finally fall back to /usr
  '/usr/lib'
].freeze

# dir_config('chess', INCLUDE_DIRS, LIB_DIRS)
$CFLAGS << ' -std=c99'

create_makefile('chess/chess')

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
chess-0.3.6 ext/chess/extconf.rb
chess-0.3.5 ext/chess/extconf.rb