diff options
| author | iceyrazor <iceyrazor@mailfence.com> | 2026-09-25 21:38:58 -0500 |
|---|---|---|
| committer | iceyrazor <iceyrazor@mailfence.com> | 2026-09-25 21:38:58 -0500 |
| commit | b6436e0ef6029c6cf002bc5fea599f64253cb206 (patch) | |
| tree | 284bb5195c586e0bfb1520273f3486a9c8a81f8c /build.sh | |
init
Diffstat (limited to 'build.sh')
| -rwxr-xr-x | build.sh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..3dfb60a --- /dev/null +++ b/build.sh @@ -0,0 +1,22 @@ +#!/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/Server src/main.c $LIB $DEBUG_FLAGS -lm
\ No newline at end of file |
