diff options
| author | iceyrazor <iceyrazor@mailfence.com> | 2026-02-27 19:53:33 -0600 |
|---|---|---|
| committer | iceyrazor <iceyrazor@mailfence.com> | 2026-02-27 19:53:33 -0600 |
| commit | 1eb83090ac4b5a31b352a843c85304df9af1f3e0 (patch) | |
| tree | 5b78d7f1a7b8281f34c980630e5b9fbdf84833ce /make | |
| parent | 022a202e31157859bc0fac25479a4782514e50a9 (diff) | |
- changed make
- malloc with error function
Diffstat (limited to 'make')
| -rwxr-xr-x | make | 20 |
1 files changed, 14 insertions, 6 deletions
@@ -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 |
