change build system to rscons

This commit is contained in:
josh committed 2019-10-12 17:29:25 -04:00
1 parent 612fd112ec
commit ad6e922e07
6 files changed
+21 -110

No files matched your search

+14 -1
View File
@@ -18,7 +18,15 @@ end
build do
Environment.new do |env|
system("make -C LoadFile")
env.add_builder(:GenLoadFile) do |params|
command = ["perl", "genLoadFile.pl", "--root=../logo", "dwlogo.obj", "dwlogo.mtl"]
unless @cache.up_to_date?(@target, command, @sources, @env)
print_run_message("GenLoadFile #{@target}", nil)
system(*command, chdir: "LoadFile")
@cache.register_build(@target, command, @sources, @env)
end
true
end
env["CCFLAGS"] = %w[-O2 -Wall]
env["CPPPATH"] += %w[.]
sources = ["dwscr.cc", "wfobj/WFObj.cc", "LoadFile/LoadFile.cc"] + glob("ss/*.{cc,cpp}")
@@ -27,6 +35,11 @@ build do
else
sources += ["displayinfo.cc"]
end
loadfiles = %w[
logo/dwlogo.obj
logo/dwlogo.mtl
]
loadfile_gen = env.GenLoadFile("LoadFile/LoadFile-gen.inc", loadfiles + ["LoadFile/genLoadFile.pl"])
dwscr = env.Program("dwscr", sources)
if RUBY_PLATFORM =~ /mingw/
env.Install("C:/Windows/dwscr.scr", dwscr)