-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
executable file
·42 lines (35 loc) · 1.15 KB
/
build.sh
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/sh
CFLAGS="-ggdb"
# CFLAGS="${CFLAGS} -Werror"
CFLAGS="${CFLAGS} -Wall"
CFLAGS="${CFLAGS} -Wextra"
# CFLAGS="${CFLAGS} -Waggregate-return"
# CFLAGS="${CFLAGS} -Wbad-function-cast"
# CFLAGS="${CFLAGS} -Wcast-align"
# CFLAGS="${CFLAGS} -Wcast-qual"
# CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
# CFLAGS="${CFLAGS} -Wfloat-equal"
# CFLAGS="${CFLAGS} -Wformat=2"
# CFLAGS="${CFLAGS} -Wlogical-op"
# CFLAGS="${CFLAGS} -Wmissing-declarations"
# CFLAGS="${CFLAGS} -Wmissing-include-dirs"
# CFLAGS="${CFLAGS} -Wmissing-prototypes"
# CFLAGS="${CFLAGS} -Wnested-externs"
# CFLAGS="${CFLAGS} -Wpointer-arith"
# CFLAGS="${CFLAGS} -Wredundant-decls"
# CFLAGS="${CFLAGS} -Wsequence-point"
# CFLAGS="${CFLAGS} -Wshadow"
# CFLAGS="${CFLAGS} -Wstrict-prototypes"
# CFLAGS="${CFLAGS} -Wswitch"
# CFLAGS="${CFLAGS} -Wundef"
# CFLAGS="${CFLAGS} -Wunreachable-code"
# CFLAGS="${CFLAGS} -Wunused-but-set-parameter"
# CFLAGS="${CFLAGS} -Wwrite-strings"
LIBS="-lglfw -ldl -lpthread -lm -lGL"
EXE="./bin/paper"
SRCS_FILES=$(find ./src/ -name "*.cpp" -or -name "*.c")
rm -r bin
mkdir bin
echo "Compiling the sources..."
echo $SRCS_FILES
clang++ $CFLAGS $LIBS -o $EXE $SRCS_FILES