diff --git a/.gitignore b/.gitignore index db26e0ad0..acff56a9d 100644 --- a/.gitignore +++ b/.gitignore @@ -517,3 +517,10 @@ vscode/ # aspell *.bak + +# SCons database files +**/.sconsign.dblite + +# SCons compiled files +*.out +*.o diff --git a/contents/barnsley/code/c++/SConstruct b/contents/barnsley/code/c++/SConstruct new file mode 100644 index 000000000..17e5c3e98 --- /dev/null +++ b/contents/barnsley/code/c++/SConstruct @@ -0,0 +1,3 @@ +executable = Program('barnsley.out', 'barnsley.cpp', CCFLAGS='-std=c++17 -Wall -Wextra -Wshadow -Wnon-virtual-dtor -Wold-style-cast -Wcast-align -Wunused -Woverloaded-virtual -Wpedantic -Wconversion -Wsign-conversion -Wnull-dereference -Wdouble-promotion -Wformat=2') + +Command(target='out.dat', source=executable, action='./$SOURCE') diff --git a/contents/barnsley/code/c/SConstruct b/contents/barnsley/code/c/SConstruct new file mode 100644 index 000000000..56e79bc81 --- /dev/null +++ b/contents/barnsley/code/c/SConstruct @@ -0,0 +1,3 @@ +executable = Program('barnsley.out', 'barnsley.c', CCFLAGS='-Wall -Wextra -Wshadow -Wcast-align -Wunused -Wpedantic -Wconversion -Wsign-conversion -Wnull-dereference -Wdouble-promotion -Wformat=2') + +data_file = Command(target='barnsley.dat', source=executable, action='./$SOURCE') diff --git a/contents/barnsley/code/coconut/SConstruct b/contents/barnsley/code/coconut/SConstruct new file mode 100644 index 000000000..012f4f2f5 --- /dev/null +++ b/contents/barnsley/code/coconut/SConstruct @@ -0,0 +1,7 @@ +import os + +env = Environment(ENV={'PATH': os.environ['PATH']}) + +python_file = env.Command(target='barnsley.py', source='barnsley.coco', action='coconut --strict --target=3.8 $SOURCE') + +env.Command(target='out.dat', source=python_file, action='python3 $SOURCE') diff --git a/contents/barnsley/code/java/SConstruct b/contents/barnsley/code/java/SConstruct new file mode 100644 index 000000000..221d865a5 --- /dev/null +++ b/contents/barnsley/code/java/SConstruct @@ -0,0 +1,3 @@ +class_files = Java('.', '.') + +Command(target='barnsley.dat', source=class_files, action='java Barnsley') diff --git a/contents/barnsley/code/julia/SConstruct b/contents/barnsley/code/julia/SConstruct new file mode 100644 index 000000000..d1e055862 --- /dev/null +++ b/contents/barnsley/code/julia/SConstruct @@ -0,0 +1 @@ +Command(target='out.dat', source='barnsley.jl', action='julia $SOURCE')