Skip to content

Commit

Permalink
Clean extconf.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
pioz committed Aug 29, 2024
1 parent 3fafec6 commit 87c36ad
Showing 1 changed file with 1 addition and 26 deletions.
27 changes: 1 addition & 26 deletions ext/chess/extconf.rb
Original file line number Diff line number Diff line change
@@ -1,33 +1,8 @@
# 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'
$CFLAGS += ' -std=c99'

create_makefile('chess/chess')

0 comments on commit 87c36ad

Please sign in to comment.