Sha256: 76db76ab6686adb703ec2581d1862bc474aaefb49848193edc36bd64aafa3527

Contents?: true

Size: 834 Bytes

Versions: 9

Compression:

Stored size: 834 Bytes

Contents

require 'mkmf'

RbConfig::MAKEFILE_CONFIG['CC'] = ENV['CC'] if ENV['CC']

$CFLAGS << " #{ENV["CFLAGS"]}"
$CFLAGS << " -g"
$CFLAGS << " -O3" unless $CFLAGS[/-O\d/]
$CFLAGS << " -Wall -Wno-comment"
$LDFLAGS << "-Wl,--exclude-libs=ALL"

def sys(cmd)
	puts " -- #{cmd}"
	unless ret = xsystem(cmd)
		raise "ERROR: '#{cmd}' failed"
	end
	ret
end

if !(MAKE = find_executable('gmake') || find_executable('make'))
	abort "ERROR: GNU make is required to build Rugged."
end

CWD = File.expand_path(File.dirname(__FILE__))
FREEIMAGE_DIR = File.join(CWD, '..', '..', 'vendor', 'FreeImage')

Dir.chdir(FREEIMAGE_DIR) do
	sys(MAKE)
end

$DEFLIBPATH.unshift("#{FREEIMAGE_DIR}/Dist")
dir_config('freeimage', "#{FREEIMAGE_DIR}/Dist", "#{FREEIMAGE_DIR}/Dist")

have_library('stdc++')
have_library('freeimage')

create_makefile("rfreeimage/rfreeimage")

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
rfreeimage-0.2.1 ext/rfreeimage/extconf.rb
rfreeimage-0.2.4 ext/rfreeimage/extconf.rb
rfreeimage-0.2.0 ext/rfreeimage/extconf.rb
rfreeimage-0.1.9 ext/rfreeimage/extconf.rb
rfreeimage-0.1.8 ext/rfreeimage/extconf.rb
rfreeimage-0.1.7 ext/rfreeimage/extconf.rb
rfreeimage-0.1.6 ext/rfreeimage/extconf.rb
rfreeimage-0.1.5 ext/rfreeimage/extconf.rb
rfreeimage-0.1.3 ext/rfreeimage/extconf.rb