Change build system to rscons.

This commit is contained in:
Josh Holtrop 2020-12-25 11:33:39 -05:00
parent d797590acb
commit e4d3a542f9
6 changed files with 46 additions and 181 deletions

4
.gitignore vendored
View File

@ -1,3 +1,3 @@
/.rscons*
/build/
/.waf*
/.lock-waf*
/freetype2gl3

View File

@ -1,11 +1,7 @@
.PHONY: build
build:
./waf build
.PHONY: all
all:
./rscons build
.PHONY: clean
clean:
./waf clean
.PHONY: distclean
distclean:
./waf distclean
./rscons clean

18
Rsconscript Normal file
View File

@ -0,0 +1,18 @@
configure do
check_c_compiler
check_cxx_compiler
check_cfg package: "sdl2"
check_cfg package: "freetype2"
end
build do
Environment.new do |env|
env["CCFLAGS"] += %W[-Wall]
env["CXXFLAGS"] += %W[-std=gnu++14]
env["CPPPATH"] += glob("libs/glcxx/include", "libs/glm", "src")
env["CPPDEFINES"] += %W[GLCXX_GL_INCLUDE="GL3/gl3w.h"]
env["LIBS"] += %W[dl GL]
sources = glob("src/**/*.{c,cc}", "libs/glcxx/src/**/*.cpp")
env.Program("freetype2gl3", sources)
end
end

2
configure vendored
View File

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

21
rscons Executable file

File diff suppressed because one or more lines are too long

170
waf vendored

File diff suppressed because one or more lines are too long