From 1eb83090ac4b5a31b352a843c85304df9af1f3e0 Mon Sep 17 00:00:00 2001 From: iceyrazor Date: Fri, 27 Feb 2026 19:53:33 -0600 Subject: - changed make - malloc with error function --- make | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'make') diff --git a/make b/make index 69155c3..fff0af0 100755 --- a/make +++ b/make @@ -1,9 +1,17 @@ #!/bin/sh + +DEBUG="" LIB="" -printf -- "\n\nmake\n" -if [[ "$1" == "debug" ]]; then - clang -o ./bin/shell ./src/main.c $LIB -Wall -g -fsanitize=address -else - clang -o ./bin/shell ./src/main.c $LIB -fi +while getopts "d" opt; do + case "$opt" in + d) DEBUG="-Wall -fsanitize=address -g" + ;; + esac +done + +shift $((OPTIND-1)) +[ "${1:-}" = "--" ] && shift + +printf "\n\nmaking project\n" +clang -o bin/shell src/main.c $LIB -lm $DEBUG -- cgit v1.3