summaryrefslogtreecommitdiff
path: root/build_all.sh
blob: 619cbcb70636868d928ca4b26cebe0977926bc89 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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