Updated Rakefile
git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1776 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
parent
206aebd46a
commit
95068deecc
@ -23,8 +23,8 @@ spec = Gem::Specification.new do |s|
|
|||||||
s.name = "rbSFML"
|
s.name = "rbSFML"
|
||||||
s.version = RUBYSFML_VERSION
|
s.version = RUBYSFML_VERSION
|
||||||
s.authors = ["Henrik Valter Vogelius Hansson", 'Brandon Whitehead']
|
s.authors = ["Henrik Valter Vogelius Hansson", 'Brandon Whitehead']
|
||||||
|
|
||||||
s.email = "groogy@groogy.se"
|
s.email = "groogy@groogy.se"
|
||||||
|
s.homepage = 'http://sfml-dev.org'
|
||||||
s.summary = "Ruby bindings for SFML 2.0"
|
s.summary = "Ruby bindings for SFML 2.0"
|
||||||
s.has_rdoc = true
|
s.has_rdoc = true
|
||||||
s.requirements << 'none'
|
s.requirements << 'none'
|
||||||
@ -37,18 +37,11 @@ spec = Gem::Specification.new do |s|
|
|||||||
fl.include("sfml-all/all/*.cpp", "sfml-all/all/*.hpp")
|
fl.include("sfml-all/all/*.cpp", "sfml-all/all/*.hpp")
|
||||||
end
|
end
|
||||||
s.extensions = ["Rakefile"]
|
s.extensions = ["Rakefile"]
|
||||||
|
|
||||||
s.description = <<-EOF
|
s.description = <<-EOF
|
||||||
rbSFML are bindings for the SFML library version 2.0 for Ruby.
|
rbSFML are bindings for the SFML library version 2.0 for Ruby.
|
||||||
SFML or Simple Fast Multimedia library is is a free multimedia C++ API
|
SFML or Simple Fast Multimedia library is is a free multimedia C++ API
|
||||||
that provides you low and high level access to graphics, input, audio, etc.
|
that provides you low and high level access to graphics, input, audio, etc.
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
s.homepage = 'http://sfml-dev.org'
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
s.extra_rdoc_files = FileList.new do |fl|
|
s.extra_rdoc_files = FileList.new do |fl|
|
||||||
fl.include "doc/*.rdoc"
|
fl.include "doc/*.rdoc"
|
||||||
end
|
end
|
||||||
@ -110,12 +103,14 @@ LOCATION = CONFIG['sitearchdir'] + '/sfml'
|
|||||||
RUBYSFML_INC = "sfml-system/system"
|
RUBYSFML_INC = "sfml-system/system"
|
||||||
SFML_INC = ENV.key?('SFML_INCLUDE') ? ENV['SFML_INCLUDE'] : '../../include'
|
SFML_INC = ENV.key?('SFML_INCLUDE') ? ENV['SFML_INCLUDE'] : '../../include'
|
||||||
SFML_LIB = ENV.key?('SFML_LIB') ? ENV['SFML_LIB'] : '../../lib'
|
SFML_LIB = ENV.key?('SFML_LIB') ? ENV['SFML_LIB'] : '../../lib'
|
||||||
SFML_LIBS = '-lsfml-audio -lsfml-graphics -lsfml-window -lsfml-system'
|
SFML_LIBS = '-lsfml-audio-s -lsfml-graphics-s -lsfml-window-s -lsfml-system-s'
|
||||||
RUBY_INC = CONFIG['rubyhdrdir']
|
RUBY_INC = CONFIG['rubyhdrdir']
|
||||||
RUBY_LIB = (CONFIG['ENABLE_SHARED'] == 'yes' ? CONFIG['LIBRUBYARG_SHARED'] : CONFIG['LIBRUBYARG_STATIC']) + ' ' + CONFIG['SOLIBS']
|
RUBY_LIB = (CONFIG['ENABLE_SHARED'] == 'yes' ? CONFIG['LIBRUBYARG_SHARED'] : CONFIG['LIBRUBYARG_STATIC']) + ' ' + CONFIG['SOLIBS']
|
||||||
RUBY_LIB_PATH = CONFIG['libdir']
|
RUBY_LIB_PATH = CONFIG['libdir']
|
||||||
LINK = CONFIG['LDSHARED']
|
LINK = CONFIG['LDSHAREDXX']
|
||||||
LINK_FLAGS = CONFIG['DLDFLAGS']
|
LINK.sub!("$(if $(filter-out -g -g0,#{CONFIG["debugflags"]}),,-s)", '')
|
||||||
|
LINK_FLAGS = CONFIG['DLDFLAGS'] + " " + CONFIG['LDFLAGS']
|
||||||
|
LINK_FLAGS.sub!("$(DEFFILE)", "")
|
||||||
|
|
||||||
SO_SRCS.each_key {|dir| directory "#{OBJDIR}/#{dir}"}
|
SO_SRCS.each_key {|dir| directory "#{OBJDIR}/#{dir}"}
|
||||||
directory SODIR
|
directory SODIR
|
||||||
@ -129,6 +124,7 @@ SO_SRCS.each do |so_file, list|
|
|||||||
file objfile => [srcfile, objdir] do
|
file objfile => [srcfile, objdir] do
|
||||||
puts "Compiling #{File.basename(srcfile)}"
|
puts "Compiling #{File.basename(srcfile)}"
|
||||||
sh "#{CC} #{CFLAGS} -c #{srcfile} -o #{objfile} -I#{SFML_INC} -I#{RUBY_INC} -I#{RUBY_INC}/#{CONFIG['arch']} -I#{RUBYSFML_INC}"
|
sh "#{CC} #{CFLAGS} -c #{srcfile} -o #{objfile} -I#{SFML_INC} -I#{RUBY_INC} -I#{RUBY_INC}/#{CONFIG['arch']} -I#{RUBYSFML_INC}"
|
||||||
|
#p "#{CC} #{CFLAGS} -c #{srcfile} -o #{objfile} -I#{SFML_INC} -I#{RUBY_INC} -I#{RUBY_INC}/#{CONFIG['arch']} -I#{RUBYSFML_INC}"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
rescue
|
rescue
|
||||||
@ -139,6 +135,7 @@ SO_OBJS.each do |so_file, objs|
|
|||||||
begin
|
begin
|
||||||
file "#{SODIR}/#{so_file}.so" => [*objs, SODIR] do
|
file "#{SODIR}/#{so_file}.so" => [*objs, SODIR] do
|
||||||
puts "Linking files to create #{so_file}.so"
|
puts "Linking files to create #{so_file}.so"
|
||||||
|
#p "#{LINK} -o #{SODIR}/#{so_file}.so #{objs} -L. -L#{SFML_LIB} -L#{RUBY_LIB_PATH} #{LINK_FLAGS} #{RUBY_LIB} #{SFML_LIBS}"
|
||||||
sh "#{LINK} -o #{SODIR}/#{so_file}.so #{objs} -L. -L#{SFML_LIB} -L#{RUBY_LIB_PATH} #{LINK_FLAGS} #{RUBY_LIB} #{SFML_LIBS}"
|
sh "#{LINK} -o #{SODIR}/#{so_file}.so #{objs} -L. -L#{SFML_LIB} -L#{RUBY_LIB_PATH} #{LINK_FLAGS} #{RUBY_LIB} #{SFML_LIBS}"
|
||||||
end
|
end
|
||||||
rescue
|
rescue
|
||||||
|
Loading…
Reference in New Issue
Block a user