add rscons and Rsconscript
This commit is contained in:
parent
71b792dcb4
commit
612fd112ec
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
/build/
|
||||
/.rscons*
|
||||
/dwscr
|
35
Rsconscript
Normal file
35
Rsconscript
Normal file
@ -0,0 +1,35 @@
|
||||
configure do
|
||||
unless File.exists?("wfobj/WFObj.cc")
|
||||
$stderr.puts "git submodules appear to be missing. Run `git submodule update --init`."
|
||||
exit 1
|
||||
end
|
||||
if RUBY_PLATFORM =~ /mingw/
|
||||
check_lib "opengl32"
|
||||
check_lib "glu32"
|
||||
check_lib "mingw32"
|
||||
else
|
||||
check_lib "X11"
|
||||
check_lib "GL"
|
||||
check_lib "GLU"
|
||||
end
|
||||
check_lib "ode"
|
||||
check_cfg program: "sdl-config"
|
||||
end
|
||||
|
||||
build do
|
||||
Environment.new do |env|
|
||||
system("make -C LoadFile")
|
||||
env["CCFLAGS"] = %w[-O2 -Wall]
|
||||
env["CPPPATH"] += %w[.]
|
||||
sources = ["dwscr.cc", "wfobj/WFObj.cc", "LoadFile/LoadFile.cc"] + glob("ss/*.{cc,cpp}")
|
||||
if RUBY_PLATFORM =~ /mingw/
|
||||
sources += ["displayinfo-win32.cc"]
|
||||
else
|
||||
sources += ["displayinfo.cc"]
|
||||
end
|
||||
dwscr = env.Program("dwscr", sources)
|
||||
if RUBY_PLATFORM =~ /mingw/
|
||||
env.Install("C:/Windows/dwscr.scr", dwscr)
|
||||
end
|
||||
end
|
||||
end
|
Loading…
x
Reference in New Issue
Block a user