diff options
Diffstat (limited to 'build.sh')
| -rwxr-xr-x | build.sh | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -2,15 +2,17 @@ set -e DEBUG_FLAGS="" -LIB="-Ilibs/iceys-c-libs -Ilibs/socket" +LIB="-Ilibs/socket" mkdir -p bin mkdir -p obj -while getopts "d" opt; do +while getopts "df" opt; do case "$opt" in d) DEBUG_FLAGS="-Wall -fsanitize=address -g" ;; + f) DEBUG_FLAGS="-Wall -fsanitize=thread -g" + ;; esac done @@ -18,11 +20,10 @@ shift $((OPTIND-1)) [ "${1:-}" = "--" ] && shift printf "\n\nmaking project\n" -clang -Ilibs/iceys-c-libs -c libs/iceys-c-libs/iceys-utils.c -o obj/iceys-utils.o -clang -Ilibs/socket -c libs/socket/Server.c -o obj/Server.o -clang -Ilibs/socket -c libs/socket/launch-socket.c -o obj/launch-socket.o +clang -O3 -Ilibs/socket -c libs/socket/Server.c -o obj/Server.o +clang -O3 -Ilibs/socket -c libs/socket/launch-socket.c -o obj/launch-socket.o -clang obj/Server.o obj/iceys-utils.o obj/launch-socket.o -o bin/socket src/main.c $LIB $DEBUG_FLAGS -lm +clang -O3 obj/Server.o obj/launch-socket.o -o bin/socket src/main.c $LIB $DEBUG_FLAGS -lm clang -o bin/client src/client.c $LIB $DEBUG_FLAGS -lm clang -o bin/client-polled src/client-polled.c $LIB $DEBUG_FLAGS -lm |
