summaryrefslogtreecommitdiff
path: root/build_all.sh
diff options
context:
space:
mode:
Diffstat (limited to 'build_all.sh')
-rwxr-xr-xbuild_all.sh25
1 files changed, 25 insertions, 0 deletions
diff --git a/build_all.sh b/build_all.sh
new file mode 100755
index 0000000..619cbcb
--- /dev/null
+++ b/build_all.sh
@@ -0,0 +1,25 @@
+FLAGS=" \
+ -Wall -Wextra -Werror -pedantic \
+ -Wno-old-style-declaration \
+ -Wno-missing-braces \
+ -Wno-unused-variable \
+ -Wno-unused-but-set-variable \
+ -Wno-unused-parameter \
+ -Wno-overlength-strings \
+ -O3 \
+ -fsanitize=undefined,address,leak \
+ -lX11 -lm -lasound"
+
+if [ ! -d ./bin ]; then
+ mkdir ./bin
+fi
+
+gcc $FLAGS -o ./bin/graph ./examples/graph.c
+gcc $FLAGS -o ./bin/particles ./examples/particles.c
+gcc $FLAGS -o ./bin/julia_set ./examples/julia_set.c
+gcc $FLAGS -o ./bin/game_of_life ./examples/game_of_life.c
+gcc $FLAGS -o ./bin/labyrinth ./examples/labyrinth.c
+gcc $FLAGS -o ./bin/sinewave ./examples/sinewave.c
+gcc $FLAGS -o ./bin/ui ./examples/ui.c
+gcc $FLAGS -o ./bin/echo ./examples/echo.c
+gcc $FLAGS -o ./bin/proto ./examples/proto.c