add Rsconsfile

This commit is contained in:
Josh Holtrop 2018-07-25 21:30:14 -04:00
parent 50cd9efd86
commit 663ed8c465
3 changed files with 10 additions and 16 deletions

1
.gitignore vendored
View File

@ -1,5 +1,6 @@
/.lock-waf*
/.waf*
/.rsconscache
/build/
/test/tmp/
/coverage/

View File

@ -1,20 +1,7 @@
.PHONY: all
all:
./waf build --targets jes
@rscons
.PHONY: clean
clean:
./waf clean
ifneq ($(FILTER),)
GTEST_FILTER := --gtest_filter=$(FILTER)
endif
.PHONY: build_tests
build_tests:
./waf build --targets tests
.PHONY: test
test: build_tests
./build/tests $(GTEST_FILTER)
@-rm -rf coverage
-gcovinator -b build -s src
@rscons -c

6
Rsconsfile Normal file
View File

@ -0,0 +1,6 @@
Rscons::Environment.new do |env|
env["sources"] = Dir[
"src/**/*.d",
"src/**/*.c"]
env.Program("#{env.build_root}/jes", "${sources}")
end