From 817a3b2422c7966fc0ae47ba7ebfbd086792471c Mon Sep 17 00:00:00 2001 From: iceyrazor Date: Fri, 25 Sep 2026 21:33:11 -0500 Subject: init --- build.sh | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 build.sh (limited to 'build.sh') 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 -- cgit v1.3