diff options
| author | iceyrazor <iceyrazor@mailfence.com> | 2026-09-25 21:33:11 -0500 |
|---|---|---|
| committer | iceyrazor <iceyrazor@mailfence.com> | 2026-09-25 21:33:11 -0500 |
| commit | 817a3b2422c7966fc0ae47ba7ebfbd086792471c (patch) | |
| tree | 622bfd9e4fcc45feab7cf4aea36762492f1c9940 /build.sh | |
init
Diffstat (limited to 'build.sh')
| -rwxr-xr-x | build.sh | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..0139160 --- /dev/null +++ b/build.sh @@ -0,0 +1,25 @@ +#!/bin/sh +set -e + +DEBUG_FLAGS="" +LIB="-Ilibs/iceys-c-libs -Ilibs/socket" + +mkdir -p bin +mkdir -p obj + +while getopts "d" opt; do + case "$opt" in + d) DEBUG_FLAGS="-Wall -fsanitize=address -g" + ;; + esac +done + +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 obj/iceys-utils.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 |
