Update build system and modules.

This commit is contained in:
Josh Holtrop 2020-12-24 17:32:23 -05:00
parent 6255cafefc
commit 7eb9b9c291
9 changed files with 40 additions and 19 deletions

3
.gitignore vendored
View File

@ -1,3 +1,4 @@
/.rsconscache
/app /app
/app.exe /app.exe
/build/
/.rscons*

View File

@ -1,4 +1,7 @@
default: .PHONY: all
all:
./rscons build
%: .PHONY: clean
rake $@ clean:
./rscons clean

View File

@ -1,13 +1,9 @@
require "bundler" configure do
begin check_d_compiler
Bundler.setup(:default, :development)
rescue Bundler::BundlerError => e
raise "Unable to Bundler.setup(): You probably need to run `bundle install`: " + e.message
end end
require "rscons"
task :default do build do
Rscons::Environment.new(echo: :short) do |env| Environment.new do |env|
sources = [] sources = []
dirs = [ dirs = [
"source", "source",
@ -17,7 +13,7 @@ task :default do
"modules/gl3n/gl3n", "modules/gl3n/gl3n",
"modules/glamour/glamour", "modules/glamour/glamour",
].each do |dir| ].each do |dir|
sources += Dir["#{dir}/**/*.d"] sources += glob("#{dir}/**/*.d")
end end
env["D_IMPORT_PATH"] += [ env["D_IMPORT_PATH"] += [
"modules/DerelictUtil/source", "modules/DerelictUtil/source",
@ -28,8 +24,6 @@ task :default do
] ]
env["DFLAGS"] += ["-fversion=Derelict3", "-fversion=gl3n", "-fversion=SDLImage"] env["DFLAGS"] += ["-fversion=Derelict3", "-fversion=gl3n", "-fversion=SDLImage"]
env["LDFLAGS"] += ["-static-libgcc"] env["LDFLAGS"] += ["-static-libgcc"]
env.build_dir("source", "build")
env.build_dir("modules", "build")
env.Program("app", sources) env.Program("app", sources)
end end
end end

2
configure vendored Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
exec "$(dirname "$0")"/rscons configure "$@"

@ -1 +1 @@
Subproject commit 5b5dc05dc2b4b0161b9c2f6cbf925ee79a330733 Subproject commit 8b7e918625a37fbe311d62d9c5067732da30b0f1

@ -1 +1 @@
Subproject commit 0497c1854fad4f66a50555b6673806bb063988a9 Subproject commit 9543750bb20fbbe7556ce4d929b024db43081693

@ -1 +1 @@
Subproject commit 53ca48be5a664ad24464a8e608ff6a3b205970e7 Subproject commit 2de2a9b63f8cdfbd8270afa8a4dc28f4ffaa868c

@ -1 +1 @@
Subproject commit 06126da4343b9cbb700509c485f23e086fd34a37 Subproject commit 38163664f5d960ba92c8d2fe8ab058601e7dd5ab

21
rscons Executable file

File diff suppressed because one or more lines are too long