aboutsummaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
authoriceyrazor <iceyrazor@mailfence.com>2026-10-11 00:25:23 -0500
committericeyrazor <iceyrazor@mailfence.com>2026-10-11 00:25:23 -0500
commitcd94292211dc4c7a019691cb00e092368489ca22 (patch)
tree2ae1bd8b8a7673fbe11565d7f063718351f44947 /build.sh
parent3afe286fe87e5769dd7580c37f1db6c341b61fc1 (diff)
updated socket lib, removed iceys-c-libs lib
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh13
1 files changed, 7 insertions, 6 deletions
diff --git a/build.sh b/build.sh
index 659b7f9..5d75123 100755
--- a/build.sh
+++ b/build.sh
@@ -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