1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
|
# extconf.rb for ruby-opengl's glut extension module.
#
# Copyright (C) 2006 John M. Gabriele <jmg3000@gmail.com>
#
# This program is distributed under the terms of the MIT license.
# See the included COPYRIGHT file for the terms of this license.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#require 'rubygems'
require 'mkrf'
RUBYVER = " -DRUBY_VERSION=" + RUBY_VERSION.split(".").join
Mkrf::Generator.new( 'glut' ) do |g|
case RUBY_PLATFORM
when /darwin/
g.cflags << RUBYVER
g.ldshared << ' -framework GLUT -framework OpenGL -framework Cocoa'
when /mswin32/
g.cflags << ' -DWIN32' + RUBYVER
g.include_library( 'glut32.lib', 'glutSolidTeapot' )
g.include_library( 'glu32.lib', 'gluLookAt' )
g.include_library( 'opengl32.lib', 'glVertex3d' )
else
g.cflags << RUBYVER
g.include_library( 'glut', 'glutSolidTeapot' )
g.include_library( 'GLU', 'gluLookAt' )
g.include_library( 'GL', 'glVertex3d')
end
end
|